Signed-off-by: Andrei Kvapil <kvapss@gmail.com> <!-- Thank you for making a contribution! Here are some tips for you: - Start the PR title with the [label] of Cozystack component: - For system components: [platform], [system], [linstor], [cilium], [kube-ovn], [dashboard], [cluster-api], etc. - For managed apps: [apps], [tenant], [kubernetes], [postgres], [virtual-machine] etc. - For development and maintenance: [tests], [ci], [docs], [maintenance]. - If it's a work in progress, consider creating this PR as a draft. - Don't hesistate to ask for opinion and review in the community chats, even if it's still a draft. - Add the label `backport` if it's a bugfix that needs to be backported to a previous version. --> ## What this PR does ### Release note <!-- Write a release note: - Explain what has changed internally and for users. - Start with the same [label] as in the PR title - Follow the guidelines at https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md. --> ```release-note [cozystack-controller] Fix: move crds to definitions ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated the Custom Resource Definition generation template to source files from a new location, ensuring consistent configuration management. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
88 lines
3 KiB
YAML
88 lines
3 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: {}
|