diff --git a/crds/capapplication.yaml b/crds/capapplication.yaml deleted file mode 100644 index cd8a2c6..0000000 --- a/crds/capapplication.yaml +++ /dev/null @@ -1,133 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: capapplications.sme.sap.com -spec: - scope: Namespaced - names: - plural: capapplications - singular: capapplication - kind: CAPApplication - shortNames: ["ca"] - group: sme.sap.com - versions: - - name: v1alpha1 - served: true - storage: true - additionalPrinterColumns: - - name: Age - type: date - jsonPath: .metadata.creationTimestamp - - name: State - type: string - jsonPath: .status.state - subresources: - status: {} - schema: - openAPIV3Schema: - type: object - required: ["spec"] - properties: - spec: - type: object - required: - ["btpAppName", "globalAccountId", "provider", "domains", "btp"] - properties: - btpAppName: - type: string - globalAccountId: - type: string - domains: - type: object - required: ["primary", "istioIngressGatewayLabels"] - properties: - primary: - type: string - pattern: "^[a-z0-9-.]+$" - maxLength: 62 - secondary: - type: array - items: - type: string - pattern: "^[a-z0-9-.]+$" - dnsTarget: - type: string - pattern: "^[a-z0-9-.]*$" - istioIngressGatewayLabels: - type: array - items: - minItems: 1 - type: object - required: ["name", "value"] - properties: - name: - type: string - value: - type: string - minLength: 1 - provider: - type: object - required: ["subDomain", "tenantId"] - properties: - subDomain: - type: string - tenantId: - type: string - btp: - type: "object" - required: ["services"] - properties: - services: - type: array - items: - type: object - required: ["class", "name", "secret"] - properties: - class: - type: string - name: - type: string - secret: - type: string - status: - type: object - required: ["state"] - default: - state: "" - observedGeneration: -1 - properties: - observedGeneration: - type: integer - state: - type: string - enum: ["", "Consistent", "Processing", "Error", "Deleting"] - lastFullReconciliationTime: - type: string - format: datetime - conditions: - type: array - items: - type: object - required: ["type", "status"] - properties: - type: - type: string - enum: ["Ready", "AllTenantsReady", "LatestVersionReady"] - status: - type: string - enum: ["True", "False", "Unknown"] - lastUpdateTime: # Unused property - type: string - format: datetime - lastTransitionTime: - type: string - format: datetime - reason: - type: string - minLength: 1 - message: - type: string - observedGeneration: - type: integer - domainSpecHash: - type: string diff --git a/crds/capapplicationversion.yaml b/crds/capapplicationversion.yaml deleted file mode 100644 index 1451725..0000000 --- a/crds/capapplicationversion.yaml +++ /dev/null @@ -1,759 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: capapplicationversions.sme.sap.com -spec: - scope: Namespaced - names: - plural: capapplicationversions - singular: capapplicationversion - kind: CAPApplicationVersion - shortNames: ["cav"] - group: sme.sap.com - versions: - - name: v1alpha1 - served: true - storage: true - additionalPrinterColumns: - - name: Age - type: date - jsonPath: .metadata.creationTimestamp - - name: State - type: string - jsonPath: .status.state - subresources: - status: {} - schema: - openAPIV3Schema: - type: object - required: ["spec"] - properties: - spec: - type: object - required: ["capApplicationInstance", "workloads", "version"] - properties: - capApplicationInstance: - type: string - registrySecrets: - type: array - items: - type: string - workloads: - type: array - items: - type: object - required: ["name"] - oneOf: - - required: - - deploymentDefinition - - required: - - jobDefinition - properties: - consumedBTPServices: - type: array - items: - type: string - name: - type: string - pattern: "^[a-z]([-a-z0-9]*[a-z0-9])?$" - labels: - type: object - additionalProperties: - type: string - annotations: - type: object - additionalProperties: - type: string - deploymentDefinition: - type: object - required: ["type", "image"] - properties: - type: - type: string - image: - type: string - imagePullPolicy: - type: string - command: - type: array - items: - type: string - env: - type: array - items: - type: object - required: ["name"] - properties: - name: - type: string - value: - type: string - valueFrom: - type: object - properties: - secretKeyRef: - type: object - required: ["key"] - properties: - key: - type: string - name: - type: string - optional: - type: boolean - configMapKeyRef: - type: object - required: ["key"] - properties: - key: - type: string - name: - type: string - optional: - type: boolean - fieldRef: - type: object - required: ["fieldPath"] - properties: - apiVersion: - type: string - fieldPath: - type: string - resourceFieldRef: - type: object - required: ["resource"] - properties: - containerName: - type: string - resource: - type: string - divisor: - type: string - replicas: - type: integer - format: int32 - ports: - type: array - items: - type: object - properties: - appProtocol: - type: string - name: - type: string - networkPolicy: - type: string - enum: ["Application", "Cluster"] - port: - type: integer - format: int32 - routerDestinationName: - type: string - livenessProbe: - type: object - oneOf: - - required: - - exec - - required: - - grpc - - required: - - httpGet - - required: - - tcpSocket - properties: - exec: - type: object - required: ["command"] - properties: - command: - type: array - items: - type: string - httpGet: - type: object - required: ["port"] - properties: - path: - type: string - port: - type: integer - host: - type: string - scheme: - type: string - httpHeaders: - type: object - required: ["name", "value"] - properties: - name: - type: string - value: - type: string - tcpSocket: - type: object - required: ["port"] - properties: - port: - type: integer - host: - type: string - grpc: - type: object - required: ["port"] - properties: - port: - type: integer - service: - type: string - initialDelaySeconds: - type: integer - format: int32 - timeoutSeconds: - type: integer - format: int32 - periodSeconds: - type: integer - format: int32 - successThreshold: - type: integer - format: int32 - failureThreshold: - type: integer - format: int32 - readinessProbe: - type: object - oneOf: - - required: - - exec - - required: - - grpc - - required: - - httpGet - - required: - - tcpSocket - properties: - exec: - type: object - required: ["command"] - properties: - command: - type: array - items: - type: string - httpGet: - type: object - required: ["port"] - properties: - path: - type: string - port: - type: integer - host: - type: string - scheme: - type: string - httpHeaders: - type: object - required: ["name", "value"] - properties: - name: - type: string - value: - type: string - tcpSocket: - type: object - required: ["port"] - properties: - port: - type: integer - host: - type: string - grpc: - type: object - required: ["port"] - properties: - port: - type: integer - service: - type: string - initialDelaySeconds: - type: integer - format: int32 - timeoutSeconds: - type: integer - format: int32 - periodSeconds: - type: integer - format: int32 - successThreshold: - type: integer - format: int32 - failureThreshold: - type: integer - format: int32 - resources: - type: object - properties: - claims: - type: array - items: - type: object - properties: - name: - type: string - required: - - name - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - type: object - 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 - requests: - type: object - 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 - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - jobDefinition: - type: object - required: ["type", "image"] - properties: - type: - type: string - image: - type: string - imagePullPolicy: - type: string - command: - type: array - items: - type: string - env: - type: array - items: - type: object - required: ["name"] - properties: - name: - type: string - value: - type: string - valueFrom: - type: object - properties: - secretKeyRef: - type: object - required: ["key"] - properties: - key: - type: string - name: - type: string - optional: - type: boolean - configMapKeyRef: - type: object - required: ["key"] - properties: - key: - type: string - name: - type: string - optional: - type: boolean - fieldRef: - type: object - required: ["fieldPath"] - properties: - apiVersion: - type: string - fieldPath: - type: string - resourceFieldRef: - type: object - required: ["resource"] - properties: - containerName: - type: string - resource: - type: string - divisor: - type: string - backoffLimit: - type: integer - format: int32 - ttlSecondsAfterFinished: - type: integer - format: int32 - resources: - type: object - properties: - claims: - type: array - items: - type: object - properties: - name: - type: string - required: - - name - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - type: object - 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 - requests: - type: object - 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 - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - version: - type: string - tenantOperations: - type: object - properties: - provisioning: - type: array - items: - type: object - required: ["workloadName"] - properties: - workloadName: - type: string - pattern: "[a-z0-9-]*" - continueOnFailure: - type: boolean - deprovisioning: - type: array - items: - type: object - required: ["workloadName"] - properties: - workloadName: - type: string - pattern: "[a-z0-9-]*" - continueOnFailure: - type: boolean - upgrade: - type: array - items: - type: object - required: ["workloadName"] - properties: - workloadName: - type: string - pattern: "[a-z0-9-]*" - continueOnFailure: - type: boolean - contentJobs: - type: array - items: - type: string - status: - type: object - required: ["state"] - default: - state: "" - observedGeneration: -1 - properties: - observedGeneration: - type: integer - state: - type: string - enum: ["", "Ready", "Error", "Processing", "Deleting"] - finishedJobs: - type: array - items: - type: string - conditions: - type: array - items: - type: object - required: ["type", "status"] - properties: - type: - type: string - enum: ["Ready", "Error"] - status: - type: string - enum: ["True", "False", "Unknown"] - lastUpdateTime: # Unused property - type: string - format: datetime - lastTransitionTime: - type: string - format: datetime - reason: - type: string - minLength: 1 - message: - type: string - observedGeneration: - type: integer diff --git a/crds/captenant.yaml b/crds/captenant.yaml deleted file mode 100644 index b9e11eb..0000000 --- a/crds/captenant.yaml +++ /dev/null @@ -1,95 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: captenants.sme.sap.com -spec: - scope: Namespaced - names: - plural: captenants - singular: captenant - kind: CAPTenant - shortNames: ["cat"] - group: sme.sap.com - versions: - - name: v1alpha1 - served: true - storage: true - additionalPrinterColumns: - - name: Age - type: date - jsonPath: .metadata.creationTimestamp - - name: State - type: string - jsonPath: .status.state - - name: Current Version - type: string - jsonPath: .status.currentCAPApplicationVersionInstance - subresources: - status: {} - schema: - openAPIV3Schema: - type: object - required: ["spec"] - properties: - spec: - type: object - required: ["capApplicationInstance", "subDomain", "tenantId"] - properties: - capApplicationInstance: - type: string - subDomain: - type: string - tenantId: - type: string - version: - type: string - versionUpgradeStrategy: - default: "always" - type: string - enum: ["always", "never"] - status: - type: object - required: ["state"] - default: - state: "" - observedGeneration: -1 - properties: - currentCAPApplicationVersionInstance: - type: string - observedGeneration: - type: integer - state: - type: string - enum: [ "", "Ready", "Provisioning", "Upgrading", "Deleting", "ProvisioningError", "UpgradeError"] - lastFullReconciliationTime: - type: string - format: datetime - previousCAPApplicationVersions: - type: array - items: - type: string - conditions: - type: array - items: - type: object - required: ["type", "status"] - properties: - type: - type: string - enum: ["Ready", "Error"] - status: - type: string - enum: ["True", "False", "Unknown"] - lastUpdateTime: # Unused property - type: string - format: datetime - lastTransitionTime: - type: string - format: datetime - reason: - type: string - minLength: 1 - message: - type: string - observedGeneration: - type: integer diff --git a/crds/captenantoperation.yaml b/crds/captenantoperation.yaml deleted file mode 100644 index c272b3a..0000000 --- a/crds/captenantoperation.yaml +++ /dev/null @@ -1,106 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: captenantoperations.sme.sap.com -spec: - scope: Namespaced - names: - plural: captenantoperations - singular: captenantoperation - kind: CAPTenantOperation - shortNames: ["ctop"] - group: sme.sap.com - versions: - - name: v1alpha1 - served: true - storage: true - additionalPrinterColumns: - - name: Age - type: date - jsonPath: .metadata.creationTimestamp - - name: State - type: string - jsonPath: .status.state - subresources: - status: {} - schema: - openAPIV3Schema: - type: object - required: ["spec"] - properties: - spec: - type: object - required: - [ - "operation", - "tenantId", - "subDomain", - "capApplicationVersionInstance", - ] - properties: - operation: - type: string - enum: ["provisioning", "deprovisioning", "upgrade"] - subDomain: - type: string - tenantId: - type: string - capApplicationVersionInstance: - type: string - steps: - type: array - items: - type: object - required: ["name", "type"] - properties: - name: - type: string - pattern: "^[a-z]([-a-z0-9]*[a-z0-9])?$" - type: - type: string - enum: ["TenantOperation", "CustomTenantOperation"] - continueOnFailure: - type: boolean - status: - type: object - required: ["state"] - default: - state: "" - observedGeneration: -1 - properties: - currentStep: - type: integer - format: int32 - minimum: 0 - activeJob: - type: string - observedGeneration: - type: integer - state: - type: string - enum: ["", "Processing", "Completed", "Failed", "Deleting"] - conditions: - type: array - items: - type: object - required: ["type", "status"] - properties: - type: - type: string - enum: ["Ready"] - status: - type: string - enum: ["True", "False", "Unknown"] - lastUpdateTime: # Unused property - type: string - format: datetime - lastTransitionTime: - type: string - format: datetime - reason: - type: string - minLength: 1 - message: - type: string - observedGeneration: - type: integer diff --git a/crds/sme.sap.com_capapplications.yaml b/crds/sme.sap.com_capapplications.yaml new file mode 100644 index 0000000..54ff7e6 --- /dev/null +++ b/crds/sme.sap.com_capapplications.yaml @@ -0,0 +1,174 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: capapplications.sme.sap.com +spec: + group: sme.sap.com + names: + kind: CAPApplication + listKind: CAPApplicationList + plural: capapplications + shortNames: + - ca + singular: capapplication + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.state + name: State + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + btp: + properties: + services: + items: + properties: + class: + type: string + name: + type: string + secret: + type: string + required: + - class + - name + - secret + type: object + type: array + required: + - services + type: object + btpAppName: + type: string + domains: + properties: + dnsTarget: + pattern: ^[a-z0-9-.]*$ + type: string + istioIngressGatewayLabels: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + minItems: 1 + type: array + primary: + maxLength: 62 + pattern: ^[a-z0-9-.]+$ + type: string + secondary: + items: + pattern: ^[a-z0-9-.]+$ + type: string + type: array + required: + - istioIngressGatewayLabels + - primary + type: object + globalAccountId: + type: string + provider: + properties: + subDomain: + type: string + tenantId: + type: string + required: + - subDomain + - tenantId + type: object + required: + - btp + - btpAppName + - domains + - globalAccountId + - provider + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + domainSpecHash: + type: string + lastFullReconciliationTime: + format: date-time + type: string + observedGeneration: + format: int64 + type: integer + state: + enum: + - "" + - Consistent + - Processing + - Error + - Deleting + type: string + required: + - state + type: object + required: + - metadata + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/crds/sme.sap.com_capapplicationversions.yaml b/crds/sme.sap.com_capapplicationversions.yaml new file mode 100644 index 0000000..a03dc8f --- /dev/null +++ b/crds/sme.sap.com_capapplicationversions.yaml @@ -0,0 +1,840 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: capapplicationversions.sme.sap.com +spec: + group: sme.sap.com + names: + kind: CAPApplicationVersion + listKind: CAPApplicationVersionList + plural: capapplicationversions + shortNames: + - cav + singular: capapplicationversion + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.state + name: State + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + capApplicationInstance: + type: string + contentJobs: + items: + type: string + type: array + registrySecrets: + items: + type: string + type: array + tenantOperations: + properties: + deprovisioning: + items: + properties: + continueOnFailure: + type: boolean + workloadName: + type: string + required: + - workloadName + type: object + type: array + provisioning: + items: + properties: + continueOnFailure: + type: boolean + workloadName: + type: string + required: + - workloadName + type: object + type: array + upgrade: + items: + properties: + continueOnFailure: + type: boolean + workloadName: + type: string + required: + - workloadName + type: object + type: array + type: object + version: + type: string + workloads: + items: + oneOf: + - required: + - deploymentDefinition + - required: + - jobDefinition + properties: + annotations: + additionalProperties: + type: string + type: object + consumedBTPServices: + items: + type: string + type: array + deploymentDefinition: + properties: + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + ports: + items: + properties: + appProtocol: + type: string + name: + type: string + networkPolicy: + enum: + - Application + - Cluster + type: string + port: + format: int32 + type: integer + routerDestinationName: + type: string + required: + - name + - port + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + replicas: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + 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 + type: object + requests: + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + type: + type: string + required: + - image + - type + type: object + jobDefinition: + properties: + backoffLimit: + format: int32 + type: integer + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + 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 + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + 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 + type: object + requests: + 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 + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + ttlSecondsAfterFinished: + format: int32 + type: integer + type: + type: string + required: + - image + - type + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + required: + - consumedBTPServices + - name + type: object + type: array + required: + - capApplicationInstance + - version + - workloads + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + finishedJobs: + items: + type: string + type: array + observedGeneration: + format: int64 + type: integer + state: + enum: + - "" + - Ready + - Error + - Processing + - Deleting + type: string + required: + - state + type: object + required: + - metadata + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/crds/sme.sap.com_captenantoperations.yaml b/crds/sme.sap.com_captenantoperations.yaml new file mode 100644 index 0000000..8406f0e --- /dev/null +++ b/crds/sme.sap.com_captenantoperations.yaml @@ -0,0 +1,141 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: captenantoperations.sme.sap.com +spec: + group: sme.sap.com + names: + kind: CAPTenantOperation + listKind: CAPTenantOperationList + plural: captenantoperations + shortNames: + - ctop + singular: captenantoperation + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.operation + name: Operation + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.state + name: State + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + capApplicationVersionInstance: + type: string + operation: + enum: + - provisioning + - deprovisioning + - upgrade + type: string + steps: + items: + properties: + continueOnFailure: + type: boolean + name: + type: string + type: + enum: + - CustomTenantOperation + - TenantOperation + type: string + required: + - name + - type + type: object + type: array + subDomain: + type: string + tenantId: + type: string + required: + - capApplicationVersionInstance + - operation + - steps + - subDomain + - tenantId + type: object + status: + properties: + activeJob: + type: string + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + currentStep: + format: int32 + type: integer + observedGeneration: + format: int64 + type: integer + state: + enum: + - "" + - Processing + - Completed + - Failed + - Deleting + type: string + required: + - state + type: object + required: + - metadata + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/crds/sme.sap.com_captenants.yaml b/crds/sme.sap.com_captenants.yaml new file mode 100644 index 0000000..f262e94 --- /dev/null +++ b/crds/sme.sap.com_captenants.yaml @@ -0,0 +1,129 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: captenants.sme.sap.com +spec: + group: sme.sap.com + names: + kind: CAPTenant + listKind: CAPTenantList + plural: captenants + shortNames: + - cat + singular: captenant + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.state + name: State + type: string + - jsonPath: .status.currentCAPApplicationVersionInstance + name: Current Version + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + capApplicationInstance: + type: string + subDomain: + type: string + tenantId: + type: string + version: + type: string + versionUpgradeStrategy: + enum: + - always + - never + type: string + required: + - capApplicationInstance + - subDomain + - tenantId + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + currentCAPApplicationVersionInstance: + type: string + lastFullReconciliationTime: + format: date-time + type: string + observedGeneration: + format: int64 + type: integer + previousCAPApplicationVersions: + items: + type: string + type: array + state: + enum: + - "" + - Ready + - Provisioning + - Upgrading + - Deleting + - ProvisioningError + - UpgradeError + type: string + required: + - state + type: object + required: + - metadata + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/hack/Makefile b/hack/Makefile new file mode 100644 index 0000000..5d35fa8 --- /dev/null +++ b/hack/Makefile @@ -0,0 +1,38 @@ +# Set shell to bash +SHELL = /usr/bin/env bash +.SHELLFLAGS = -o pipefail -ec +SRC = ./.. +PKG = pkg/apis + +.PHONY: all +all: build + +##@ General + +.PHONY: help +help: ## Display this help. + @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) + +##@ Development + +.PHONY: manifests +manifests: controller-gen ## Generate CustomResourceDefinition objects. + $(CONTROLLER_GEN) crd:maxDescLen=0 paths="$(SRC)/$(PKG)/..." output:crd:artifacts:config="$(SRC)/crds" +##@ Build Dependencies + +## Location to install dependencies to +LOCALBIN ?= $(shell pwd)/bin +$(LOCALBIN): + mkdir -p $(LOCALBIN) + +## Tool Binaries +CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen + +## Tool Versions +CONTROLLER_TOOLS_VERSION ?= v0.13.0 + +.PHONY: controller-gen +controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. +$(CONTROLLER_GEN): $(LOCALBIN) + test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) + diff --git a/pkg/apis/sme.sap.com/v1alpha1/types.go b/pkg/apis/sme.sap.com/v1alpha1/types.go index 9b1bb3a..790a8db 100644 --- a/pkg/apis/sme.sap.com/v1alpha1/types.go +++ b/pkg/apis/sme.sap.com/v1alpha1/types.go @@ -23,21 +23,26 @@ const ( CAPTenantOperationResource = "captenantoperations" ) +// +kubebuilder:resource:shortName=ca +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state" // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - // CAPApplication is the schema for capapplications API type CAPApplication struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` // CAPApplication spec Spec CAPApplicationSpec `json:"spec"` + // +kubebuilder:validation:Optional // CAPApplication status Status CAPApplicationStatus `json:"status"` } type CAPApplicationStatus struct { GenericStatus `json:",inline"` + // +kubebuilder:validation:Enum="";Consistent;Processing;Error;Deleting // State of CAPApplication State CAPApplicationState `json:"state"` // Hash representing last known application domains @@ -84,16 +89,23 @@ type CAPApplicationSpec struct { // Application domains type ApplicationDomains struct { + // +kubebuilder:validation:Pattern=^[a-z0-9-.]+$ + // +kubebuilder:validation:MaxLength=62 // Primary application domain will be used to generate a wildcard TLS certificate. In SAP Gardener managed clusters this is (usually) a subdomain of the cluster domain Primary string `json:"primary"` // Customer specific domains to serve application endpoints (optional) Secondary []string `json:"secondary,omitempty"` + // +kubebuilder:validation:Pattern=^[a-z0-9-.]*$ // Public ingress URL for the cluster Load Balancer DnsTarget string `json:"dnsTarget,omitempty"` + // +kubebuilder:validation:MinItems=1 // Labels used to identify the istio ingress-gateway component and its corresponding namespace. Usually {"app":"istio-ingressgateway","istio":"ingressgateway"} IstioIngressGatewayLabels []NameValue `json:"istioIngressGatewayLabels"` } +//Workaround for pattern for string items +kubebuilder:validation:Pattern=^[a-z0-9-.]+$ +//type PatternString string + // Generic Name/Value configuration type NameValue struct { Name string `json:"name"` @@ -145,21 +157,26 @@ const ( ConditionTypeReady StatusConditionType = "Ready" ) +// +kubebuilder:resource:shortName=cav +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state" // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - // CAPApplicationVersion defines the schema for capapplicationversions API type CAPApplicationVersion struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` // CAPApplicationVersion spec Spec CAPApplicationVersionSpec `json:"spec"` + // +kubebuilder:validation:Optional // CAPApplicationVersion status Status CAPApplicationVersionStatus `json:"status"` } type CAPApplicationVersionStatus struct { GenericStatus `json:",inline"` + // +kubebuilder:validation:Enum="";Ready;Error;Processing;Deleting // State of CAPApplicationVersion State CAPApplicationVersionState `json:"state"` // List of finished Content Jobs @@ -195,7 +212,7 @@ type CAPApplicationVersionSpec struct { // Semantic version Version string `json:"version"` // Registry secrets used to pull images of the application components - RegistrySecrets []string `json:"registrySecrets"` + RegistrySecrets []string `json:"registrySecrets,omitempty"` // Information about the Workloads Workloads []WorkloadDetails `json:"workloads"` // Tenant Operations may be used to specify how jobs are sequenced for the different tenant operations @@ -211,9 +228,9 @@ type WorkloadDetails struct { // List of BTP services consumed by the current application component workload. These services must be defined in the corresponding CAPApplication. ConsumedBTPServices []string `json:"consumedBTPServices"` // Custom labels for the current workload - Labels map[string]string `json:"labels"` + Labels map[string]string `json:"labels,omitempty"` // Annotations for the current workload, in case of `Deployments` this also get copied over to any `Service` that may be created - Annotations map[string]string `json:"annotations"` + Annotations map[string]string `json:"annotations,omitempty"` // Definition of a deployment DeploymentDefinition *DeploymentDetails `json:"deploymentDefinition,omitempty"` // Definition of a job @@ -294,6 +311,7 @@ type Ports struct { AppProtocol *string `json:"appProtocol,omitempty"` // Name of the service port Name string `json:"name"` + // +kubebuilder:validation:Enum=Application;Cluster // Network Policy of the service port NetworkPolicy PortNetworkPolicyType `json:"networkPolicy,omitempty"` // The port number used for container and the corresponding service (if any) @@ -329,15 +347,20 @@ type TenantOperationWorkloadReference struct { ContinueOnFailure bool `json:"continueOnFailure,omitempty"` } +// +kubebuilder:resource:shortName=cat +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state" +// +kubebuilder:printcolumn:name="Current Version",type="string",JSONPath=".status.currentCAPApplicationVersionInstance" // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - // CAPTenant defines the schema for captenants API type CAPTenant struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` // CAPTenant spec Spec CAPTenantSpec `json:"spec"` + // +kubebuilder:validation:Optional // CAPTenant status Status CAPTenantStatus `json:"status"` } @@ -353,6 +376,7 @@ type CAPTenantList struct { type CAPTenantStatus struct { GenericStatus `json:",inline"` + // +kubebuilder:validation:Enum="";Ready;Provisioning;Upgrading;Deleting;ProvisioningError;UpgradeError // State of CAPTenant State CAPTenantState `json:"state"` // Specifies the current version of the tenant after provisioning or upgrade @@ -388,6 +412,7 @@ type CAPTenantSpec struct { BTPTenantIdentification `json:",inline"` // Semver that is used to determine the relevant CAPApplicationVersion that a CAPTenant can be upgraded to (i.e. if it is not already on that version) Version string `json:"version,omitempty"` + // +kubebuilder:validation:Enum=always;never // Denotes whether a CAPTenant can be upgraded. One of ('always', 'never') VersionUpgradeStrategy VersionUpgradeStrategyType `json:"versionUpgradeStrategy,omitempty"` } @@ -401,15 +426,20 @@ const ( VersionUpgradeStrategyTypeNever VersionUpgradeStrategyType = "never" ) +// +kubebuilder:resource:shortName=ctop +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Operation",type="string",JSONPath=".spec.operation" +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state" // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - // CAPTenantOperation defines the schema for captenantoperations API type CAPTenantOperation struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` // CAPTenantOperation spec Spec CAPTenantOperationSpec `json:"spec"` + // +kubebuilder:validation:Optional // CAPTenantOperation status Status CAPTenantOperationStatus `json:"status"` } @@ -424,6 +454,7 @@ type CAPTenantOperationList struct { } type CAPTenantOperationSpec struct { + // +kubebuilder:validation:Enum=provisioning;deprovisioning;upgrade // Scope of the tenant lifecycle operation. One of 'provisioning', 'deprovisioning' or 'upgrade' Operation CAPTenantOperationType `json:"operation"` // BTP sub-account (tenant) for which request is created @@ -437,6 +468,7 @@ type CAPTenantOperationSpec struct { type CAPTenantOperationStep struct { // Name of the workload from the referenced CAPApplicationVersion Name string `json:"name"` + // +kubebuilder:validation:Enum=CustomTenantOperation;TenantOperation // Type of job. One of 'TenantOperation' or 'CustomTenantOperation' Type JobType `json:"type"` // Indicates whether the operation can continue in case of step failure. Relevant only for type 'CustomTenantOperation' @@ -445,6 +477,7 @@ type CAPTenantOperationStep struct { type CAPTenantOperationStatus struct { GenericStatus `json:",inline"` + // +kubebuilder:validation:Enum="";Processing;Completed;Failed;Deleting // State of CAPTenantOperation State CAPTenantOperationState `json:"state"` // Current step being processed from the sequence of specified steps