Files
cozystack/packages/system/cozystack-controller/crds/cozystack.io_workloads.yaml
Timofei Larkin 66004c83e2 [lineage, controller] Implement name selectors
This patch implements name-based selectors for
`CozystackResourceDefinitions.spec.secrets`. Application developers may
now specify secrets that should or should not be visible to end users by
specifying a `resourceNames` field with a string slice of acceptable
names. This will, for instance, let developers exclude a secret like
`postgres-dbname-superuser` that has a predictable name even if it does
not have predictable labels. Simple templates are supported, so
`postgres-{{ .name }}-superuser` is also a valid entry under
`resourceNames`.

```release-note
[lineage, controller] Let application developers determine resource
visibility for end users by name, as well as by labels.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-10-01 12:29:04 +03:00

89 lines
3.0 KiB
YAML

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.4
name: workloads.cozystack.io
spec:
group: cozystack.io
names:
kind: Workload
listKind: WorkloadList
plural: workloads
singular: workload
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .status.kind
name: Kind
type: string
- jsonPath: .status.type
name: Type
type: string
- jsonPath: .status.resources.cpu
name: CPU
type: string
- jsonPath: .status.resources.memory
name: Memory
type: string
- jsonPath: .status.operational
name: Operational
type: boolean
name: v1alpha1
schema:
openAPIV3Schema:
description: Workload is the Schema for the workloads API
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
status:
description: WorkloadStatus defines the observed state of Workload
properties:
kind:
description: Kind represents the type of workload (redis, postgres,
etc.)
type: string
operational:
description: Operational indicates if all pods of the workload are
ready
type: boolean
resources:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: Resources specifies the compute resources allocated to
this workload
type: object
type:
description: |-
Type represents the specific role of the workload (redis, sentinel, etc.)
If not specified, defaults to Kind
type: string
required:
- kind
- resources
type: object
type: object
served: true
storage: true
subresources: {}