From 60cdb87a2e250dd3cbe80f7e3641a888f9391886 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Fri, 4 Aug 2023 10:33:21 +0100 Subject: [PATCH 01/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- Makefile | 13 - helm/overlay/kustomization.yaml | 46 - operator/config/rendered/release.yaml | 5811 +++++++++++++++++++++++++ 3 files changed, 5811 insertions(+), 59 deletions(-) delete mode 100644 helm/overlay/kustomization.yaml create mode 100644 operator/config/rendered/release.yaml diff --git a/Makefile b/Makefile index 9f1f5e2b40..907f275d97 100644 --- a/Makefile +++ b/Makefile @@ -23,12 +23,6 @@ $(LOCALBIN): ## Tool Binaries KUSTOMIZE ?= $(LOCALBIN)/kustomize -HELMIFY ?= $(LOCALBIN)/helmify - -.PHONY: helmify -helmify: $(HELMIFY) ## Download helmify locally if necessary. -$(HELMIFY): $(LOCALBIN) - test -s $(LOCALBIN)/helmify || GOBIN=$(LOCALBIN) go install github.com/keptn/helmify/cmd/helmify@17737f7ff50279e758006221f11187a232becf1c .PHONY: integration-test #these tests should run on a real cluster! integration-test: # to run a single test by name use --test eg. --test=expose-keptn-metric @@ -71,13 +65,6 @@ kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. $(KUSTOMIZE): $(LOCALBIN) test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); } -.PHONY: release-helm-manifests -release-helm-manifests: helmify - echo "building helm overlay" - kustomize build ./helm/overlay > helmchart.yaml - envsubst < helmchart.yaml > tmp.yaml; mv tmp.yaml helmchart.yaml - cat helmchart.yaml | $(HELMIFY) -probes=true -image-pull-secrets=true -vv helm/chart - .PHONY: helm-package helm-package: $(MAKE) build-release-manifests CHART_APPVERSION=$(CHART_APPVERSION) RELEASE_REGISTRY=$(RELEASE_REGISTRY) diff --git a/helm/overlay/kustomization.yaml b/helm/overlay/kustomization.yaml deleted file mode 100644 index 229394fa72..0000000000 --- a/helm/overlay/kustomization.yaml +++ /dev/null @@ -1,46 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -# import the default deployment as the base -resources: - - ../../lifecycle-operator/config/default - - ../../klt-cert-manager/config/default - - ../../metrics-operator/config/default - - ../../scheduler/manifests/install - -# replace the default namespace with {{ include "chart.namespace" . }} -# .Release.Namespace has not been used so that a custom _helpers.tpl file can maintain the expected behaviour of -# helm install -n -patches: - - patch: | - - op: add - path: '/webhooks/0/namespaceSelector/matchExpressions/-' - value: - key: kubernetes.io/metadata.name - operator: "NotIn" - values: - - '{{ .Release.Namespace }}' - target: - kind: MutatingWebhookConfiguration - name: "(lifecycle-mutating-webhook-configuration)" - - - patch: | - - op: replace - path: '/spec/service/namespace' - value: '{{ .Release.Namespace }}' - - op: replace - path: '/spec/service/name' - value: '{{ include "chart.fullname" . }}-metrics-operator-service' - target: - kind: APIService - name: "(v1beta2.custom.metrics.k8s.io)" - - - patch: | - - op: replace - path: '/spec/service/namespace' - value: '{{ .Release.Namespace }}' - - op: replace - path: '/spec/service/name' - value: '{{ include "chart.fullname" . }}-metrics-operator-service' - target: - kind: APIService - name: "(v1beta1.custom.metrics.k8s.io)" diff --git a/operator/config/rendered/release.yaml b/operator/config/rendered/release.yaml new file mode 100644 index 0000000000..b1938a3a14 --- /dev/null +++ b/operator/config/rendered/release.yaml @@ -0,0 +1,5811 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + name: keptnappcreationrequests.lifecycle.keptn.sh +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnAppCreationRequest + listKind: KeptnAppCreationRequestList + plural: keptnappcreationrequests + singular: keptnappcreationrequest + scope: Namespaced + versions: + - name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnAppCreationRequest is the Schema for the keptnappcreationrequests + 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 + spec: + description: Spec describes the desired state of the KeptnAppCreationRequest. + properties: + appName: + description: AppName is the name of the KeptnApp the KeptnAppCreationRequest + should create if no user-defined object with that name is found. + type: string + required: + - appName + type: object + status: + description: Status describes the current state of the KeptnAppCreationRequest. + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + name: keptnapps.lifecycle.keptn.sh +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: lifecycle-webhook-service + namespace: keptn-lifecycle-toolkit-system + path: /convert + conversionReviewVersions: + - v1 + group: lifecycle.keptn.sh + names: + kind: KeptnApp + listKind: KeptnAppList + plural: keptnapps + singular: keptnapp + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnApp is the Schema for the keptnapps 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 + spec: + description: KeptnAppSpec defines the desired state of KeptnApp + properties: + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + version: + type: string + workloads: + items: + properties: + name: + type: string + version: + type: string + required: + - name + - version + type: object + type: array + required: + - version + type: object + status: + description: KeptnAppStatus defines the observed state of KeptnApp + properties: + currentVersion: + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnApp is the Schema for the keptnapps 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 + spec: + description: KeptnAppSpec defines the desired state of KeptnApp + properties: + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + revision: + default: 1 + type: integer + version: + type: string + workloads: + items: + properties: + name: + type: string + version: + type: string + required: + - name + - version + type: object + type: array + required: + - version + type: object + status: + description: KeptnAppStatus defines the observed state of KeptnApp + properties: + currentVersion: + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnApp is the Schema for the keptnapps 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 + spec: + description: Spec describes the desired state of the KeptnApp. + properties: + postDeploymentEvaluations: + description: PostDeploymentEvaluations is a list of all evaluations + to be performed during the post-deployment phase of the KeptnApp. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + postDeploymentTasks: + description: PostDeploymentTasks is a list of all tasks to be performed + during the post-deployment phase of the KeptnApp. The items of this + list refer to the names of KeptnTaskDefinitions located in the same + namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + preDeploymentEvaluations: + description: PreDeploymentEvaluations is a list of all evaluations + to be performed during the pre-deployment phase of the KeptnApp. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + preDeploymentTasks: + description: PreDeploymentTasks is a list of all tasks to be performed + during the pre-deployment phase of the KeptnApp. The items of this + list refer to the names of KeptnTaskDefinitions located in the same + namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + revision: + default: 1 + description: Revision can be modified to trigger another deployment + of a KeptnApp of the same version. This can be used for restarting + a KeptnApp which failed to deploy, e.g. due to a failed preDeploymentEvaluation/preDeploymentTask. + type: integer + version: + description: Version defines the version of the application. For automatically + created KeptnApps, the version is a function of all KeptnWorkloads + that are part of the KeptnApp. + type: string + workloads: + description: Workloads is a list of all KeptnWorkloads that are part + of the KeptnApp. + items: + description: KeptnWorkloadRef refers to a KeptnWorkload that is + part of a KeptnApp + properties: + name: + description: Name is the name of the KeptnWorkload. + type: string + version: + description: Version is the version of the KeptnWorkload. + type: string + required: + - name + - version + type: object + type: array + required: + - version + type: object + status: + description: Status describes the current state of the KeptnApp. + properties: + currentVersion: + description: CurrentVersion indicates the version that is currently + deployed or being reconciled. + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + name: keptnappversions.lifecycle.keptn.sh +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: lifecycle-webhook-service + namespace: keptn-lifecycle-toolkit-system + path: /convert + conversionReviewVersions: + - v1 + group: lifecycle.keptn.sh + names: + kind: KeptnAppVersion + listKind: KeptnAppVersionList + plural: keptnappversions + shortNames: + - kav + singular: keptnappversion + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.appName + name: AppName + type: string + - jsonPath: .spec.version + name: Version + type: string + - jsonPath: .status.currentPhase + name: Phase + type: string + - jsonPath: .status.preDeploymentStatus + name: PreDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.preDeploymentEvaluationStatus + name: PreDeploymentEvaluationStatus + priority: 1 + type: string + - jsonPath: .status.workloadOverallStatus + name: WorkloadOverallStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentStatus + name: PostDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentEvaluationStatus + name: PostDeploymentEvaluationStatus + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnAppVersion is the Schema for the keptnappversions 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 + spec: + description: KeptnAppVersionSpec defines the desired state of KeptnAppVersion + properties: + appName: + type: string + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + previousVersion: + type: string + traceId: + additionalProperties: + type: string + type: object + version: + type: string + workloads: + items: + properties: + name: + type: string + version: + type: string + required: + - name + - version + type: object + type: array + required: + - appName + - version + type: object + status: + description: KeptnAppVersionStatus defines the observed state of KeptnAppVersion + properties: + currentPhase: + type: string + endTime: + format: date-time + type: string + phaseTraceIDs: + additionalProperties: + additionalProperties: + type: string + description: MapCarrier is a TextMapCarrier that uses a map held + in memory as a storage medium for propagated key-value pairs. + type: object + type: object + postDeploymentEvaluationStatus: + default: Pending + type: string + postDeploymentEvaluationTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + evaluationDefinitionName: + type: string + evaluationName: + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + postDeploymentStatus: + default: Pending + type: string + postDeploymentTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + taskDefinitionName: + type: string + taskName: + type: string + type: object + type: array + preDeploymentEvaluationStatus: + default: Pending + type: string + preDeploymentEvaluationTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + evaluationDefinitionName: + type: string + evaluationName: + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentStatus: + default: Pending + type: string + preDeploymentTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + taskDefinitionName: + type: string + taskName: + type: string + type: object + type: array + startTime: + format: date-time + type: string + status: + default: Pending + type: string + workloadOverallStatus: + default: Pending + type: string + workloadStatus: + items: + properties: + status: + default: Pending + type: string + workload: + properties: + name: + type: string + version: + type: string + required: + - name + - version + type: object + type: object + type: array + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.appName + name: AppName + type: string + - jsonPath: .spec.version + name: Version + type: string + - jsonPath: .status.currentPhase + name: Phase + type: string + - jsonPath: .status.preDeploymentStatus + name: PreDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.preDeploymentEvaluationStatus + name: PreDeploymentEvaluationStatus + priority: 1 + type: string + - jsonPath: .status.workloadOverallStatus + name: WorkloadOverallStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentStatus + name: PostDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentEvaluationStatus + name: PostDeploymentEvaluationStatus + priority: 1 + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnAppVersion is the Schema for the keptnappversions 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 + spec: + description: KeptnAppVersionSpec defines the desired state of KeptnAppVersion + properties: + appName: + type: string + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + previousVersion: + type: string + revision: + default: 1 + type: integer + traceId: + additionalProperties: + type: string + type: object + version: + type: string + workloads: + items: + properties: + name: + type: string + version: + type: string + required: + - name + - version + type: object + type: array + required: + - appName + - version + type: object + status: + description: KeptnAppVersionStatus defines the observed state of KeptnAppVersion + properties: + currentPhase: + type: string + endTime: + format: date-time + type: string + phaseTraceIDs: + additionalProperties: + additionalProperties: + type: string + description: MapCarrier is a TextMapCarrier that uses a map held + in memory as a storage medium for propagated key-value pairs. + type: object + type: object + postDeploymentEvaluationStatus: + default: Pending + type: string + postDeploymentEvaluationTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + postDeploymentStatus: + default: Pending + type: string + postDeploymentTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentEvaluationStatus: + default: Pending + type: string + preDeploymentEvaluationTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentStatus: + default: Pending + type: string + preDeploymentTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + startTime: + format: date-time + type: string + status: + default: Pending + type: string + workloadOverallStatus: + default: Pending + type: string + workloadStatus: + items: + properties: + status: + default: Pending + type: string + workload: + properties: + name: + type: string + version: + type: string + required: + - name + - version + type: object + type: object + type: array + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.appName + name: AppName + type: string + - jsonPath: .spec.version + name: Version + type: string + - jsonPath: .status.currentPhase + name: Phase + type: string + - jsonPath: .status.preDeploymentStatus + name: PreDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.preDeploymentEvaluationStatus + name: PreDeploymentEvaluationStatus + priority: 1 + type: string + - jsonPath: .status.workloadOverallStatus + name: WorkloadOverallStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentStatus + name: PostDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentEvaluationStatus + name: PostDeploymentEvaluationStatus + priority: 1 + type: string + name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnAppVersion is the Schema for the keptnappversions 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 + spec: + description: Spec describes the desired state of the KeptnAppVersion. + properties: + appName: + description: AppName is the name of the KeptnApp. + type: string + postDeploymentEvaluations: + description: PostDeploymentEvaluations is a list of all evaluations + to be performed during the post-deployment phase of the KeptnApp. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + postDeploymentTasks: + description: PostDeploymentTasks is a list of all tasks to be performed + during the post-deployment phase of the KeptnApp. The items of this + list refer to the names of KeptnTaskDefinitions located in the same + namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + preDeploymentEvaluations: + description: PreDeploymentEvaluations is a list of all evaluations + to be performed during the pre-deployment phase of the KeptnApp. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + preDeploymentTasks: + description: PreDeploymentTasks is a list of all tasks to be performed + during the pre-deployment phase of the KeptnApp. The items of this + list refer to the names of KeptnTaskDefinitions located in the same + namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + previousVersion: + description: PreviousVersion is the version of the KeptnApp that has + been deployed prior to this version. + type: string + revision: + default: 1 + description: Revision can be modified to trigger another deployment + of a KeptnApp of the same version. This can be used for restarting + a KeptnApp which failed to deploy, e.g. due to a failed preDeploymentEvaluation/preDeploymentTask. + type: integer + traceId: + additionalProperties: + type: string + description: TraceId contains the OpenTelemetry trace ID. + type: object + version: + description: Version defines the version of the application. For automatically + created KeptnApps, the version is a function of all KeptnWorkloads + that are part of the KeptnApp. + type: string + workloads: + description: Workloads is a list of all KeptnWorkloads that are part + of the KeptnApp. + items: + description: KeptnWorkloadRef refers to a KeptnWorkload that is + part of a KeptnApp + properties: + name: + description: Name is the name of the KeptnWorkload. + type: string + version: + description: Version is the version of the KeptnWorkload. + type: string + required: + - name + - version + type: object + type: array + required: + - appName + - version + type: object + status: + description: Status describes the current state of the KeptnAppVersion. + properties: + currentPhase: + description: CurrentPhase indicates the current phase of the KeptnAppVersion. + type: string + endTime: + description: EndTime represents the time at which the deployment of + the KeptnAppVersion finished. + format: date-time + type: string + phaseTraceIDs: + additionalProperties: + additionalProperties: + type: string + description: MapCarrier is a TextMapCarrier that uses a map held + in memory as a storage medium for propagated key-value pairs. + type: object + description: PhaseTraceIDs contains the trace IDs of the OpenTelemetry + spans of each phase of the KeptnAppVersion. + type: object + postDeploymentEvaluationStatus: + default: Pending + description: PostDeploymentEvaluationStatus indicates the current + status of the KeptnAppVersion's PostDeploymentEvaluation phase. + type: string + postDeploymentEvaluationTaskStatus: + description: PostDeploymentEvaluationTaskStatus indicates the current + state of each postDeploymentEvaluation of the KeptnAppVersion. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item + (Evaluation/Task) started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + postDeploymentStatus: + default: Pending + description: PostDeploymentStatus indicates the current status of + the KeptnAppVersion's PostDeployment phase. + type: string + postDeploymentTaskStatus: + description: PostDeploymentTaskStatus indicates the current state + of each postDeploymentTask of the KeptnAppVersion. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item + (Evaluation/Task) started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentEvaluationStatus: + default: Pending + description: PreDeploymentEvaluationStatus indicates the current status + of the KeptnAppVersion's PreDeploymentEvaluation phase. + type: string + preDeploymentEvaluationTaskStatus: + description: PreDeploymentEvaluationTaskStatus indicates the current + state of each preDeploymentEvaluation of the KeptnAppVersion. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item + (Evaluation/Task) started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentStatus: + default: Pending + description: PreDeploymentStatus indicates the current status of the + KeptnAppVersion's PreDeployment phase. + type: string + preDeploymentTaskStatus: + description: PreDeploymentTaskStatus indicates the current state of + each preDeploymentTask of the KeptnAppVersion. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item + (Evaluation/Task) started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + startTime: + description: StartTime represents the time at which the deployment + of the KeptnAppVersion started. + format: date-time + type: string + status: + default: Pending + description: Status represents the overall status of the KeptnAppVersion. + type: string + workloadOverallStatus: + default: Pending + description: WorkloadOverallStatus indicates the current status of + the KeptnAppVersion's Workload deployment phase. + type: string + workloadStatus: + description: WorkloadStatus contains the current status of each KeptnWorkload + that is part of the KeptnAppVersion. + items: + properties: + status: + default: Pending + description: Status indicates the current status of the KeptnWorkload. + type: string + workload: + description: Workload refers to a KeptnWorkload that is part + of the KeptnAppVersion. + properties: + name: + description: Name is the name of the KeptnWorkload. + type: string + version: + description: Version is the version of the KeptnWorkload. + type: string + required: + - name + - version + type: object + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + name: keptnconfigs.options.keptn.sh +spec: + group: options.keptn.sh + names: + kind: KeptnConfig + listKind: KeptnConfigList + plural: keptnconfigs + singular: keptnconfig + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnConfig is the Schema for the keptnconfigs 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 + spec: + description: KeptnConfigSpec defines the desired state of KeptnConfig + properties: + OTelCollectorUrl: + description: OTelCollectorUrl can be used to set the Open Telemetry + collector that the operator should use + type: string + keptnAppCreationRequestTimeoutSeconds: + default: 30 + description: KeptnAppCreationRequestTimeoutSeconds is used to set + the interval in which automatic app discovery searches for workload + to put into the same auto-generated KeptnApp + type: integer + type: object + status: + description: KeptnConfigStatus defines the observed state of KeptnConfig + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + name: keptnevaluationdefinitions.lifecycle.keptn.sh +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnEvaluationDefinition + listKind: KeptnEvaluationDefinitionList + plural: keptnevaluationdefinitions + shortNames: + - ked + singular: keptnevaluationdefinition + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnEvaluationDefinition is the Schema for the keptnevaluationdefinitions + 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 + spec: + description: KeptnEvaluationDefinitionSpec defines the desired state of + KeptnEvaluationDefinition + properties: + objectives: + items: + properties: + evaluationTarget: + type: string + name: + type: string + query: + type: string + required: + - evaluationTarget + - name + - query + type: object + type: array + source: + type: string + required: + - objectives + - source + type: object + status: + description: KeptnEvaluationDefinitionStatus defines the observed state + of KeptnEvaluationDefinition + type: object + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnEvaluationDefinition is the Schema for the keptnevaluationdefinitions + 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 + spec: + description: KeptnEvaluationDefinitionSpec defines the desired state of + KeptnEvaluationDefinition + properties: + objectives: + items: + properties: + evaluationTarget: + type: string + name: + type: string + query: + type: string + required: + - evaluationTarget + - name + - query + type: object + type: array + source: + type: string + required: + - objectives + - source + type: object + status: + description: KeptnEvaluationDefinitionStatus defines the observed state + of KeptnEvaluationDefinition + type: object + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnEvaluationDefinition is the Schema for the keptnevaluationdefinitions + 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 + spec: + description: Spec describes the desired state of the KeptnEvaluationDefinition. + properties: + objectives: + description: Objectives is a list of objectives that have to be met + for a KeptnEvaluation referencing this KeptnEvaluationDefinition + to be successful. + items: + properties: + evaluationTarget: + description: EvaluationTarget specifies the target value for + the references KeptnMetric. Needs to start with either '<' + or '>', followed by the target value (e.g. '<10'). + type: string + keptnMetricRef: + description: KeptnMetricRef references the KeptnMetric that + should be evaluated. + properties: + name: + description: Name is the name of the referenced KeptnMetric. + type: string + namespace: + description: Namespace is the namespace where the referenced + KeptnMetric is located. + type: string + required: + - name + type: object + required: + - evaluationTarget + - keptnMetricRef + type: object + type: array + required: + - objectives + type: object + status: + description: Status describes the current state of the KeptnEvaluationDefinition. + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + name: keptnevaluationproviders.lifecycle.keptn.sh +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: lifecycle-webhook-service + namespace: keptn-lifecycle-toolkit-system + path: /convert + conversionReviewVersions: + - v1 + group: lifecycle.keptn.sh + names: + kind: KeptnEvaluationProvider + listKind: KeptnEvaluationProviderList + plural: keptnevaluationproviders + shortNames: + - kep + singular: keptnevaluationprovider + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnEvaluationProvider is the Schema for the keptnevaluationproviders + 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 + spec: + description: KeptnEvaluationProviderSpec defines the desired state of + KeptnEvaluationProvider + properties: + secretName: + type: string + targetServer: + type: string + required: + - targetServer + type: object + status: + description: KeptnEvaluationProviderStatus defines the observed state + of KeptnEvaluationProvider + type: object + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnEvaluationProvider is the Schema for the keptnevaluationproviders + 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 + spec: + description: KeptnEvaluationProviderSpec defines the desired state of + KeptnEvaluationProvider + properties: + secretKeyRef: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must be a + valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + targetServer: + type: string + required: + - targetServer + type: object + status: + description: KeptnEvaluationProviderStatus defines the observed state + of KeptnEvaluationProvider + type: object + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnEvaluationProvider is the Schema for the keptnevaluationproviders + 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 + spec: + description: KeptnEvaluationProviderSpec defines the desired state of + KeptnEvaluationProvider + properties: + secretKeyRef: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must be a + valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + targetServer: + type: string + required: + - targetServer + type: object + status: + description: KeptnEvaluationProviderStatus defines the observed state + of KeptnEvaluationProvider + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + name: keptnevaluations.lifecycle.keptn.sh +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnEvaluation + listKind: KeptnEvaluationList + plural: keptnevaluations + shortNames: + - ke + singular: keptnevaluation + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.appName + name: AppName + type: string + - jsonPath: .spec.appVersion + name: AppVersion + type: string + - jsonPath: .spec.workload + name: WorkloadName + type: string + - jsonPath: .spec.workloadVersion + name: WorkloadVersion + type: string + - jsonPath: .status.retryCount + name: RetryCount + type: string + - jsonPath: .status.evaluationStatus + name: EvaluationStatus + type: string + - jsonPath: .status.overallStatus + name: OverallStatus + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnEvaluation is the Schema for the keptnevaluations 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 + spec: + description: KeptnEvaluationSpec defines the desired state of KeptnEvaluation + properties: + appName: + type: string + appVersion: + type: string + checkType: + type: string + evaluationDefinition: + type: string + failAction: + type: string + retries: + default: 10 + type: integer + retryInterval: + default: 5s + pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ + type: string + workload: + type: string + workloadVersion: + type: string + required: + - evaluationDefinition + - workloadVersion + type: object + status: + description: KeptnEvaluationStatus defines the observed state of KeptnEvaluation + properties: + endTime: + format: date-time + type: string + evaluationStatus: + additionalProperties: + properties: + message: + type: string + status: + type: string + value: + type: string + required: + - status + - value + type: object + type: object + overallStatus: + default: Pending + type: string + retryCount: + default: 0 + type: integer + startTime: + format: date-time + type: string + required: + - evaluationStatus + - overallStatus + - retryCount + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.appName + name: AppName + type: string + - jsonPath: .spec.appVersion + name: AppVersion + type: string + - jsonPath: .spec.workload + name: WorkloadName + type: string + - jsonPath: .spec.workloadVersion + name: WorkloadVersion + type: string + - jsonPath: .status.retryCount + name: RetryCount + type: string + - jsonPath: .status.evaluationStatus + name: EvaluationStatus + type: string + - jsonPath: .status.overallStatus + name: OverallStatus + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnEvaluation is the Schema for the keptnevaluations 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 + spec: + description: KeptnEvaluationSpec defines the desired state of KeptnEvaluation + properties: + appName: + type: string + appVersion: + type: string + checkType: + type: string + evaluationDefinition: + type: string + failAction: + type: string + retries: + default: 10 + type: integer + retryInterval: + default: 5s + pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ + type: string + workload: + type: string + workloadVersion: + type: string + required: + - evaluationDefinition + - workloadVersion + type: object + status: + description: KeptnEvaluationStatus defines the observed state of KeptnEvaluation + properties: + endTime: + format: date-time + type: string + evaluationStatus: + additionalProperties: + properties: + message: + type: string + status: + type: string + value: + type: string + required: + - status + - value + type: object + type: object + overallStatus: + default: Pending + type: string + retryCount: + default: 0 + type: integer + startTime: + format: date-time + type: string + required: + - evaluationStatus + - overallStatus + - retryCount + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.appName + name: AppName + type: string + - jsonPath: .spec.appVersion + name: AppVersion + type: string + - jsonPath: .spec.workload + name: WorkloadName + type: string + - jsonPath: .spec.workloadVersion + name: WorkloadVersion + type: string + - jsonPath: .status.retryCount + name: RetryCount + type: string + - jsonPath: .status.evaluationStatus + name: EvaluationStatus + type: string + - jsonPath: .status.overallStatus + name: OverallStatus + type: string + name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnEvaluation is the Schema for the keptnevaluations 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 + spec: + description: Spec describes the desired state of the KeptnEvaluation. + properties: + appName: + description: AppName defines the KeptnApp for which the KeptnEvaluation + is done. + type: string + appVersion: + description: AppVersion defines the version of the KeptnApp for which + the KeptnEvaluation is done. + type: string + checkType: + description: Type indicates whether the KeptnEvaluation is part of + the pre- or postDeployment phase. + type: string + evaluationDefinition: + description: EvaluationDefinition refers to the name of the KeptnEvaluationDefinition + which includes the objectives for the KeptnEvaluation. The KeptnEvaluationDefinition + can be located in the same namespace as the KeptnEvaluation, or + in the KLT namespace. + type: string + failAction: + type: string + retries: + default: 10 + description: Retries indicates how many times the KeptnEvaluation + can be attempted in the case of an error or missed evaluation objective, + before considering the KeptnEvaluation to be failed. + type: integer + retryInterval: + default: 5s + description: RetryInterval specifies the interval at which the KeptnEvaluation + is retried in the case of an error or a missed objective. + pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ + type: string + workload: + description: Workload defines the KeptnWorkload for which the KeptnEvaluation + is done. + type: string + workloadVersion: + description: WorkloadVersion defines the version of the KeptnWorkload + for which the KeptnEvaluation is done. + type: string + required: + - evaluationDefinition + - workloadVersion + type: object + status: + description: Status describes the current state of the KeptnEvaluation. + properties: + endTime: + description: EndTime represents the time at which the KeptnEvaluation + finished. + format: date-time + type: string + evaluationStatus: + additionalProperties: + properties: + message: + description: Message contains additional information about the + evaluation of an objective. This can include explanations + about why an evaluation has failed (e.g. due to a missed objective), + or if there was any error during the evaluation of the objective. + type: string + status: + description: Status indicates the status of the objective being + evaluated. + type: string + value: + description: Value represents the value of the KeptnMetric being + evaluated. + type: string + required: + - status + - value + type: object + description: EvaluationStatus describes the status of each objective + of the KeptnEvaluationDefinition referenced by the KeptnEvaluation. + type: object + overallStatus: + default: Pending + description: OverallStatus describes the overall status of the KeptnEvaluation. + The Overall status is derived from the status of the individual + objectives of the KeptnEvaluationDefinition referenced by the KeptnEvaluation. + type: string + retryCount: + default: 0 + description: RetryCount indicates how many times the KeptnEvaluation + has been attempted already. + type: integer + startTime: + description: StartTime represents the time at which the KeptnEvaluation + started. + format: date-time + type: string + required: + - evaluationStatus + - overallStatus + - retryCount + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + name: keptntaskdefinitions.lifecycle.keptn.sh +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnTaskDefinition + listKind: KeptnTaskDefinitionList + plural: keptntaskdefinitions + singular: keptntaskdefinition + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnTaskDefinition is the Schema for the keptntaskdefinitions + 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 + spec: + description: KeptnTaskDefinitionSpec defines the desired state of KeptnTaskDefinition + properties: + function: + properties: + configMapRef: + properties: + name: + type: string + type: object + functionRef: + properties: + name: + type: string + type: object + httpRef: + properties: + url: + type: string + type: object + inline: + properties: + code: + type: string + type: object + parameters: + properties: + map: + additionalProperties: + type: string + type: object + type: object + secureParameters: + properties: + secret: + type: string + type: object + type: object + type: object + status: + description: KeptnTaskDefinitionStatus defines the observed state of KeptnTaskDefinition + properties: + function: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed state + of cluster Important: Run "make" to regenerate code after modifying + this file' + properties: + configMap: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed + state of cluster Important: Run "make" to regenerate code after + modifying this file' + type: string + type: object + type: object + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnTaskDefinition is the Schema for the keptntaskdefinitions + 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 + spec: + description: KeptnTaskDefinitionSpec defines the desired state of KeptnTaskDefinition + properties: + function: + properties: + configMapRef: + properties: + name: + type: string + type: object + functionRef: + properties: + name: + type: string + type: object + httpRef: + properties: + url: + type: string + type: object + inline: + properties: + code: + type: string + type: object + parameters: + properties: + map: + additionalProperties: + type: string + type: object + type: object + secureParameters: + properties: + secret: + type: string + type: object + type: object + type: object + status: + description: KeptnTaskDefinitionStatus defines the observed state of KeptnTaskDefinition + properties: + function: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed state + of cluster Important: Run "make" to regenerate code after modifying + this file' + properties: + configMap: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed + state of cluster Important: Run "make" to regenerate code after + modifying this file' + type: string + type: object + type: object + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnTaskDefinition is the Schema for the keptntaskdefinitions + 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 + spec: + description: Spec describes the desired state of the KeptnTaskDefinition. + properties: + container: + description: Container contains the definition for the container that + is to be used in Job based on the KeptnTaskDefinitions. + properties: + args: + description: 'Arguments to the entrypoint. The container image''s + CMD is used if this is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. If a variable + cannot be resolved, the reference in the input string will be + unchanged. Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". Escaped references + will never be expanded, regardless of whether the variable exists + or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a shell. The + container image''s ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the reference + in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: + i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must be a + C_IDENTIFIER. All invalid keys will be reported as an event + when the container is starting. When a key exists in multiple + sources, the value associated with the last source will take + precedence. Values defined by an Env with a duplicate key will + take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source of a set of + ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each key + in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level config management + to default or override container images in workload controllers + like Deployments and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, IfNotPresent. + Defaults to Always if :latest tag is specified, or IfNotPresent + otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system should take in + response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. Other management + of the container blocks until the hook completes. More info: + https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', + etc) won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range 1 + to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported as + a LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range 1 + to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. The handler is not called if the container + crashes or exits. The Pod''s termination grace period countdown + begins before the PreStop hook is executed. Regardless of + the outcome of the handler, the container will eventually + terminate within the Pod''s termination grace period (unless + delayed by finalizers). Other management of the container + blocks until the hook completes or until the termination + grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', + etc) won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range 1 + to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported as + a LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range 1 + to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. More + info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. The command + is simply exec'd, it is not run inside a shell, so traditional + shell instructions ('|', etc) won't work. To use a shell, + you need to explicitly call out to that shell. Exit + status of 0 is treated as live/healthy and non-zero + is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to + be considered failed after having succeeded. Defaults to + 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + This is a beta field and requires enabling GRPCContainerProbe + feature gate. + properties: + port: + description: Port number of the gRPC service. Number must + be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior is + defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to + be used in HTTP probes + properties: + name: + description: The header field name. This will be + canonicalized upon output, so case-variant names + will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started + before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to + be considered successful after having failed. Defaults to + 1. Must be 1 for liveness and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to + terminate gracefully upon probe failure. The grace period + is the duration in seconds after the processes running in + the pod are sent a termination signal and the time when + the processes are forcibly halted with a kill signal. Set + this value longer than the expected cleanup time for your + process. If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides the value + provided by the pod spec. Value must be non-negative integer. + The value zero indicates stop immediately via the kill signal + (no opportunity to shut down). This is a beta field and + requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is + used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. Each + container in a pod must have a unique name (DNS_LABEL). Cannot + be updated. + type: string + ports: + description: List of ports to expose from the container. Not specifying + a port here DOES NOT prevent that port from being exposed. Any + port which is listening on the default "0.0.0.0" address inside + a container will be accessible from the network. Modifying this + array with strategic merge patch may corrupt the data. For more + information See https://github.com/kubernetes/kubernetes/issues/108255. + Cannot be updated. + items: + description: ContainerPort represents a network port in a single + container. + properties: + containerPort: + description: Number of port to expose on the pod's IP address. + This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If specified, + this must be a valid port number, 0 < x < 65536. If HostNetwork + is specified, this must match ContainerPort. Most containers + do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in a pod must + have a unique name. Name for the port that can be referred + to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. Container + will be removed from service endpoints if the probe fails. Cannot + be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. The command + is simply exec'd, it is not run inside a shell, so traditional + shell instructions ('|', etc) won't work. To use a shell, + you need to explicitly call out to that shell. Exit + status of 0 is treated as live/healthy and non-zero + is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to + be considered failed after having succeeded. Defaults to + 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + This is a beta field and requires enabling GRPCContainerProbe + feature gate. + properties: + port: + description: Port number of the gRPC service. Number must + be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior is + defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to + be used in HTTP probes + properties: + name: + description: The header field name. This will be + canonicalized upon output, so case-variant names + will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started + before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to + be considered successful after having failed. Defaults to + 1. Must be 1 for liveness and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to + terminate gracefully upon probe failure. The grace period + is the duration in seconds after the processes running in + the pod are sent a termination signal and the time when + the processes are forcibly halted with a kill signal. Set + this value longer than the expected cleanup time for your + process. If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides the value + provided by the pod spec. Value must be non-negative integer. + The value zero indicates stop immediately via the kill signal + (no opportunity to shut down). This is a beta field and + requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is + used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. Cannot + be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + 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 + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + 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 + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + securityContext: + description: 'SecurityContext defines the security options the + container should be run with. If set, the fields of SecurityContext + override the equivalent fields of PodSecurityContext. More info: + https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a + process can gain more privileges than its parent process. + This bool directly controls if the no_new_privs flag will + be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be set + when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the + container runtime. Note that this field cannot be set when + spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in + privileged containers are essentially equivalent to root + on the host. Defaults to false. Note that this field cannot + be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use + for the containers. The default is DefaultProcMount which + uses the container runtime defaults for readonly paths and + masked paths. This requires the ProcMountType feature flag + to be enabled. Note that this field cannot be set when spec.os.name + is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. Note that this field cannot be set when + spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail + to start the container if it does. If unset or false, no + such validation will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata if + unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in + PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & container + level, the container options override the pod options. Note + that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must + be preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must only be set if type is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a + profile defined in a file on the node should be used. + RuntimeDefault - the container runtime default profile + should be used. Unconfined - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is + linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. This field is + alpha-level and will only be honored by components that + enable the WindowsHostProcessContainers feature flag. + Setting this field without the feature flag will result + in errors when validating the Pod. All of a Pod's containers + must have the same effective HostProcess value (it is + not allowed to have a mix of HostProcess containers + and non-HostProcess containers). In addition, if HostProcess + is true then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in + PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. If this probe fails, the Pod will + be restarted, just as if the livenessProbe failed. This can + be used to provide different probe parameters at the beginning + of a Pod''s lifecycle, when it might take a long time to load + data or warm a cache, than during steady-state operation. This + cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. The command + is simply exec'd, it is not run inside a shell, so traditional + shell instructions ('|', etc) won't work. To use a shell, + you need to explicitly call out to that shell. Exit + status of 0 is treated as live/healthy and non-zero + is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to + be considered failed after having succeeded. Defaults to + 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + This is a beta field and requires enabling GRPCContainerProbe + feature gate. + properties: + port: + description: Port number of the gRPC service. Number must + be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior is + defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to + be used in HTTP probes + properties: + name: + description: The header field name. This will be + canonicalized upon output, so case-variant names + will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started + before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to + be considered successful after having failed. Defaults to + 1. Must be 1 for liveness and startup. Minimum value is + 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to + terminate gracefully upon probe failure. The grace period + is the duration in seconds after the processes running in + the pod are sent a termination signal and the time when + the processes are forcibly halted with a kill signal. Set + this value longer than the expected cleanup time for your + process. If this value is nil, the pod's terminationGracePeriodSeconds + will be used. Otherwise, this value overrides the value + provided by the pod spec. Value must be non-negative integer. + The value zero indicates stop immediately via the kill signal + (no opportunity to shut down). This is a beta field and + requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is + used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + stdin: + description: Whether this container should allocate a buffer for + stdin in the container runtime. If this is not set, reads from + stdin in the container will always result in EOF. Default is + false. + type: boolean + stdinOnce: + description: Whether the container runtime should close the stdin + channel after it has been opened by a single attach. When stdin + is true the stdin stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin is opened on container + start, is empty until the first client attaches to stdin, and + then remains open and accepts data until the client disconnects, + at which time stdin is closed and remains closed until the container + is restarted. If this flag is false, a container processes that + reads from stdin will never receive an EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which the container''s + termination message will be written is mounted into the container''s + filesystem. Message written is intended to be brief final status, + such as an assertion failure message. Will be truncated by the + node if greater than 4096 bytes. The total message length across + all containers will be limited to 12kb. Defaults to /dev/termination-log. + Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should be populated. + File will use the contents of terminationMessagePath to populate + the container status message on both success and failure. FallbackToLogsOnError + will use the last chunk of container log output if the termination + message file is empty and the container exited with an error. + The log output is limited to 2048 bytes or 80 lines, whichever + is smaller. Defaults to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate a TTY for + itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be + used by the container. + items: + description: volumeDevice describes a mapping of a raw block + device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container + that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume within + a container. + properties: + mountPath: + description: Path within the container at which the volume + should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are + propagated from the host to container and the other way + around. When not set, MountPropagationNone is used. This + field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which + the container's volume should be mounted. Behaves similarly + to SubPath but environment variable references $(VAR_NAME) + are expanded using the container's environment. Defaults + to "" (volume's root). SubPathExpr and SubPath are mutually + exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which might be + configured in the container image. Cannot be updated. + type: string + required: + - name + type: object + deno: + description: Deno contains the definition for the Deno function that + is to be executed in KeptnTasks based on the KeptnTaskDefinitions. + properties: + cmdParameters: + description: CmdParameters contains parameters that will be passed + to the command + type: string + configMapRef: + description: ConfigMapReference allows to reference a ConfigMap + containing the code of the function. When referencing a ConfigMap, + the code of the function must be available as a value of the + 'code' key of the referenced ConfigMap. + properties: + name: + description: Name is the name of the referenced ConfigMap. + type: string + type: object + functionRef: + description: FunctionReference allows to reference another KeptnTaskDefinition + which contains the source code of the function to be executes + for KeptnTasks based on this KeptnTaskDefinition. This can be + useful when you have multiple KeptnTaskDefinitions that should + execute the same logic, but each with different parameters. + properties: + name: + description: Name is the name of the referenced KeptnTaksDefinition. + type: string + type: object + httpRef: + description: HttpReference allows to point to an HTTP URL containing + the code of the function. + properties: + url: + description: Url is the URL containing the code of the function. + type: string + type: object + inline: + description: Inline allows to specify the code that should be + executed directly in the KeptnTaskDefinition, as a multi-line + string. + properties: + code: + description: Code contains the code of the function. + type: string + type: object + parameters: + description: Parameters contains parameters that will be passed + to the job that executes the task as env variables. + properties: + map: + additionalProperties: + type: string + description: Inline contains the parameters that will be made + available to the job executing the KeptnTask via the 'DATA' + environment variable. The 'DATA' environment variable's + content will be a json encoded string containing all properties + of the map provided. + type: object + type: object + secureParameters: + description: SecureParameters contains secure parameters that + will be passed to the job that executes the task. These will + be stored and accessed as secrets in the cluster. + properties: + secret: + description: Secret contains the parameters that will be made + available to the job executing the KeptnTask via the 'SECRET_DATA' + environment variable. The 'SECRET_DATA' environment variable's + content will the same as value of the 'SECRET_DATA' key + of the referenced secret. + type: string + type: object + type: object + function: + description: Deprecated Function contains the definition for the function + that is to be executed in KeptnTasks based on the KeptnTaskDefinitions. + properties: + cmdParameters: + description: CmdParameters contains parameters that will be passed + to the command + type: string + configMapRef: + description: ConfigMapReference allows to reference a ConfigMap + containing the code of the function. When referencing a ConfigMap, + the code of the function must be available as a value of the + 'code' key of the referenced ConfigMap. + properties: + name: + description: Name is the name of the referenced ConfigMap. + type: string + type: object + functionRef: + description: FunctionReference allows to reference another KeptnTaskDefinition + which contains the source code of the function to be executes + for KeptnTasks based on this KeptnTaskDefinition. This can be + useful when you have multiple KeptnTaskDefinitions that should + execute the same logic, but each with different parameters. + properties: + name: + description: Name is the name of the referenced KeptnTaksDefinition. + type: string + type: object + httpRef: + description: HttpReference allows to point to an HTTP URL containing + the code of the function. + properties: + url: + description: Url is the URL containing the code of the function. + type: string + type: object + inline: + description: Inline allows to specify the code that should be + executed directly in the KeptnTaskDefinition, as a multi-line + string. + properties: + code: + description: Code contains the code of the function. + type: string + type: object + parameters: + description: Parameters contains parameters that will be passed + to the job that executes the task as env variables. + properties: + map: + additionalProperties: + type: string + description: Inline contains the parameters that will be made + available to the job executing the KeptnTask via the 'DATA' + environment variable. The 'DATA' environment variable's + content will be a json encoded string containing all properties + of the map provided. + type: object + type: object + secureParameters: + description: SecureParameters contains secure parameters that + will be passed to the job that executes the task. These will + be stored and accessed as secrets in the cluster. + properties: + secret: + description: Secret contains the parameters that will be made + available to the job executing the KeptnTask via the 'SECRET_DATA' + environment variable. The 'SECRET_DATA' environment variable's + content will the same as value of the 'SECRET_DATA' key + of the referenced secret. + type: string + type: object + type: object + python: + description: Python contains the definition for the python function + that is to be executed in KeptnTasks based on the KeptnTaskDefinitions. + properties: + cmdParameters: + description: CmdParameters contains parameters that will be passed + to the command + type: string + configMapRef: + description: ConfigMapReference allows to reference a ConfigMap + containing the code of the function. When referencing a ConfigMap, + the code of the function must be available as a value of the + 'code' key of the referenced ConfigMap. + properties: + name: + description: Name is the name of the referenced ConfigMap. + type: string + type: object + functionRef: + description: FunctionReference allows to reference another KeptnTaskDefinition + which contains the source code of the function to be executes + for KeptnTasks based on this KeptnTaskDefinition. This can be + useful when you have multiple KeptnTaskDefinitions that should + execute the same logic, but each with different parameters. + properties: + name: + description: Name is the name of the referenced KeptnTaksDefinition. + type: string + type: object + httpRef: + description: HttpReference allows to point to an HTTP URL containing + the code of the function. + properties: + url: + description: Url is the URL containing the code of the function. + type: string + type: object + inline: + description: Inline allows to specify the code that should be + executed directly in the KeptnTaskDefinition, as a multi-line + string. + properties: + code: + description: Code contains the code of the function. + type: string + type: object + parameters: + description: Parameters contains parameters that will be passed + to the job that executes the task as env variables. + properties: + map: + additionalProperties: + type: string + description: Inline contains the parameters that will be made + available to the job executing the KeptnTask via the 'DATA' + environment variable. The 'DATA' environment variable's + content will be a json encoded string containing all properties + of the map provided. + type: object + type: object + secureParameters: + description: SecureParameters contains secure parameters that + will be passed to the job that executes the task. These will + be stored and accessed as secrets in the cluster. + properties: + secret: + description: Secret contains the parameters that will be made + available to the job executing the KeptnTask via the 'SECRET_DATA' + environment variable. The 'SECRET_DATA' environment variable's + content will the same as value of the 'SECRET_DATA' key + of the referenced secret. + type: string + type: object + type: object + retries: + default: 10 + description: Retries specifies how many times a job executing the + KeptnTaskDefinition should be restarted in the case of an unsuccessful + attempt. + format: int32 + type: integer + timeout: + default: 5m + description: Timeout specifies the maximum time to wait for the task + to be completed successfully. If the task does not complete successfully + within this time frame, it will be considered to be failed. + pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ + type: string + type: object + status: + description: Status describes the current state of the KeptnTaskDefinition. + properties: + function: + description: Function contains status information of the function + definition for the task. + properties: + configMap: + description: ConfigMap indicates the ConfigMap in which the function + code is stored. + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + name: keptntasks.lifecycle.keptn.sh +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnTask + listKind: KeptnTaskList + plural: keptntasks + singular: keptntask + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.appVersion + name: AppVersion + type: string + - jsonPath: .spec.workload + name: WorkloadName + type: string + - jsonPath: .spec.workloadVersion + name: WorkloadVersion + type: string + - jsonPath: .status.jobName + name: Job Name + type: string + - jsonPath: .status.status + name: Status + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnTask is the Schema for the keptntasks 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 + spec: + description: KeptnTaskSpec defines the desired state of KeptnTask + properties: + app: + type: string + appVersion: + type: string + checkType: + type: string + context: + properties: + appName: + type: string + appVersion: + type: string + objectType: + type: string + taskType: + type: string + workloadName: + type: string + workloadVersion: + type: string + required: + - appName + - appVersion + - objectType + - taskType + - workloadName + - workloadVersion + type: object + parameters: + properties: + map: + additionalProperties: + type: string + type: object + type: object + secureParameters: + properties: + secret: + type: string + type: object + taskDefinition: + type: string + workload: + type: string + workloadVersion: + type: string + required: + - app + - appVersion + - context + - taskDefinition + - workload + - workloadVersion + type: object + status: + description: KeptnTaskStatus defines the observed state of KeptnTask + properties: + endTime: + format: date-time + type: string + jobName: + type: string + message: + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.appVersion + name: AppVersion + type: string + - jsonPath: .spec.workload + name: WorkloadName + type: string + - jsonPath: .spec.workloadVersion + name: WorkloadVersion + type: string + - jsonPath: .status.jobName + name: Job Name + type: string + - jsonPath: .status.status + name: Status + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnTask is the Schema for the keptntasks 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 + spec: + description: KeptnTaskSpec defines the desired state of KeptnTask + properties: + app: + type: string + appVersion: + type: string + checkType: + type: string + context: + properties: + appName: + type: string + appVersion: + type: string + objectType: + type: string + taskType: + type: string + workloadName: + type: string + workloadVersion: + type: string + required: + - appName + - appVersion + - objectType + - taskType + - workloadName + - workloadVersion + type: object + parameters: + properties: + map: + additionalProperties: + type: string + type: object + type: object + secureParameters: + properties: + secret: + type: string + type: object + taskDefinition: + type: string + workload: + type: string + workloadVersion: + type: string + required: + - app + - appVersion + - context + - taskDefinition + - workload + - workloadVersion + type: object + status: + description: KeptnTaskStatus defines the observed state of KeptnTask + properties: + endTime: + format: date-time + type: string + jobName: + type: string + message: + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.appVersion + name: AppVersion + type: string + - jsonPath: .spec.workload + name: WorkloadName + type: string + - jsonPath: .spec.workloadVersion + name: WorkloadVersion + type: string + - jsonPath: .status.jobName + name: Job Name + type: string + - jsonPath: .status.status + name: Status + type: string + name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnTask is the Schema for the keptntasks 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 + spec: + description: Spec describes the desired state of the KeptnTask. + properties: + app: + description: AppName defines the KeptnApp for which the KeptnTask + is executed. + type: string + appVersion: + description: AppVersion defines the version of the KeptnApp for which + the KeptnTask is executed. + type: string + checkType: + description: Type indicates whether the KeptnTask is part of the pre- + or postDeployment phase. + type: string + context: + description: Context contains contextual information about the task + execution. + properties: + appName: + description: AppName the name of the KeptnApp the KeptnTask is + being executed for. + type: string + appVersion: + description: AppVersion the version of the KeptnApp the KeptnTask + is being executed for. + type: string + objectType: + description: ObjectType indicates whether the KeptnTask is being + executed for a KeptnApp or KeptnWorkload. + type: string + taskType: + description: TaskType indicates whether the KeptnTask is part + of the pre- or postDeployment phase. + type: string + workloadName: + description: WorkloadName the name of the KeptnWorkload the KeptnTask + is being executed for. + type: string + workloadVersion: + description: WorkloadVersion the version of the KeptnWorkload + the KeptnTask is being executed for. + type: string + required: + - appName + - appVersion + - objectType + - taskType + - workloadName + - workloadVersion + type: object + parameters: + description: Parameters contains parameters that will be passed to + the job that executes the task. + properties: + map: + additionalProperties: + type: string + description: Inline contains the parameters that will be made + available to the job executing the KeptnTask via the 'DATA' + environment variable. The 'DATA' environment variable's content + will be a json encoded string containing all properties of the + map provided. + type: object + type: object + retries: + default: 10 + description: Retries indicates how many times the KeptnTask can be + attempted in the case of an error before considering the KeptnTask + to be failed. + format: int32 + type: integer + secureParameters: + description: SecureParameters contains secure parameters that will + be passed to the job that executes the task. These will be stored + and accessed as secrets in the cluster. + properties: + secret: + description: Secret contains the parameters that will be made + available to the job executing the KeptnTask via the 'SECRET_DATA' + environment variable. The 'SECRET_DATA' environment variable's + content will the same as value of the 'SECRET_DATA' key of the + referenced secret. + type: string + type: object + taskDefinition: + description: TaskDefinition refers to the name of the KeptnTaskDefinition + which includes the specification for the task to be performed. The + KeptnTaskDefinition can be located in the same namespace as the + KeptnTask, or in the KLT namespace. + type: string + timeout: + default: 5m + description: Timeout specifies the maximum time to wait for the task + to be completed successfully. If the task does not complete successfully + within this time frame, it will be considered to be failed. + pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ + type: string + workload: + description: Workload defines the KeptnWorkload for which the KeptnTask + is executed. + type: string + workloadVersion: + description: WorkloadVersion defines the version of the KeptnWorkload + for which the KeptnTask is executed. + type: string + required: + - app + - appVersion + - context + - taskDefinition + - workload + - workloadVersion + type: object + status: + description: Status describes the current state of the KeptnTask. + properties: + endTime: + description: EndTime represents the time at which the KeptnTask finished. + format: date-time + type: string + jobName: + description: JobName is the name of the Job executing the Task. + type: string + message: + description: Message contains information about unexpected errors + encountered during the execution of the KeptnTask. + type: string + reason: + description: Reason contains more information about the reason for + the last transition of the Job executing the KeptnTask. + type: string + startTime: + description: StartTime represents the time at which the KeptnTask + started. + format: date-time + type: string + status: + default: Pending + description: Status represents the overall state of the KeptnTask. + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + name: keptnworkloadinstances.lifecycle.keptn.sh +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: lifecycle-webhook-service + namespace: keptn-lifecycle-toolkit-system + path: /convert + conversionReviewVersions: + - v1 + group: lifecycle.keptn.sh + names: + kind: KeptnWorkloadInstance + listKind: KeptnWorkloadInstanceList + plural: keptnworkloadinstances + shortNames: + - kwi + singular: keptnworkloadinstance + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.workloadName + name: WorkloadName + type: string + - jsonPath: .spec.version + name: WorkloadVersion + type: string + - jsonPath: .status.currentPhase + name: Phase + type: string + - jsonPath: .status.preDeploymentStatus + name: PreDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.preDeploymentEvaluationStatus + name: PreDeploymentEvaluationStatus + priority: 1 + type: string + - jsonPath: .status.deploymentStatus + name: DeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentStatus + name: PostDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentEvaluationStatus + name: PostDeploymentEvaluationStatus + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnWorkloadInstance is the Schema for the keptnworkloadinstances + 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 + spec: + description: KeptnWorkloadInstanceSpec defines the desired state of KeptnWorkloadInstance + properties: + app: + type: string + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + previousVersion: + type: string + resourceReference: + properties: + kind: + type: string + name: + type: string + uid: + description: UID is a type that holds unique ID values, including + UUIDs. Because we don't ONLY use UUIDs, this is an alias to + string. Being a type captures intent and helps make sure that + UIDs and names do not get conflated. + type: string + required: + - kind + - name + - uid + type: object + traceId: + additionalProperties: + type: string + type: object + version: + type: string + workloadName: + type: string + required: + - app + - resourceReference + - version + - workloadName + type: object + status: + description: KeptnWorkloadInstanceStatus defines the observed state of + KeptnWorkloadInstance + properties: + currentPhase: + type: string + deploymentStatus: + default: Pending + type: string + endTime: + format: date-time + type: string + phaseTraceIDs: + additionalProperties: + additionalProperties: + type: string + description: MapCarrier is a TextMapCarrier that uses a map held + in memory as a storage medium for propagated key-value pairs. + type: object + type: object + postDeploymentEvaluationStatus: + default: Pending + type: string + postDeploymentEvaluationTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + evaluationDefinitionName: + type: string + evaluationName: + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + postDeploymentStatus: + default: Pending + type: string + postDeploymentTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + taskDefinitionName: + type: string + taskName: + type: string + type: object + type: array + preDeploymentEvaluationStatus: + default: Pending + type: string + preDeploymentEvaluationTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + evaluationDefinitionName: + type: string + evaluationName: + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentStatus: + default: Pending + type: string + preDeploymentTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + taskDefinitionName: + type: string + taskName: + type: string + type: object + type: array + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.workloadName + name: WorkloadName + type: string + - jsonPath: .spec.version + name: WorkloadVersion + type: string + - jsonPath: .status.currentPhase + name: Phase + type: string + - jsonPath: .status.preDeploymentStatus + name: PreDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.preDeploymentEvaluationStatus + name: PreDeploymentEvaluationStatus + priority: 1 + type: string + - jsonPath: .status.deploymentStatus + name: DeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentStatus + name: PostDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentEvaluationStatus + name: PostDeploymentEvaluationStatus + priority: 1 + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnWorkloadInstance is the Schema for the keptnworkloadinstances + 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 + spec: + description: KeptnWorkloadInstanceSpec defines the desired state of KeptnWorkloadInstance + properties: + app: + type: string + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + previousVersion: + type: string + resourceReference: + properties: + kind: + type: string + name: + type: string + uid: + description: UID is a type that holds unique ID values, including + UUIDs. Because we don't ONLY use UUIDs, this is an alias to + string. Being a type captures intent and helps make sure that + UIDs and names do not get conflated. + type: string + required: + - kind + - name + - uid + type: object + traceId: + additionalProperties: + type: string + type: object + version: + type: string + workloadName: + type: string + required: + - app + - resourceReference + - version + - workloadName + type: object + status: + description: KeptnWorkloadInstanceStatus defines the observed state of + KeptnWorkloadInstance + properties: + currentPhase: + type: string + deploymentStatus: + default: Pending + type: string + endTime: + format: date-time + type: string + phaseTraceIDs: + additionalProperties: + additionalProperties: + type: string + description: MapCarrier is a TextMapCarrier that uses a map held + in memory as a storage medium for propagated key-value pairs. + type: object + type: object + postDeploymentEvaluationStatus: + default: Pending + type: string + postDeploymentEvaluationTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + postDeploymentStatus: + default: Pending + type: string + postDeploymentTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentEvaluationStatus: + default: Pending + type: string + preDeploymentEvaluationTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentStatus: + default: Pending + type: string + preDeploymentTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.workloadName + name: WorkloadName + type: string + - jsonPath: .spec.version + name: WorkloadVersion + type: string + - jsonPath: .status.currentPhase + name: Phase + type: string + - jsonPath: .status.preDeploymentStatus + name: PreDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.preDeploymentEvaluationStatus + name: PreDeploymentEvaluationStatus + priority: 1 + type: string + - jsonPath: .status.deploymentStatus + name: DeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentStatus + name: PostDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentEvaluationStatus + name: PostDeploymentEvaluationStatus + priority: 1 + type: string + name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnWorkloadInstance is the Schema for the keptnworkloadinstances + 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 + spec: + description: Spec describes the desired state of the KeptnWorkloadInstance. + properties: + app: + description: AppName is the name of the KeptnApp containing the KeptnWorkload. + type: string + postDeploymentEvaluations: + description: PostDeploymentEvaluations is a list of all evaluations + to be performed during the post-deployment phase of the KeptnWorkload. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnWorkload, or in the KLT + namespace. + items: + type: string + type: array + postDeploymentTasks: + description: PostDeploymentTasks is a list of all tasks to be performed + during the post-deployment phase of the KeptnWorkload. The items + of this list refer to the names of KeptnTaskDefinitions located + in the same namespace as the KeptnWorkload, or in the KLT namespace. + items: + type: string + type: array + preDeploymentEvaluations: + description: PreDeploymentEvaluations is a list of all evaluations + to be performed during the pre-deployment phase of the KeptnWorkload. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnWorkload, or in the KLT + namespace. + items: + type: string + type: array + preDeploymentTasks: + description: PreDeploymentTasks is a list of all tasks to be performed + during the pre-deployment phase of the KeptnWorkload. The items + of this list refer to the names of KeptnTaskDefinitions located + in the same namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + previousVersion: + description: PreviousVersion is the version of the KeptnWorkload that + has been deployed prior to this version. + type: string + resourceReference: + description: ResourceReference is a reference to the Kubernetes resource + (Deployment, DaemonSet, StatefulSet or ReplicaSet) the KeptnWorkload + is representing. + properties: + kind: + type: string + name: + type: string + uid: + description: UID is a type that holds unique ID values, including + UUIDs. Because we don't ONLY use UUIDs, this is an alias to + string. Being a type captures intent and helps make sure that + UIDs and names do not get conflated. + type: string + required: + - kind + - name + - uid + type: object + traceId: + additionalProperties: + type: string + description: TraceId contains the OpenTelemetry trace ID. + type: object + version: + description: Version defines the version of the KeptnWorkload. + type: string + workloadName: + description: WorkloadName is the name of the KeptnWorkload. + type: string + required: + - app + - resourceReference + - version + - workloadName + type: object + status: + description: Status describes the current state of the KeptnWorkloadInstance. + properties: + currentPhase: + description: 'CurrentPhase indicates the current phase of the KeptnWorkloadInstance. + This can be: - PreDeploymentTasks - PreDeploymentEvaluations - Deployment + - PostDeploymentTasks - PostDeploymentEvaluations' + type: string + deploymentStatus: + default: Pending + description: DeploymentStatus indicates the current status of the + KeptnWorkloadInstance's Deployment phase. + type: string + endTime: + description: EndTime represents the time at which the deployment of + the KeptnWorkloadInstance finished. + format: date-time + type: string + phaseTraceIDs: + additionalProperties: + additionalProperties: + type: string + description: MapCarrier is a TextMapCarrier that uses a map held + in memory as a storage medium for propagated key-value pairs. + type: object + description: PhaseTraceIDs contains the trace IDs of the OpenTelemetry + spans of each phase of the KeptnWorkloadInstance + type: object + postDeploymentEvaluationStatus: + default: Pending + description: PostDeploymentEvaluationStatus indicates the current + status of the KeptnWorkloadInstance's PostDeploymentEvaluation phase. + type: string + postDeploymentEvaluationTaskStatus: + description: PostDeploymentEvaluationTaskStatus indicates the current + state of each postDeploymentEvaluation of the KeptnWorkloadInstance. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item + (Evaluation/Task) started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + postDeploymentStatus: + default: Pending + description: PostDeploymentStatus indicates the current status of + the KeptnWorkloadInstance's PostDeployment phase. + type: string + postDeploymentTaskStatus: + description: PostDeploymentTaskStatus indicates the current state + of each postDeploymentTask of the KeptnWorkloadInstance. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item + (Evaluation/Task) started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentEvaluationStatus: + default: Pending + description: PreDeploymentEvaluationStatus indicates the current status + of the KeptnWorkloadInstance's PreDeploymentEvaluation phase. + type: string + preDeploymentEvaluationTaskStatus: + description: PreDeploymentEvaluationTaskStatus indicates the current + state of each preDeploymentEvaluation of the KeptnWorkloadInstance. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item + (Evaluation/Task) started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentStatus: + default: Pending + description: PreDeploymentStatus indicates the current status of the + KeptnWorkloadInstance's PreDeployment phase. + type: string + preDeploymentTaskStatus: + description: PreDeploymentTaskStatus indicates the current state of + each preDeploymentTask of the KeptnWorkloadInstance. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item + (Evaluation/Task) started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + startTime: + description: StartTime represents the time at which the deployment + of the KeptnWorkloadInstance started. + format: date-time + type: string + status: + default: Pending + description: Status represents the overall status of the KeptnWorkloadInstance. + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + name: keptnworkloads.lifecycle.keptn.sh +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnWorkload + listKind: KeptnWorkloadList + plural: keptnworkloads + singular: keptnworkload + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.version + name: Version + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnWorkload is the Schema for the keptnworkloads 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 + spec: + description: KeptnWorkloadSpec defines the desired state of KeptnWorkload + properties: + app: + type: string + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + resourceReference: + properties: + kind: + type: string + name: + type: string + uid: + description: UID is a type that holds unique ID values, including + UUIDs. Because we don't ONLY use UUIDs, this is an alias to + string. Being a type captures intent and helps make sure that + UIDs and names do not get conflated. + type: string + required: + - kind + - name + - uid + type: object + version: + type: string + required: + - app + - resourceReference + - version + type: object + status: + description: KeptnWorkloadStatus defines the observed state of KeptnWorkload + properties: + currentVersion: + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.version + name: Version + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnWorkload is the Schema for the keptnworkloads 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 + spec: + description: KeptnWorkloadSpec defines the desired state of KeptnWorkload + properties: + app: + type: string + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + resourceReference: + properties: + kind: + type: string + name: + type: string + uid: + description: UID is a type that holds unique ID values, including + UUIDs. Because we don't ONLY use UUIDs, this is an alias to + string. Being a type captures intent and helps make sure that + UIDs and names do not get conflated. + type: string + required: + - kind + - name + - uid + type: object + version: + type: string + required: + - app + - resourceReference + - version + type: object + status: + description: KeptnWorkloadStatus defines the observed state of KeptnWorkload + properties: + currentVersion: + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.version + name: Version + type: string + name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnWorkload is the Schema for the keptnworkloads 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 + spec: + description: Spec describes the desired state of the KeptnWorkload. + properties: + app: + description: AppName is the name of the KeptnApp containing the KeptnWorkload. + type: string + postDeploymentEvaluations: + description: PostDeploymentEvaluations is a list of all evaluations + to be performed during the post-deployment phase of the KeptnWorkload. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnWorkload, or in the KLT + namespace. + items: + type: string + type: array + postDeploymentTasks: + description: PostDeploymentTasks is a list of all tasks to be performed + during the post-deployment phase of the KeptnWorkload. The items + of this list refer to the names of KeptnTaskDefinitions located + in the same namespace as the KeptnWorkload, or in the KLT namespace. + items: + type: string + type: array + preDeploymentEvaluations: + description: PreDeploymentEvaluations is a list of all evaluations + to be performed during the pre-deployment phase of the KeptnWorkload. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnWorkload, or in the KLT + namespace. + items: + type: string + type: array + preDeploymentTasks: + description: PreDeploymentTasks is a list of all tasks to be performed + during the pre-deployment phase of the KeptnWorkload. The items + of this list refer to the names of KeptnTaskDefinitions located + in the same namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + resourceReference: + description: ResourceReference is a reference to the Kubernetes resource + (Deployment, DaemonSet, StatefulSet or ReplicaSet) the KeptnWorkload + is representing. + properties: + kind: + type: string + name: + type: string + uid: + description: UID is a type that holds unique ID values, including + UUIDs. Because we don't ONLY use UUIDs, this is an alias to + string. Being a type captures intent and helps make sure that + UIDs and names do not get conflated. + type: string + required: + - kind + - name + - uid + type: object + version: + description: Version defines the version of the KeptnWorkload. + type: string + required: + - app + - resourceReference + - version + type: object + status: + description: Status describes the current state of the KeptnWorkload. + properties: + currentVersion: + description: CurrentVersion indicates the version that is currently + deployed or being reconciled. + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: lifecycle-operator + namespace: keptn-lifecycle-toolkit-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: lifecycle-operator-leader-election-role + namespace: keptn-lifecycle-toolkit-system +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: lifecycle-operator-role +rules: +- apiGroups: + - apps + resources: + - daemonsets + - deployments + - replicasets + - statefulsets + verbs: + - get + - list + - watch +- apiGroups: + - argoproj.io + resources: + - rollouts + verbs: + - get + - list + - watch +- apiGroups: + - batch + resources: + - jobs + verbs: + - create + - get + - list + - update + - watch +- apiGroups: + - batch + resources: + - jobs/status + verbs: + - get + - list +- apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - get + - list + - update + - watch +- apiGroups: + - "" + resources: + - deployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch + - watch +- apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - pods + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - secrets + verbs: + - get +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappcreationrequests + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappcreationrequests/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappcreationrequests/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnapps + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnapps/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnapps/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappversion + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappversion/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappversion/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappversions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappversions/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappversions/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnevaluationdefinitions + verbs: + - get + - list + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnevaluationproviders + verbs: + - get + - list + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnevaluations + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnevaluations/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnevaluations/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptntaskdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptntaskdefinitions/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptntaskdefinitions/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptntasks + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptntasks/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptntasks/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnworkloadinstances + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnworkloadinstances/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnworkloadinstances/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnworkloads + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnworkloads/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnworkloads/status + verbs: + - get + - patch + - update +- apiGroups: + - metrics.keptn.sh + resources: + - keptnmetrics + verbs: + - get + - list + - watch +- apiGroups: + - options.keptn.sh + resources: + - keptnconfigs + verbs: + - get + - list + - watch +- apiGroups: + - options.keptn.sh + resources: + - keptnconfigs/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: lifecycle-operator-leader-election-rolebinding + namespace: keptn-lifecycle-toolkit-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: lifecycle-operator-leader-election-role +subjects: +- kind: ServiceAccount + name: lifecycle-operator + namespace: keptn-lifecycle-toolkit-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: lifecycle-operator-rolebinding + namespace: keptn-lifecycle-toolkit-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: lifecycle-operator-role +subjects: +- kind: ServiceAccount + name: lifecycle-operator + namespace: keptn-lifecycle-toolkit-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: lifecycle-operator-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: lifecycle-operator-role +subjects: +- kind: ServiceAccount + name: lifecycle-operator + namespace: keptn-lifecycle-toolkit-system +--- +apiVersion: v1 +data: + controller_manager_config.yaml: | + apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 + kind: ControllerManagerConfig + health: + healthProbeBindAddress: :8081 + metrics: + bindAddress: 127.0.0.1:8080 + webhook: + port: 9443 + leaderElection: + leaderElect: true + resourceName: 6b866dd9.keptn.sh + + # leaderElectionReleaseOnCancel defines if the leader should step down volume + # when the Manager ends. This requires the binary to immediately end when the + # Manager is stopped, otherwise, this setting is unsafe. Setting this significantly + # speeds up voluntary leader transitions as the new leader don't have to wait + # LeaseDuration time first. + # In the default scaffold provided, the program ends immediately after + # the manager stops, so would be fine to enable this option. However, + # if you are doing or is intended to do any operation such as perform cleanups + # after the manager stops then its usage might be unsafe. + # leaderElectionReleaseOnCancel: true +kind: ConfigMap +metadata: + name: lifecycle-manager-config + namespace: keptn-lifecycle-toolkit-system +--- +apiVersion: v1 +kind: Service +metadata: + labels: + control-plane: lifecycle-operator + name: lifecycle-operator-metrics-service + namespace: keptn-lifecycle-toolkit-system +spec: + ports: + - name: metrics + port: 2222 + protocol: TCP + targetPort: metrics + selector: + control-plane: lifecycle-operator +--- +apiVersion: v1 +kind: Service +metadata: + name: lifecycle-webhook-service + namespace: keptn-lifecycle-toolkit-system +spec: + ports: + - port: 443 + protocol: TCP + targetPort: 9443 + selector: + control-plane: lifecycle-operator +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + control-plane: lifecycle-operator + keptn.sh/inject-cert: "true" + name: lifecycle-operator + namespace: keptn-lifecycle-toolkit-system +spec: + replicas: 1 + selector: + matchLabels: + control-plane: lifecycle-operator + template: + metadata: + annotations: + kubectl.kubernetes.io/default-container: manager + metrics.dynatrace.com/port: "2222" + metrics.dynatrace.com/scrape: "true" + labels: + control-plane: lifecycle-operator + spec: + containers: + - args: + - webhook-server + - --leader-elect + - --adapter-port=6443 + - --adapter-certs-dir=/tmp/metrics-adapter/serving-certs + - --v=10 + command: + - /manager + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: FUNCTION_RUNNER_IMAGE + value: ghcr.io/keptn/functions-runtime:v0.8.0 + - name: PYTHON_RUNNER_IMAGE + value: ghcr.io/keptn/python-runtime:v0.8.0 + - name: OTEL_COLLECTOR_URL + value: otel-collector:4317 + - name: KEPTN_APP_CONTROLLER_LOG_LEVEL + value: "0" + - name: KEPTN_APP_CREATION_REQUEST_CONTROLLER_LOG_LEVEL + value: "0" + - name: KEPTN_APP_VERSION_CONTROLLER_LOG_LEVEL + value: "0" + - name: KEPTN_EVALUATION_CONTROLLER_LOG_LEVEL + value: "0" + - name: KEPTN_TASK_CONTROLLER_LOG_LEVEL + value: "0" + - name: KEPTN_TASK_DEFINITION_CONTROLLER_LOG_LEVEL + value: "0" + - name: KEPTN_WORKLOAD_CONTROLLER_LOG_LEVEL + value: "0" + - name: KEPTN_WORKLOAD_INSTANCE_CONTROLLER_LOG_LEVEL + value: "0" + - name: OPTIONS_CONTROLLER_LOG_LEVEL + value: "0" + image: ghcr.io/keptn/lifecycle-operator:v0.8.0 + imagePullPolicy: Always + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + name: manager + ports: + - containerPort: 9443 + name: webhook-server + protocol: TCP + - containerPort: 2222 + name: metrics + protocol: TCP + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + privileged: false + runAsGroup: 65532 + runAsNonRoot: true + runAsUser: 65532 + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs/ + name: certs-dir + - mountPath: /tmp/metrics-adapter/serving-certs + name: adapter-certs-dir + securityContext: + runAsNonRoot: true + serviceAccountName: lifecycle-operator + terminationGracePeriodSeconds: 10 + volumes: + - emptyDir: {} + name: certs-dir + - emptyDir: {} + name: adapter-certs-dir +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: MutatingWebhookConfiguration +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + keptn.sh/inject-cert: "true" + name: lifecycle-mutating-webhook-configuration +webhooks: +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: lifecycle-webhook-service + namespace: keptn-lifecycle-toolkit-system + path: /mutate-v1-pod + failurePolicy: Fail + name: mpod.keptn.sh + namespaceSelector: + matchExpressions: + - key: control-plane + operator: NotIn + values: + - lifecycle-operator + - key: kubernetes.io/metadata.name + operator: NotIn + values: + - kube-system + - kube-public + - kube-node-lease + - cert-manager + - keptn-lifecycle-toolkit-system + - observability + - monitoring + rules: + - apiGroups: + - "" + apiVersions: + - v1 + operations: + - CREATE + - UPDATE + resources: + - pods + sideEffects: None +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + creationTimestamp: null + labels: + keptn.sh/inject-cert: "true" + name: lifecycle-validating-webhook-configuration +webhooks: +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: lifecycle-webhook-service + namespace: keptn-lifecycle-toolkit-system + path: /validate-lifecycle-keptn-sh-v1alpha3-keptntaskdefinition + failurePolicy: Fail + name: vkeptntaskdefinition.kb.io + rules: + - apiGroups: + - lifecycle.keptn.sh + apiVersions: + - v1alpha3 + operations: + - CREATE + - UPDATE + resources: + - keptntaskdefinitions + sideEffects: None From 59ee71a82da59359fb56d53bac8e94a4cabf7ced Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Fri, 4 Aug 2023 10:44:32 +0100 Subject: [PATCH 02/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- Makefile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Makefile b/Makefile index 907f275d97..51801f3d1f 100644 --- a/Makefile +++ b/Makefile @@ -65,11 +65,6 @@ kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. $(KUSTOMIZE): $(LOCALBIN) test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); } -.PHONY: helm-package -helm-package: - $(MAKE) build-release-manifests CHART_APPVERSION=$(CHART_APPVERSION) RELEASE_REGISTRY=$(RELEASE_REGISTRY) - $(MAKE) release-helm-manifests CHART_APPVERSION=$(CHART_APPVERSION) RELEASE_REGISTRY=$(RELEASE_REGISTRY) - .PHONY: build-release-manifests build-release-manifests: $(MAKE) -C lifecycle-operator generate From 3df961376b632c9255a7af18521c8bc8df696c89 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Fri, 4 Aug 2023 10:45:58 +0100 Subject: [PATCH 03/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- Makefile | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Makefile b/Makefile index 51801f3d1f..f42d9b2054 100644 --- a/Makefile +++ b/Makefile @@ -65,17 +65,6 @@ kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. $(KUSTOMIZE): $(LOCALBIN) test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); } -.PHONY: build-release-manifests -build-release-manifests: - $(MAKE) -C lifecycle-operator generate - $(MAKE) -C klt-cert-manager generate - $(MAKE) -C metrics-operator generate - - $(MAKE) -C lifecycle-operator release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) CHART_APPVERSION=$(CHART_APPVERSION) - $(MAKE) -C scheduler release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) CHART_APPVERSION=$(CHART_APPVERSION) - $(MAKE) -C klt-cert-manager release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) CHART_APPVERSION=$(CHART_APPVERSION) - $(MAKE) -C metrics-operator release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) CHART_APPVERSION=$(CHART_APPVERSION) - .PHONY: build-deploy-operator build-deploy-operator: $(MAKE) -C lifecycle-operator release-local.$(ARCH) RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) From 602bf7310346a0cb7ee67163c3346bbea60a91cf Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Fri, 4 Aug 2023 17:29:42 +0100 Subject: [PATCH 04/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- operator/config/rendered/release.yaml | 5811 ------------------------- 1 file changed, 5811 deletions(-) delete mode 100644 operator/config/rendered/release.yaml diff --git a/operator/config/rendered/release.yaml b/operator/config/rendered/release.yaml deleted file mode 100644 index b1938a3a14..0000000000 --- a/operator/config/rendered/release.yaml +++ /dev/null @@ -1,5811 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - app.kubernetes.io/part-of: keptn-lifecycle-toolkit - crdGroup: lifecycle.keptn.sh - keptn.sh/inject-cert: "true" - name: keptnappcreationrequests.lifecycle.keptn.sh -spec: - group: lifecycle.keptn.sh - names: - kind: KeptnAppCreationRequest - listKind: KeptnAppCreationRequestList - plural: keptnappcreationrequests - singular: keptnappcreationrequest - scope: Namespaced - versions: - - name: v1alpha3 - schema: - openAPIV3Schema: - description: KeptnAppCreationRequest is the Schema for the keptnappcreationrequests - 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 - spec: - description: Spec describes the desired state of the KeptnAppCreationRequest. - properties: - appName: - description: AppName is the name of the KeptnApp the KeptnAppCreationRequest - should create if no user-defined object with that name is found. - type: string - required: - - appName - type: object - status: - description: Status describes the current state of the KeptnAppCreationRequest. - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - app.kubernetes.io/part-of: keptn-lifecycle-toolkit - crdGroup: lifecycle.keptn.sh - keptn.sh/inject-cert: "true" - name: keptnapps.lifecycle.keptn.sh -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: lifecycle-webhook-service - namespace: keptn-lifecycle-toolkit-system - path: /convert - conversionReviewVersions: - - v1 - group: lifecycle.keptn.sh - names: - kind: KeptnApp - listKind: KeptnAppList - plural: keptnapps - singular: keptnapp - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: KeptnApp is the Schema for the keptnapps 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 - spec: - description: KeptnAppSpec defines the desired state of KeptnApp - properties: - postDeploymentEvaluations: - items: - type: string - type: array - postDeploymentTasks: - items: - type: string - type: array - preDeploymentEvaluations: - items: - type: string - type: array - preDeploymentTasks: - items: - type: string - type: array - version: - type: string - workloads: - items: - properties: - name: - type: string - version: - type: string - required: - - name - - version - type: object - type: array - required: - - version - type: object - status: - description: KeptnAppStatus defines the observed state of KeptnApp - properties: - currentVersion: - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - - name: v1alpha2 - schema: - openAPIV3Schema: - description: KeptnApp is the Schema for the keptnapps 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 - spec: - description: KeptnAppSpec defines the desired state of KeptnApp - properties: - postDeploymentEvaluations: - items: - type: string - type: array - postDeploymentTasks: - items: - type: string - type: array - preDeploymentEvaluations: - items: - type: string - type: array - preDeploymentTasks: - items: - type: string - type: array - revision: - default: 1 - type: integer - version: - type: string - workloads: - items: - properties: - name: - type: string - version: - type: string - required: - - name - - version - type: object - type: array - required: - - version - type: object - status: - description: KeptnAppStatus defines the observed state of KeptnApp - properties: - currentVersion: - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - - name: v1alpha3 - schema: - openAPIV3Schema: - description: KeptnApp is the Schema for the keptnapps 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 - spec: - description: Spec describes the desired state of the KeptnApp. - properties: - postDeploymentEvaluations: - description: PostDeploymentEvaluations is a list of all evaluations - to be performed during the post-deployment phase of the KeptnApp. - The items of this list refer to the names of KeptnEvaluationDefinitions - located in the same namespace as the KeptnApp, or in the KLT namespace. - items: - type: string - type: array - postDeploymentTasks: - description: PostDeploymentTasks is a list of all tasks to be performed - during the post-deployment phase of the KeptnApp. The items of this - list refer to the names of KeptnTaskDefinitions located in the same - namespace as the KeptnApp, or in the KLT namespace. - items: - type: string - type: array - preDeploymentEvaluations: - description: PreDeploymentEvaluations is a list of all evaluations - to be performed during the pre-deployment phase of the KeptnApp. - The items of this list refer to the names of KeptnEvaluationDefinitions - located in the same namespace as the KeptnApp, or in the KLT namespace. - items: - type: string - type: array - preDeploymentTasks: - description: PreDeploymentTasks is a list of all tasks to be performed - during the pre-deployment phase of the KeptnApp. The items of this - list refer to the names of KeptnTaskDefinitions located in the same - namespace as the KeptnApp, or in the KLT namespace. - items: - type: string - type: array - revision: - default: 1 - description: Revision can be modified to trigger another deployment - of a KeptnApp of the same version. This can be used for restarting - a KeptnApp which failed to deploy, e.g. due to a failed preDeploymentEvaluation/preDeploymentTask. - type: integer - version: - description: Version defines the version of the application. For automatically - created KeptnApps, the version is a function of all KeptnWorkloads - that are part of the KeptnApp. - type: string - workloads: - description: Workloads is a list of all KeptnWorkloads that are part - of the KeptnApp. - items: - description: KeptnWorkloadRef refers to a KeptnWorkload that is - part of a KeptnApp - properties: - name: - description: Name is the name of the KeptnWorkload. - type: string - version: - description: Version is the version of the KeptnWorkload. - type: string - required: - - name - - version - type: object - type: array - required: - - version - type: object - status: - description: Status describes the current state of the KeptnApp. - properties: - currentVersion: - description: CurrentVersion indicates the version that is currently - deployed or being reconciled. - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - app.kubernetes.io/part-of: keptn-lifecycle-toolkit - crdGroup: lifecycle.keptn.sh - keptn.sh/inject-cert: "true" - name: keptnappversions.lifecycle.keptn.sh -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: lifecycle-webhook-service - namespace: keptn-lifecycle-toolkit-system - path: /convert - conversionReviewVersions: - - v1 - group: lifecycle.keptn.sh - names: - kind: KeptnAppVersion - listKind: KeptnAppVersionList - plural: keptnappversions - shortNames: - - kav - singular: keptnappversion - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.appName - name: AppName - type: string - - jsonPath: .spec.version - name: Version - type: string - - jsonPath: .status.currentPhase - name: Phase - type: string - - jsonPath: .status.preDeploymentStatus - name: PreDeploymentStatus - priority: 1 - type: string - - jsonPath: .status.preDeploymentEvaluationStatus - name: PreDeploymentEvaluationStatus - priority: 1 - type: string - - jsonPath: .status.workloadOverallStatus - name: WorkloadOverallStatus - priority: 1 - type: string - - jsonPath: .status.postDeploymentStatus - name: PostDeploymentStatus - priority: 1 - type: string - - jsonPath: .status.postDeploymentEvaluationStatus - name: PostDeploymentEvaluationStatus - priority: 1 - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: KeptnAppVersion is the Schema for the keptnappversions 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 - spec: - description: KeptnAppVersionSpec defines the desired state of KeptnAppVersion - properties: - appName: - type: string - postDeploymentEvaluations: - items: - type: string - type: array - postDeploymentTasks: - items: - type: string - type: array - preDeploymentEvaluations: - items: - type: string - type: array - preDeploymentTasks: - items: - type: string - type: array - previousVersion: - type: string - traceId: - additionalProperties: - type: string - type: object - version: - type: string - workloads: - items: - properties: - name: - type: string - version: - type: string - required: - - name - - version - type: object - type: array - required: - - appName - - version - type: object - status: - description: KeptnAppVersionStatus defines the observed state of KeptnAppVersion - properties: - currentPhase: - type: string - endTime: - format: date-time - type: string - phaseTraceIDs: - additionalProperties: - additionalProperties: - type: string - description: MapCarrier is a TextMapCarrier that uses a map held - in memory as a storage medium for propagated key-value pairs. - type: object - type: object - postDeploymentEvaluationStatus: - default: Pending - type: string - postDeploymentEvaluationTaskStatus: - items: - properties: - endTime: - format: date-time - type: string - evaluationDefinitionName: - type: string - evaluationName: - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - postDeploymentStatus: - default: Pending - type: string - postDeploymentTaskStatus: - items: - properties: - endTime: - format: date-time - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - taskDefinitionName: - type: string - taskName: - type: string - type: object - type: array - preDeploymentEvaluationStatus: - default: Pending - type: string - preDeploymentEvaluationTaskStatus: - items: - properties: - endTime: - format: date-time - type: string - evaluationDefinitionName: - type: string - evaluationName: - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - preDeploymentStatus: - default: Pending - type: string - preDeploymentTaskStatus: - items: - properties: - endTime: - format: date-time - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - taskDefinitionName: - type: string - taskName: - type: string - type: object - type: array - startTime: - format: date-time - type: string - status: - default: Pending - type: string - workloadOverallStatus: - default: Pending - type: string - workloadStatus: - items: - properties: - status: - default: Pending - type: string - workload: - properties: - name: - type: string - version: - type: string - required: - - name - - version - type: object - type: object - type: array - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .spec.appName - name: AppName - type: string - - jsonPath: .spec.version - name: Version - type: string - - jsonPath: .status.currentPhase - name: Phase - type: string - - jsonPath: .status.preDeploymentStatus - name: PreDeploymentStatus - priority: 1 - type: string - - jsonPath: .status.preDeploymentEvaluationStatus - name: PreDeploymentEvaluationStatus - priority: 1 - type: string - - jsonPath: .status.workloadOverallStatus - name: WorkloadOverallStatus - priority: 1 - type: string - - jsonPath: .status.postDeploymentStatus - name: PostDeploymentStatus - priority: 1 - type: string - - jsonPath: .status.postDeploymentEvaluationStatus - name: PostDeploymentEvaluationStatus - priority: 1 - type: string - name: v1alpha2 - schema: - openAPIV3Schema: - description: KeptnAppVersion is the Schema for the keptnappversions 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 - spec: - description: KeptnAppVersionSpec defines the desired state of KeptnAppVersion - properties: - appName: - type: string - postDeploymentEvaluations: - items: - type: string - type: array - postDeploymentTasks: - items: - type: string - type: array - preDeploymentEvaluations: - items: - type: string - type: array - preDeploymentTasks: - items: - type: string - type: array - previousVersion: - type: string - revision: - default: 1 - type: integer - traceId: - additionalProperties: - type: string - type: object - version: - type: string - workloads: - items: - properties: - name: - type: string - version: - type: string - required: - - name - - version - type: object - type: array - required: - - appName - - version - type: object - status: - description: KeptnAppVersionStatus defines the observed state of KeptnAppVersion - properties: - currentPhase: - type: string - endTime: - format: date-time - type: string - phaseTraceIDs: - additionalProperties: - additionalProperties: - type: string - description: MapCarrier is a TextMapCarrier that uses a map held - in memory as a storage medium for propagated key-value pairs. - type: object - type: object - postDeploymentEvaluationStatus: - default: Pending - type: string - postDeploymentEvaluationTaskStatus: - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - postDeploymentStatus: - default: Pending - type: string - postDeploymentTaskStatus: - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - preDeploymentEvaluationStatus: - default: Pending - type: string - preDeploymentEvaluationTaskStatus: - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - preDeploymentStatus: - default: Pending - type: string - preDeploymentTaskStatus: - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - startTime: - format: date-time - type: string - status: - default: Pending - type: string - workloadOverallStatus: - default: Pending - type: string - workloadStatus: - items: - properties: - status: - default: Pending - type: string - workload: - properties: - name: - type: string - version: - type: string - required: - - name - - version - type: object - type: object - type: array - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .spec.appName - name: AppName - type: string - - jsonPath: .spec.version - name: Version - type: string - - jsonPath: .status.currentPhase - name: Phase - type: string - - jsonPath: .status.preDeploymentStatus - name: PreDeploymentStatus - priority: 1 - type: string - - jsonPath: .status.preDeploymentEvaluationStatus - name: PreDeploymentEvaluationStatus - priority: 1 - type: string - - jsonPath: .status.workloadOverallStatus - name: WorkloadOverallStatus - priority: 1 - type: string - - jsonPath: .status.postDeploymentStatus - name: PostDeploymentStatus - priority: 1 - type: string - - jsonPath: .status.postDeploymentEvaluationStatus - name: PostDeploymentEvaluationStatus - priority: 1 - type: string - name: v1alpha3 - schema: - openAPIV3Schema: - description: KeptnAppVersion is the Schema for the keptnappversions 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 - spec: - description: Spec describes the desired state of the KeptnAppVersion. - properties: - appName: - description: AppName is the name of the KeptnApp. - type: string - postDeploymentEvaluations: - description: PostDeploymentEvaluations is a list of all evaluations - to be performed during the post-deployment phase of the KeptnApp. - The items of this list refer to the names of KeptnEvaluationDefinitions - located in the same namespace as the KeptnApp, or in the KLT namespace. - items: - type: string - type: array - postDeploymentTasks: - description: PostDeploymentTasks is a list of all tasks to be performed - during the post-deployment phase of the KeptnApp. The items of this - list refer to the names of KeptnTaskDefinitions located in the same - namespace as the KeptnApp, or in the KLT namespace. - items: - type: string - type: array - preDeploymentEvaluations: - description: PreDeploymentEvaluations is a list of all evaluations - to be performed during the pre-deployment phase of the KeptnApp. - The items of this list refer to the names of KeptnEvaluationDefinitions - located in the same namespace as the KeptnApp, or in the KLT namespace. - items: - type: string - type: array - preDeploymentTasks: - description: PreDeploymentTasks is a list of all tasks to be performed - during the pre-deployment phase of the KeptnApp. The items of this - list refer to the names of KeptnTaskDefinitions located in the same - namespace as the KeptnApp, or in the KLT namespace. - items: - type: string - type: array - previousVersion: - description: PreviousVersion is the version of the KeptnApp that has - been deployed prior to this version. - type: string - revision: - default: 1 - description: Revision can be modified to trigger another deployment - of a KeptnApp of the same version. This can be used for restarting - a KeptnApp which failed to deploy, e.g. due to a failed preDeploymentEvaluation/preDeploymentTask. - type: integer - traceId: - additionalProperties: - type: string - description: TraceId contains the OpenTelemetry trace ID. - type: object - version: - description: Version defines the version of the application. For automatically - created KeptnApps, the version is a function of all KeptnWorkloads - that are part of the KeptnApp. - type: string - workloads: - description: Workloads is a list of all KeptnWorkloads that are part - of the KeptnApp. - items: - description: KeptnWorkloadRef refers to a KeptnWorkload that is - part of a KeptnApp - properties: - name: - description: Name is the name of the KeptnWorkload. - type: string - version: - description: Version is the version of the KeptnWorkload. - type: string - required: - - name - - version - type: object - type: array - required: - - appName - - version - type: object - status: - description: Status describes the current state of the KeptnAppVersion. - properties: - currentPhase: - description: CurrentPhase indicates the current phase of the KeptnAppVersion. - type: string - endTime: - description: EndTime represents the time at which the deployment of - the KeptnAppVersion finished. - format: date-time - type: string - phaseTraceIDs: - additionalProperties: - additionalProperties: - type: string - description: MapCarrier is a TextMapCarrier that uses a map held - in memory as a storage medium for propagated key-value pairs. - type: object - description: PhaseTraceIDs contains the trace IDs of the OpenTelemetry - spans of each phase of the KeptnAppVersion. - type: object - postDeploymentEvaluationStatus: - default: Pending - description: PostDeploymentEvaluationStatus indicates the current - status of the KeptnAppVersion's PostDeploymentEvaluation phase. - type: string - postDeploymentEvaluationTaskStatus: - description: PostDeploymentEvaluationTaskStatus indicates the current - state of each postDeploymentEvaluation of the KeptnAppVersion. - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - description: EndTime represents the time at which the Item (Evaluation/Task) - started. - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - description: StartTime represents the time at which the Item - (Evaluation/Task) started. - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - postDeploymentStatus: - default: Pending - description: PostDeploymentStatus indicates the current status of - the KeptnAppVersion's PostDeployment phase. - type: string - postDeploymentTaskStatus: - description: PostDeploymentTaskStatus indicates the current state - of each postDeploymentTask of the KeptnAppVersion. - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - description: EndTime represents the time at which the Item (Evaluation/Task) - started. - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - description: StartTime represents the time at which the Item - (Evaluation/Task) started. - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - preDeploymentEvaluationStatus: - default: Pending - description: PreDeploymentEvaluationStatus indicates the current status - of the KeptnAppVersion's PreDeploymentEvaluation phase. - type: string - preDeploymentEvaluationTaskStatus: - description: PreDeploymentEvaluationTaskStatus indicates the current - state of each preDeploymentEvaluation of the KeptnAppVersion. - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - description: EndTime represents the time at which the Item (Evaluation/Task) - started. - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - description: StartTime represents the time at which the Item - (Evaluation/Task) started. - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - preDeploymentStatus: - default: Pending - description: PreDeploymentStatus indicates the current status of the - KeptnAppVersion's PreDeployment phase. - type: string - preDeploymentTaskStatus: - description: PreDeploymentTaskStatus indicates the current state of - each preDeploymentTask of the KeptnAppVersion. - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - description: EndTime represents the time at which the Item (Evaluation/Task) - started. - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - description: StartTime represents the time at which the Item - (Evaluation/Task) started. - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - startTime: - description: StartTime represents the time at which the deployment - of the KeptnAppVersion started. - format: date-time - type: string - status: - default: Pending - description: Status represents the overall status of the KeptnAppVersion. - type: string - workloadOverallStatus: - default: Pending - description: WorkloadOverallStatus indicates the current status of - the KeptnAppVersion's Workload deployment phase. - type: string - workloadStatus: - description: WorkloadStatus contains the current status of each KeptnWorkload - that is part of the KeptnAppVersion. - items: - properties: - status: - default: Pending - description: Status indicates the current status of the KeptnWorkload. - type: string - workload: - description: Workload refers to a KeptnWorkload that is part - of the KeptnAppVersion. - properties: - name: - description: Name is the name of the KeptnWorkload. - type: string - version: - description: Version is the version of the KeptnWorkload. - type: string - required: - - name - - version - type: object - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - app.kubernetes.io/part-of: keptn-lifecycle-toolkit - crdGroup: lifecycle.keptn.sh - keptn.sh/inject-cert: "true" - name: keptnconfigs.options.keptn.sh -spec: - group: options.keptn.sh - names: - kind: KeptnConfig - listKind: KeptnConfigList - plural: keptnconfigs - singular: keptnconfig - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: KeptnConfig is the Schema for the keptnconfigs 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 - spec: - description: KeptnConfigSpec defines the desired state of KeptnConfig - properties: - OTelCollectorUrl: - description: OTelCollectorUrl can be used to set the Open Telemetry - collector that the operator should use - type: string - keptnAppCreationRequestTimeoutSeconds: - default: 30 - description: KeptnAppCreationRequestTimeoutSeconds is used to set - the interval in which automatic app discovery searches for workload - to put into the same auto-generated KeptnApp - type: integer - type: object - status: - description: KeptnConfigStatus defines the observed state of KeptnConfig - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - app.kubernetes.io/part-of: keptn-lifecycle-toolkit - crdGroup: lifecycle.keptn.sh - keptn.sh/inject-cert: "true" - name: keptnevaluationdefinitions.lifecycle.keptn.sh -spec: - group: lifecycle.keptn.sh - names: - kind: KeptnEvaluationDefinition - listKind: KeptnEvaluationDefinitionList - plural: keptnevaluationdefinitions - shortNames: - - ked - singular: keptnevaluationdefinition - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: KeptnEvaluationDefinition is the Schema for the keptnevaluationdefinitions - 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 - spec: - description: KeptnEvaluationDefinitionSpec defines the desired state of - KeptnEvaluationDefinition - properties: - objectives: - items: - properties: - evaluationTarget: - type: string - name: - type: string - query: - type: string - required: - - evaluationTarget - - name - - query - type: object - type: array - source: - type: string - required: - - objectives - - source - type: object - status: - description: KeptnEvaluationDefinitionStatus defines the observed state - of KeptnEvaluationDefinition - type: object - type: object - served: true - storage: false - subresources: - status: {} - - name: v1alpha2 - schema: - openAPIV3Schema: - description: KeptnEvaluationDefinition is the Schema for the keptnevaluationdefinitions - 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 - spec: - description: KeptnEvaluationDefinitionSpec defines the desired state of - KeptnEvaluationDefinition - properties: - objectives: - items: - properties: - evaluationTarget: - type: string - name: - type: string - query: - type: string - required: - - evaluationTarget - - name - - query - type: object - type: array - source: - type: string - required: - - objectives - - source - type: object - status: - description: KeptnEvaluationDefinitionStatus defines the observed state - of KeptnEvaluationDefinition - type: object - type: object - served: true - storage: false - subresources: - status: {} - - name: v1alpha3 - schema: - openAPIV3Schema: - description: KeptnEvaluationDefinition is the Schema for the keptnevaluationdefinitions - 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 - spec: - description: Spec describes the desired state of the KeptnEvaluationDefinition. - properties: - objectives: - description: Objectives is a list of objectives that have to be met - for a KeptnEvaluation referencing this KeptnEvaluationDefinition - to be successful. - items: - properties: - evaluationTarget: - description: EvaluationTarget specifies the target value for - the references KeptnMetric. Needs to start with either '<' - or '>', followed by the target value (e.g. '<10'). - type: string - keptnMetricRef: - description: KeptnMetricRef references the KeptnMetric that - should be evaluated. - properties: - name: - description: Name is the name of the referenced KeptnMetric. - type: string - namespace: - description: Namespace is the namespace where the referenced - KeptnMetric is located. - type: string - required: - - name - type: object - required: - - evaluationTarget - - keptnMetricRef - type: object - type: array - required: - - objectives - type: object - status: - description: Status describes the current state of the KeptnEvaluationDefinition. - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - app.kubernetes.io/part-of: keptn-lifecycle-toolkit - crdGroup: lifecycle.keptn.sh - keptn.sh/inject-cert: "true" - name: keptnevaluationproviders.lifecycle.keptn.sh -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: lifecycle-webhook-service - namespace: keptn-lifecycle-toolkit-system - path: /convert - conversionReviewVersions: - - v1 - group: lifecycle.keptn.sh - names: - kind: KeptnEvaluationProvider - listKind: KeptnEvaluationProviderList - plural: keptnevaluationproviders - shortNames: - - kep - singular: keptnevaluationprovider - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: KeptnEvaluationProvider is the Schema for the keptnevaluationproviders - 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 - spec: - description: KeptnEvaluationProviderSpec defines the desired state of - KeptnEvaluationProvider - properties: - secretName: - type: string - targetServer: - type: string - required: - - targetServer - type: object - status: - description: KeptnEvaluationProviderStatus defines the observed state - of KeptnEvaluationProvider - type: object - type: object - served: true - storage: false - subresources: - status: {} - - name: v1alpha2 - schema: - openAPIV3Schema: - description: KeptnEvaluationProvider is the Schema for the keptnevaluationproviders - 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 - spec: - description: KeptnEvaluationProviderSpec defines the desired state of - KeptnEvaluationProvider - properties: - secretKeyRef: - description: SecretKeySelector selects a key of a Secret. - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - targetServer: - type: string - required: - - targetServer - type: object - status: - description: KeptnEvaluationProviderStatus defines the observed state - of KeptnEvaluationProvider - type: object - type: object - served: true - storage: false - subresources: - status: {} - - name: v1alpha3 - schema: - openAPIV3Schema: - description: KeptnEvaluationProvider is the Schema for the keptnevaluationproviders - 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 - spec: - description: KeptnEvaluationProviderSpec defines the desired state of - KeptnEvaluationProvider - properties: - secretKeyRef: - description: SecretKeySelector selects a key of a Secret. - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - targetServer: - type: string - required: - - targetServer - type: object - status: - description: KeptnEvaluationProviderStatus defines the observed state - of KeptnEvaluationProvider - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - app.kubernetes.io/part-of: keptn-lifecycle-toolkit - crdGroup: lifecycle.keptn.sh - keptn.sh/inject-cert: "true" - name: keptnevaluations.lifecycle.keptn.sh -spec: - group: lifecycle.keptn.sh - names: - kind: KeptnEvaluation - listKind: KeptnEvaluationList - plural: keptnevaluations - shortNames: - - ke - singular: keptnevaluation - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.appName - name: AppName - type: string - - jsonPath: .spec.appVersion - name: AppVersion - type: string - - jsonPath: .spec.workload - name: WorkloadName - type: string - - jsonPath: .spec.workloadVersion - name: WorkloadVersion - type: string - - jsonPath: .status.retryCount - name: RetryCount - type: string - - jsonPath: .status.evaluationStatus - name: EvaluationStatus - type: string - - jsonPath: .status.overallStatus - name: OverallStatus - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: KeptnEvaluation is the Schema for the keptnevaluations 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 - spec: - description: KeptnEvaluationSpec defines the desired state of KeptnEvaluation - properties: - appName: - type: string - appVersion: - type: string - checkType: - type: string - evaluationDefinition: - type: string - failAction: - type: string - retries: - default: 10 - type: integer - retryInterval: - default: 5s - pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ - type: string - workload: - type: string - workloadVersion: - type: string - required: - - evaluationDefinition - - workloadVersion - type: object - status: - description: KeptnEvaluationStatus defines the observed state of KeptnEvaluation - properties: - endTime: - format: date-time - type: string - evaluationStatus: - additionalProperties: - properties: - message: - type: string - status: - type: string - value: - type: string - required: - - status - - value - type: object - type: object - overallStatus: - default: Pending - type: string - retryCount: - default: 0 - type: integer - startTime: - format: date-time - type: string - required: - - evaluationStatus - - overallStatus - - retryCount - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .spec.appName - name: AppName - type: string - - jsonPath: .spec.appVersion - name: AppVersion - type: string - - jsonPath: .spec.workload - name: WorkloadName - type: string - - jsonPath: .spec.workloadVersion - name: WorkloadVersion - type: string - - jsonPath: .status.retryCount - name: RetryCount - type: string - - jsonPath: .status.evaluationStatus - name: EvaluationStatus - type: string - - jsonPath: .status.overallStatus - name: OverallStatus - type: string - name: v1alpha2 - schema: - openAPIV3Schema: - description: KeptnEvaluation is the Schema for the keptnevaluations 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 - spec: - description: KeptnEvaluationSpec defines the desired state of KeptnEvaluation - properties: - appName: - type: string - appVersion: - type: string - checkType: - type: string - evaluationDefinition: - type: string - failAction: - type: string - retries: - default: 10 - type: integer - retryInterval: - default: 5s - pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ - type: string - workload: - type: string - workloadVersion: - type: string - required: - - evaluationDefinition - - workloadVersion - type: object - status: - description: KeptnEvaluationStatus defines the observed state of KeptnEvaluation - properties: - endTime: - format: date-time - type: string - evaluationStatus: - additionalProperties: - properties: - message: - type: string - status: - type: string - value: - type: string - required: - - status - - value - type: object - type: object - overallStatus: - default: Pending - type: string - retryCount: - default: 0 - type: integer - startTime: - format: date-time - type: string - required: - - evaluationStatus - - overallStatus - - retryCount - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .spec.appName - name: AppName - type: string - - jsonPath: .spec.appVersion - name: AppVersion - type: string - - jsonPath: .spec.workload - name: WorkloadName - type: string - - jsonPath: .spec.workloadVersion - name: WorkloadVersion - type: string - - jsonPath: .status.retryCount - name: RetryCount - type: string - - jsonPath: .status.evaluationStatus - name: EvaluationStatus - type: string - - jsonPath: .status.overallStatus - name: OverallStatus - type: string - name: v1alpha3 - schema: - openAPIV3Schema: - description: KeptnEvaluation is the Schema for the keptnevaluations 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 - spec: - description: Spec describes the desired state of the KeptnEvaluation. - properties: - appName: - description: AppName defines the KeptnApp for which the KeptnEvaluation - is done. - type: string - appVersion: - description: AppVersion defines the version of the KeptnApp for which - the KeptnEvaluation is done. - type: string - checkType: - description: Type indicates whether the KeptnEvaluation is part of - the pre- or postDeployment phase. - type: string - evaluationDefinition: - description: EvaluationDefinition refers to the name of the KeptnEvaluationDefinition - which includes the objectives for the KeptnEvaluation. The KeptnEvaluationDefinition - can be located in the same namespace as the KeptnEvaluation, or - in the KLT namespace. - type: string - failAction: - type: string - retries: - default: 10 - description: Retries indicates how many times the KeptnEvaluation - can be attempted in the case of an error or missed evaluation objective, - before considering the KeptnEvaluation to be failed. - type: integer - retryInterval: - default: 5s - description: RetryInterval specifies the interval at which the KeptnEvaluation - is retried in the case of an error or a missed objective. - pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ - type: string - workload: - description: Workload defines the KeptnWorkload for which the KeptnEvaluation - is done. - type: string - workloadVersion: - description: WorkloadVersion defines the version of the KeptnWorkload - for which the KeptnEvaluation is done. - type: string - required: - - evaluationDefinition - - workloadVersion - type: object - status: - description: Status describes the current state of the KeptnEvaluation. - properties: - endTime: - description: EndTime represents the time at which the KeptnEvaluation - finished. - format: date-time - type: string - evaluationStatus: - additionalProperties: - properties: - message: - description: Message contains additional information about the - evaluation of an objective. This can include explanations - about why an evaluation has failed (e.g. due to a missed objective), - or if there was any error during the evaluation of the objective. - type: string - status: - description: Status indicates the status of the objective being - evaluated. - type: string - value: - description: Value represents the value of the KeptnMetric being - evaluated. - type: string - required: - - status - - value - type: object - description: EvaluationStatus describes the status of each objective - of the KeptnEvaluationDefinition referenced by the KeptnEvaluation. - type: object - overallStatus: - default: Pending - description: OverallStatus describes the overall status of the KeptnEvaluation. - The Overall status is derived from the status of the individual - objectives of the KeptnEvaluationDefinition referenced by the KeptnEvaluation. - type: string - retryCount: - default: 0 - description: RetryCount indicates how many times the KeptnEvaluation - has been attempted already. - type: integer - startTime: - description: StartTime represents the time at which the KeptnEvaluation - started. - format: date-time - type: string - required: - - evaluationStatus - - overallStatus - - retryCount - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - app.kubernetes.io/part-of: keptn-lifecycle-toolkit - crdGroup: lifecycle.keptn.sh - keptn.sh/inject-cert: "true" - name: keptntaskdefinitions.lifecycle.keptn.sh -spec: - group: lifecycle.keptn.sh - names: - kind: KeptnTaskDefinition - listKind: KeptnTaskDefinitionList - plural: keptntaskdefinitions - singular: keptntaskdefinition - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: KeptnTaskDefinition is the Schema for the keptntaskdefinitions - 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 - spec: - description: KeptnTaskDefinitionSpec defines the desired state of KeptnTaskDefinition - properties: - function: - properties: - configMapRef: - properties: - name: - type: string - type: object - functionRef: - properties: - name: - type: string - type: object - httpRef: - properties: - url: - type: string - type: object - inline: - properties: - code: - type: string - type: object - parameters: - properties: - map: - additionalProperties: - type: string - type: object - type: object - secureParameters: - properties: - secret: - type: string - type: object - type: object - type: object - status: - description: KeptnTaskDefinitionStatus defines the observed state of KeptnTaskDefinition - properties: - function: - description: 'INSERT ADDITIONAL STATUS FIELD - define observed state - of cluster Important: Run "make" to regenerate code after modifying - this file' - properties: - configMap: - description: 'INSERT ADDITIONAL STATUS FIELD - define observed - state of cluster Important: Run "make" to regenerate code after - modifying this file' - type: string - type: object - type: object - type: object - served: true - storage: false - subresources: - status: {} - - name: v1alpha2 - schema: - openAPIV3Schema: - description: KeptnTaskDefinition is the Schema for the keptntaskdefinitions - 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 - spec: - description: KeptnTaskDefinitionSpec defines the desired state of KeptnTaskDefinition - properties: - function: - properties: - configMapRef: - properties: - name: - type: string - type: object - functionRef: - properties: - name: - type: string - type: object - httpRef: - properties: - url: - type: string - type: object - inline: - properties: - code: - type: string - type: object - parameters: - properties: - map: - additionalProperties: - type: string - type: object - type: object - secureParameters: - properties: - secret: - type: string - type: object - type: object - type: object - status: - description: KeptnTaskDefinitionStatus defines the observed state of KeptnTaskDefinition - properties: - function: - description: 'INSERT ADDITIONAL STATUS FIELD - define observed state - of cluster Important: Run "make" to regenerate code after modifying - this file' - properties: - configMap: - description: 'INSERT ADDITIONAL STATUS FIELD - define observed - state of cluster Important: Run "make" to regenerate code after - modifying this file' - type: string - type: object - type: object - type: object - served: true - storage: false - subresources: - status: {} - - name: v1alpha3 - schema: - openAPIV3Schema: - description: KeptnTaskDefinition is the Schema for the keptntaskdefinitions - 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 - spec: - description: Spec describes the desired state of the KeptnTaskDefinition. - properties: - container: - description: Container contains the definition for the container that - is to be used in Job based on the KeptnTaskDefinitions. - properties: - args: - description: 'Arguments to the entrypoint. The container image''s - CMD is used if this is not provided. Variable references $(VAR_NAME) - are expanded using the container''s environment. If a variable - cannot be resolved, the reference in the input string will be - unchanged. Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will - produce the string literal "$(VAR_NAME)". Escaped references - will never be expanded, regardless of whether the variable exists - or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - items: - type: string - type: array - command: - description: 'Entrypoint array. Not executed within a shell. The - container image''s ENTRYPOINT is used if this is not provided. - Variable references $(VAR_NAME) are expanded using the container''s - environment. If a variable cannot be resolved, the reference - in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: - i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether - the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - items: - type: string - type: array - env: - description: List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables - in the container. The keys defined within a source must be a - C_IDENTIFIER. All invalid keys will be reported as an event - when the container is starting. When a key exists in multiple - sources, the value associated with the last source will take - precedence. Values defined by an Env with a duplicate key will - take precedence. Cannot be updated. - items: - description: EnvFromSource represents the source of a set of - ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each key - in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images - This field is optional to allow higher level config management - to default or override container images in workload controllers - like Deployments and StatefulSets.' - type: string - imagePullPolicy: - description: 'Image pull policy. One of Always, Never, IfNotPresent. - Defaults to Always if :latest tag is specified, or IfNotPresent - otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' - type: string - lifecycle: - description: Actions that the management system should take in - response to container lifecycle events. Cannot be updated. - properties: - postStart: - description: 'PostStart is called immediately after a container - is created. If the handler fails, the container is terminated - and restarted according to its restart policy. Other management - of the container blocks until the hook completes. More info: - https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', - etc) won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range 1 - to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as - a LifecycleHandler and kept for the backward compatibility. - There are no validation of this field and lifecycle - hooks will fail in runtime when tcp handler is specified. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range 1 - to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: 'PreStop is called immediately before a container - is terminated due to an API request or management event - such as liveness/startup probe failure, preemption, resource - contention, etc. The handler is not called if the container - crashes or exits. The Pod''s termination grace period countdown - begins before the PreStop hook is executed. Regardless of - the outcome of the handler, the container will eventually - terminate within the Pod''s termination grace period (unless - delayed by finalizers). Other management of the container - blocks until the hook completes or until the termination - grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', - etc) won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range 1 - to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as - a LifecycleHandler and kept for the backward compatibility. - There are no validation of this field and lifecycle - hooks will fail in runtime when tcp handler is specified. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range 1 - to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: 'Periodic probe of container liveness. Container - will be restarted if the probe fails. Cannot be updated. More - info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside - the container, the working directory for the command is - root ('/') in the container's filesystem. The command - is simply exec'd, it is not run inside a shell, so traditional - shell instructions ('|', etc) won't work. To use a shell, - you need to explicitly call out to that shell. Exit - status of 0 is treated as live/healthy and non-zero - is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe to - be considered failed after having succeeded. Defaults to - 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - This is a beta field and requires enabling GRPCContainerProbe - feature gate. - properties: - port: - description: Port number of the gRPC service. Number must - be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior is - defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header to - be used in HTTP probes - properties: - name: - description: The header field name. This will be - canonicalized upon output, so case-variant names - will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has started - before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe to - be considered successful after having failed. Defaults to - 1. Must be 1 for liveness and startup. Minimum value is - 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to - terminate gracefully upon probe failure. The grace period - is the duration in seconds after the processes running in - the pod are sent a termination signal and the time when - the processes are forcibly halted with a kill signal. Set - this value longer than the expected cleanup time for your - process. If this value is nil, the pod's terminationGracePeriodSeconds - will be used. Otherwise, this value overrides the value - provided by the pod spec. Value must be non-negative integer. - The value zero indicates stop immediately via the kill signal - (no opportunity to shut down). This is a beta field and - requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is - used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - name: - description: Name of the container specified as a DNS_LABEL. Each - container in a pod must have a unique name (DNS_LABEL). Cannot - be updated. - type: string - ports: - description: List of ports to expose from the container. Not specifying - a port here DOES NOT prevent that port from being exposed. Any - port which is listening on the default "0.0.0.0" address inside - a container will be accessible from the network. Modifying this - array with strategic merge patch may corrupt the data. For more - information See https://github.com/kubernetes/kubernetes/issues/108255. - Cannot be updated. - items: - description: ContainerPort represents a network port in a single - container. - properties: - containerPort: - description: Number of port to expose on the pod's IP address. - This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the external port to. - type: string - hostPort: - description: Number of port to expose on the host. If specified, - this must be a valid port number, 0 < x < 65536. If HostNetwork - is specified, this must match ContainerPort. Most containers - do not need this. - format: int32 - type: integer - name: - description: If specified, this must be an IANA_SVC_NAME - and unique within the pod. Each named port in a pod must - have a unique name. Name for the port that can be referred - to by services. - type: string - protocol: - default: TCP - description: Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: 'Periodic probe of container service readiness. Container - will be removed from service endpoints if the probe fails. Cannot - be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside - the container, the working directory for the command is - root ('/') in the container's filesystem. The command - is simply exec'd, it is not run inside a shell, so traditional - shell instructions ('|', etc) won't work. To use a shell, - you need to explicitly call out to that shell. Exit - status of 0 is treated as live/healthy and non-zero - is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe to - be considered failed after having succeeded. Defaults to - 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - This is a beta field and requires enabling GRPCContainerProbe - feature gate. - properties: - port: - description: Port number of the gRPC service. Number must - be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior is - defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header to - be used in HTTP probes - properties: - name: - description: The header field name. This will be - canonicalized upon output, so case-variant names - will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has started - before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe to - be considered successful after having failed. Defaults to - 1. Must be 1 for liveness and startup. Minimum value is - 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to - terminate gracefully upon probe failure. The grace period - is the duration in seconds after the processes running in - the pod are sent a termination signal and the time when - the processes are forcibly halted with a kill signal. Set - this value longer than the expected cleanup time for your - process. If this value is nil, the pod's terminationGracePeriodSeconds - will be used. Otherwise, this value overrides the value - provided by the pod spec. Value must be non-negative integer. - The value zero indicates stop immediately via the kill signal - (no opportunity to shut down). This is a beta field and - requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is - used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - resources: - description: 'Compute Resources required by this container. Cannot - be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - 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 - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - 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 - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - securityContext: - description: 'SecurityContext defines the security options the - container should be run with. If set, the fields of SecurityContext - override the equivalent fields of PodSecurityContext. More info: - https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether a - process can gain more privileges than its parent process. - This bool directly controls if the no_new_privs flag will - be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be set - when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the - container runtime. Note that this field cannot be set when - spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes in - privileged containers are essentially equivalent to root - on the host. Defaults to false. Note that this field cannot - be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to use - for the containers. The default is DefaultProcMount which - uses the container runtime defaults for readonly paths and - masked paths. This requires the ProcMountType feature flag - to be enabled. Note that this field cannot be set when spec.os.name - is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root filesystem. - Default is false. Note that this field cannot be set when - spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be set - in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when - spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. If true, the Kubelet will validate the image at runtime - to ensure that it does not run as UID 0 (root) and fail - to start the container if it does. If unset or false, no - such validation will be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata if - unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in - PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when - spec.os.name is windows. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & container - level, the container options override the pod options. Note - that this field cannot be set when spec.os.name is windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must - be preconfigured on the node to work. Must be a descending - path, relative to the kubelet's configured seccomp profile - location. Must only be set if type is "Localhost". - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a - profile defined in a file on the node should be used. - RuntimeDefault - the container runtime default profile - should be used. Unconfined - no profile should be applied." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all - containers. If unspecified, the options from the PodSecurityContext - will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is - linux. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named - by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the - GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. This field is - alpha-level and will only be honored by components that - enable the WindowsHostProcessContainers feature flag. - Setting this field without the feature flag will result - in errors when validating the Pod. All of a Pod's containers - must have the same effective HostProcess value (it is - not allowed to have a mix of HostProcess containers - and non-HostProcess containers). In addition, if HostProcess - is true then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in - PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext - takes precedence. - type: string - type: object - type: object - startupProbe: - description: 'StartupProbe indicates that the Pod has successfully - initialized. If specified, no other probes are executed until - this completes successfully. If this probe fails, the Pod will - be restarted, just as if the livenessProbe failed. This can - be used to provide different probe parameters at the beginning - of a Pod''s lifecycle, when it might take a long time to load - data or warm a cache, than during steady-state operation. This - cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside - the container, the working directory for the command is - root ('/') in the container's filesystem. The command - is simply exec'd, it is not run inside a shell, so traditional - shell instructions ('|', etc) won't work. To use a shell, - you need to explicitly call out to that shell. Exit - status of 0 is treated as live/healthy and non-zero - is unhealthy. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe to - be considered failed after having succeeded. Defaults to - 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - This is a beta field and requires enabling GRPCContainerProbe - feature gate. - properties: - port: - description: Port number of the gRPC service. Number must - be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior is - defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header to - be used in HTTP probes - properties: - name: - description: The header field name. This will be - canonicalized upon output, so case-variant names - will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has started - before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe to - be considered successful after having failed. Defaults to - 1. Must be 1 for liveness and startup. Minimum value is - 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to - terminate gracefully upon probe failure. The grace period - is the duration in seconds after the processes running in - the pod are sent a termination signal and the time when - the processes are forcibly halted with a kill signal. Set - this value longer than the expected cleanup time for your - process. If this value is nil, the pod's terminationGracePeriodSeconds - will be used. Otherwise, this value overrides the value - provided by the pod spec. Value must be non-negative integer. - The value zero indicates stop immediately via the kill signal - (no opportunity to shut down). This is a beta field and - requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is - used if unset. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - stdin: - description: Whether this container should allocate a buffer for - stdin in the container runtime. If this is not set, reads from - stdin in the container will always result in EOF. Default is - false. - type: boolean - stdinOnce: - description: Whether the container runtime should close the stdin - channel after it has been opened by a single attach. When stdin - is true the stdin stream will remain open across multiple attach - sessions. If stdinOnce is set to true, stdin is opened on container - start, is empty until the first client attaches to stdin, and - then remains open and accepts data until the client disconnects, - at which time stdin is closed and remains closed until the container - is restarted. If this flag is false, a container processes that - reads from stdin will never receive an EOF. Default is false - type: boolean - terminationMessagePath: - description: 'Optional: Path at which the file to which the container''s - termination message will be written is mounted into the container''s - filesystem. Message written is intended to be brief final status, - such as an assertion failure message. Will be truncated by the - node if greater than 4096 bytes. The total message length across - all containers will be limited to 12kb. Defaults to /dev/termination-log. - Cannot be updated.' - type: string - terminationMessagePolicy: - description: Indicate how the termination message should be populated. - File will use the contents of terminationMessagePath to populate - the container status message on both success and failure. FallbackToLogsOnError - will use the last chunk of container log output if the termination - message file is empty and the container exited with an error. - The log output is limited to 2048 bytes or 80 lines, whichever - is smaller. Defaults to File. Cannot be updated. - type: string - tty: - description: Whether this container should allocate a TTY for - itself, also requires 'stdin' to be true. Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block devices to be - used by the container. - items: - description: volumeDevice describes a mapping of a raw block - device within a container. - properties: - devicePath: - description: devicePath is the path inside of the container - that the device will be mapped to. - type: string - name: - description: name must match the name of a persistentVolumeClaim - in the pod - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - description: Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: Path within the container at which the volume - should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are - propagated from the host to container and the other way - around. When not set, MountPropagationNone is used. This - field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. Behaves similarly - to SubPath but environment variable references $(VAR_NAME) - are expanded using the container's environment. Defaults - to "" (volume's root). SubPathExpr and SubPath are mutually - exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: Container's working directory. If not specified, - the container runtime's default will be used, which might be - configured in the container image. Cannot be updated. - type: string - required: - - name - type: object - deno: - description: Deno contains the definition for the Deno function that - is to be executed in KeptnTasks based on the KeptnTaskDefinitions. - properties: - cmdParameters: - description: CmdParameters contains parameters that will be passed - to the command - type: string - configMapRef: - description: ConfigMapReference allows to reference a ConfigMap - containing the code of the function. When referencing a ConfigMap, - the code of the function must be available as a value of the - 'code' key of the referenced ConfigMap. - properties: - name: - description: Name is the name of the referenced ConfigMap. - type: string - type: object - functionRef: - description: FunctionReference allows to reference another KeptnTaskDefinition - which contains the source code of the function to be executes - for KeptnTasks based on this KeptnTaskDefinition. This can be - useful when you have multiple KeptnTaskDefinitions that should - execute the same logic, but each with different parameters. - properties: - name: - description: Name is the name of the referenced KeptnTaksDefinition. - type: string - type: object - httpRef: - description: HttpReference allows to point to an HTTP URL containing - the code of the function. - properties: - url: - description: Url is the URL containing the code of the function. - type: string - type: object - inline: - description: Inline allows to specify the code that should be - executed directly in the KeptnTaskDefinition, as a multi-line - string. - properties: - code: - description: Code contains the code of the function. - type: string - type: object - parameters: - description: Parameters contains parameters that will be passed - to the job that executes the task as env variables. - properties: - map: - additionalProperties: - type: string - description: Inline contains the parameters that will be made - available to the job executing the KeptnTask via the 'DATA' - environment variable. The 'DATA' environment variable's - content will be a json encoded string containing all properties - of the map provided. - type: object - type: object - secureParameters: - description: SecureParameters contains secure parameters that - will be passed to the job that executes the task. These will - be stored and accessed as secrets in the cluster. - properties: - secret: - description: Secret contains the parameters that will be made - available to the job executing the KeptnTask via the 'SECRET_DATA' - environment variable. The 'SECRET_DATA' environment variable's - content will the same as value of the 'SECRET_DATA' key - of the referenced secret. - type: string - type: object - type: object - function: - description: Deprecated Function contains the definition for the function - that is to be executed in KeptnTasks based on the KeptnTaskDefinitions. - properties: - cmdParameters: - description: CmdParameters contains parameters that will be passed - to the command - type: string - configMapRef: - description: ConfigMapReference allows to reference a ConfigMap - containing the code of the function. When referencing a ConfigMap, - the code of the function must be available as a value of the - 'code' key of the referenced ConfigMap. - properties: - name: - description: Name is the name of the referenced ConfigMap. - type: string - type: object - functionRef: - description: FunctionReference allows to reference another KeptnTaskDefinition - which contains the source code of the function to be executes - for KeptnTasks based on this KeptnTaskDefinition. This can be - useful when you have multiple KeptnTaskDefinitions that should - execute the same logic, but each with different parameters. - properties: - name: - description: Name is the name of the referenced KeptnTaksDefinition. - type: string - type: object - httpRef: - description: HttpReference allows to point to an HTTP URL containing - the code of the function. - properties: - url: - description: Url is the URL containing the code of the function. - type: string - type: object - inline: - description: Inline allows to specify the code that should be - executed directly in the KeptnTaskDefinition, as a multi-line - string. - properties: - code: - description: Code contains the code of the function. - type: string - type: object - parameters: - description: Parameters contains parameters that will be passed - to the job that executes the task as env variables. - properties: - map: - additionalProperties: - type: string - description: Inline contains the parameters that will be made - available to the job executing the KeptnTask via the 'DATA' - environment variable. The 'DATA' environment variable's - content will be a json encoded string containing all properties - of the map provided. - type: object - type: object - secureParameters: - description: SecureParameters contains secure parameters that - will be passed to the job that executes the task. These will - be stored and accessed as secrets in the cluster. - properties: - secret: - description: Secret contains the parameters that will be made - available to the job executing the KeptnTask via the 'SECRET_DATA' - environment variable. The 'SECRET_DATA' environment variable's - content will the same as value of the 'SECRET_DATA' key - of the referenced secret. - type: string - type: object - type: object - python: - description: Python contains the definition for the python function - that is to be executed in KeptnTasks based on the KeptnTaskDefinitions. - properties: - cmdParameters: - description: CmdParameters contains parameters that will be passed - to the command - type: string - configMapRef: - description: ConfigMapReference allows to reference a ConfigMap - containing the code of the function. When referencing a ConfigMap, - the code of the function must be available as a value of the - 'code' key of the referenced ConfigMap. - properties: - name: - description: Name is the name of the referenced ConfigMap. - type: string - type: object - functionRef: - description: FunctionReference allows to reference another KeptnTaskDefinition - which contains the source code of the function to be executes - for KeptnTasks based on this KeptnTaskDefinition. This can be - useful when you have multiple KeptnTaskDefinitions that should - execute the same logic, but each with different parameters. - properties: - name: - description: Name is the name of the referenced KeptnTaksDefinition. - type: string - type: object - httpRef: - description: HttpReference allows to point to an HTTP URL containing - the code of the function. - properties: - url: - description: Url is the URL containing the code of the function. - type: string - type: object - inline: - description: Inline allows to specify the code that should be - executed directly in the KeptnTaskDefinition, as a multi-line - string. - properties: - code: - description: Code contains the code of the function. - type: string - type: object - parameters: - description: Parameters contains parameters that will be passed - to the job that executes the task as env variables. - properties: - map: - additionalProperties: - type: string - description: Inline contains the parameters that will be made - available to the job executing the KeptnTask via the 'DATA' - environment variable. The 'DATA' environment variable's - content will be a json encoded string containing all properties - of the map provided. - type: object - type: object - secureParameters: - description: SecureParameters contains secure parameters that - will be passed to the job that executes the task. These will - be stored and accessed as secrets in the cluster. - properties: - secret: - description: Secret contains the parameters that will be made - available to the job executing the KeptnTask via the 'SECRET_DATA' - environment variable. The 'SECRET_DATA' environment variable's - content will the same as value of the 'SECRET_DATA' key - of the referenced secret. - type: string - type: object - type: object - retries: - default: 10 - description: Retries specifies how many times a job executing the - KeptnTaskDefinition should be restarted in the case of an unsuccessful - attempt. - format: int32 - type: integer - timeout: - default: 5m - description: Timeout specifies the maximum time to wait for the task - to be completed successfully. If the task does not complete successfully - within this time frame, it will be considered to be failed. - pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ - type: string - type: object - status: - description: Status describes the current state of the KeptnTaskDefinition. - properties: - function: - description: Function contains status information of the function - definition for the task. - properties: - configMap: - description: ConfigMap indicates the ConfigMap in which the function - code is stored. - type: string - type: object - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - app.kubernetes.io/part-of: keptn-lifecycle-toolkit - crdGroup: lifecycle.keptn.sh - keptn.sh/inject-cert: "true" - name: keptntasks.lifecycle.keptn.sh -spec: - group: lifecycle.keptn.sh - names: - kind: KeptnTask - listKind: KeptnTaskList - plural: keptntasks - singular: keptntask - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.app - name: AppName - type: string - - jsonPath: .spec.appVersion - name: AppVersion - type: string - - jsonPath: .spec.workload - name: WorkloadName - type: string - - jsonPath: .spec.workloadVersion - name: WorkloadVersion - type: string - - jsonPath: .status.jobName - name: Job Name - type: string - - jsonPath: .status.status - name: Status - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: KeptnTask is the Schema for the keptntasks 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 - spec: - description: KeptnTaskSpec defines the desired state of KeptnTask - properties: - app: - type: string - appVersion: - type: string - checkType: - type: string - context: - properties: - appName: - type: string - appVersion: - type: string - objectType: - type: string - taskType: - type: string - workloadName: - type: string - workloadVersion: - type: string - required: - - appName - - appVersion - - objectType - - taskType - - workloadName - - workloadVersion - type: object - parameters: - properties: - map: - additionalProperties: - type: string - type: object - type: object - secureParameters: - properties: - secret: - type: string - type: object - taskDefinition: - type: string - workload: - type: string - workloadVersion: - type: string - required: - - app - - appVersion - - context - - taskDefinition - - workload - - workloadVersion - type: object - status: - description: KeptnTaskStatus defines the observed state of KeptnTask - properties: - endTime: - format: date-time - type: string - jobName: - type: string - message: - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .spec.app - name: AppName - type: string - - jsonPath: .spec.appVersion - name: AppVersion - type: string - - jsonPath: .spec.workload - name: WorkloadName - type: string - - jsonPath: .spec.workloadVersion - name: WorkloadVersion - type: string - - jsonPath: .status.jobName - name: Job Name - type: string - - jsonPath: .status.status - name: Status - type: string - name: v1alpha2 - schema: - openAPIV3Schema: - description: KeptnTask is the Schema for the keptntasks 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 - spec: - description: KeptnTaskSpec defines the desired state of KeptnTask - properties: - app: - type: string - appVersion: - type: string - checkType: - type: string - context: - properties: - appName: - type: string - appVersion: - type: string - objectType: - type: string - taskType: - type: string - workloadName: - type: string - workloadVersion: - type: string - required: - - appName - - appVersion - - objectType - - taskType - - workloadName - - workloadVersion - type: object - parameters: - properties: - map: - additionalProperties: - type: string - type: object - type: object - secureParameters: - properties: - secret: - type: string - type: object - taskDefinition: - type: string - workload: - type: string - workloadVersion: - type: string - required: - - app - - appVersion - - context - - taskDefinition - - workload - - workloadVersion - type: object - status: - description: KeptnTaskStatus defines the observed state of KeptnTask - properties: - endTime: - format: date-time - type: string - jobName: - type: string - message: - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .spec.app - name: AppName - type: string - - jsonPath: .spec.appVersion - name: AppVersion - type: string - - jsonPath: .spec.workload - name: WorkloadName - type: string - - jsonPath: .spec.workloadVersion - name: WorkloadVersion - type: string - - jsonPath: .status.jobName - name: Job Name - type: string - - jsonPath: .status.status - name: Status - type: string - name: v1alpha3 - schema: - openAPIV3Schema: - description: KeptnTask is the Schema for the keptntasks 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 - spec: - description: Spec describes the desired state of the KeptnTask. - properties: - app: - description: AppName defines the KeptnApp for which the KeptnTask - is executed. - type: string - appVersion: - description: AppVersion defines the version of the KeptnApp for which - the KeptnTask is executed. - type: string - checkType: - description: Type indicates whether the KeptnTask is part of the pre- - or postDeployment phase. - type: string - context: - description: Context contains contextual information about the task - execution. - properties: - appName: - description: AppName the name of the KeptnApp the KeptnTask is - being executed for. - type: string - appVersion: - description: AppVersion the version of the KeptnApp the KeptnTask - is being executed for. - type: string - objectType: - description: ObjectType indicates whether the KeptnTask is being - executed for a KeptnApp or KeptnWorkload. - type: string - taskType: - description: TaskType indicates whether the KeptnTask is part - of the pre- or postDeployment phase. - type: string - workloadName: - description: WorkloadName the name of the KeptnWorkload the KeptnTask - is being executed for. - type: string - workloadVersion: - description: WorkloadVersion the version of the KeptnWorkload - the KeptnTask is being executed for. - type: string - required: - - appName - - appVersion - - objectType - - taskType - - workloadName - - workloadVersion - type: object - parameters: - description: Parameters contains parameters that will be passed to - the job that executes the task. - properties: - map: - additionalProperties: - type: string - description: Inline contains the parameters that will be made - available to the job executing the KeptnTask via the 'DATA' - environment variable. The 'DATA' environment variable's content - will be a json encoded string containing all properties of the - map provided. - type: object - type: object - retries: - default: 10 - description: Retries indicates how many times the KeptnTask can be - attempted in the case of an error before considering the KeptnTask - to be failed. - format: int32 - type: integer - secureParameters: - description: SecureParameters contains secure parameters that will - be passed to the job that executes the task. These will be stored - and accessed as secrets in the cluster. - properties: - secret: - description: Secret contains the parameters that will be made - available to the job executing the KeptnTask via the 'SECRET_DATA' - environment variable. The 'SECRET_DATA' environment variable's - content will the same as value of the 'SECRET_DATA' key of the - referenced secret. - type: string - type: object - taskDefinition: - description: TaskDefinition refers to the name of the KeptnTaskDefinition - which includes the specification for the task to be performed. The - KeptnTaskDefinition can be located in the same namespace as the - KeptnTask, or in the KLT namespace. - type: string - timeout: - default: 5m - description: Timeout specifies the maximum time to wait for the task - to be completed successfully. If the task does not complete successfully - within this time frame, it will be considered to be failed. - pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ - type: string - workload: - description: Workload defines the KeptnWorkload for which the KeptnTask - is executed. - type: string - workloadVersion: - description: WorkloadVersion defines the version of the KeptnWorkload - for which the KeptnTask is executed. - type: string - required: - - app - - appVersion - - context - - taskDefinition - - workload - - workloadVersion - type: object - status: - description: Status describes the current state of the KeptnTask. - properties: - endTime: - description: EndTime represents the time at which the KeptnTask finished. - format: date-time - type: string - jobName: - description: JobName is the name of the Job executing the Task. - type: string - message: - description: Message contains information about unexpected errors - encountered during the execution of the KeptnTask. - type: string - reason: - description: Reason contains more information about the reason for - the last transition of the Job executing the KeptnTask. - type: string - startTime: - description: StartTime represents the time at which the KeptnTask - started. - format: date-time - type: string - status: - default: Pending - description: Status represents the overall state of the KeptnTask. - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - app.kubernetes.io/part-of: keptn-lifecycle-toolkit - crdGroup: lifecycle.keptn.sh - keptn.sh/inject-cert: "true" - name: keptnworkloadinstances.lifecycle.keptn.sh -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: lifecycle-webhook-service - namespace: keptn-lifecycle-toolkit-system - path: /convert - conversionReviewVersions: - - v1 - group: lifecycle.keptn.sh - names: - kind: KeptnWorkloadInstance - listKind: KeptnWorkloadInstanceList - plural: keptnworkloadinstances - shortNames: - - kwi - singular: keptnworkloadinstance - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.app - name: AppName - type: string - - jsonPath: .spec.workloadName - name: WorkloadName - type: string - - jsonPath: .spec.version - name: WorkloadVersion - type: string - - jsonPath: .status.currentPhase - name: Phase - type: string - - jsonPath: .status.preDeploymentStatus - name: PreDeploymentStatus - priority: 1 - type: string - - jsonPath: .status.preDeploymentEvaluationStatus - name: PreDeploymentEvaluationStatus - priority: 1 - type: string - - jsonPath: .status.deploymentStatus - name: DeploymentStatus - priority: 1 - type: string - - jsonPath: .status.postDeploymentStatus - name: PostDeploymentStatus - priority: 1 - type: string - - jsonPath: .status.postDeploymentEvaluationStatus - name: PostDeploymentEvaluationStatus - priority: 1 - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: KeptnWorkloadInstance is the Schema for the keptnworkloadinstances - 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 - spec: - description: KeptnWorkloadInstanceSpec defines the desired state of KeptnWorkloadInstance - properties: - app: - type: string - postDeploymentEvaluations: - items: - type: string - type: array - postDeploymentTasks: - items: - type: string - type: array - preDeploymentEvaluations: - items: - type: string - type: array - preDeploymentTasks: - items: - type: string - type: array - previousVersion: - type: string - resourceReference: - properties: - kind: - type: string - name: - type: string - uid: - description: UID is a type that holds unique ID values, including - UUIDs. Because we don't ONLY use UUIDs, this is an alias to - string. Being a type captures intent and helps make sure that - UIDs and names do not get conflated. - type: string - required: - - kind - - name - - uid - type: object - traceId: - additionalProperties: - type: string - type: object - version: - type: string - workloadName: - type: string - required: - - app - - resourceReference - - version - - workloadName - type: object - status: - description: KeptnWorkloadInstanceStatus defines the observed state of - KeptnWorkloadInstance - properties: - currentPhase: - type: string - deploymentStatus: - default: Pending - type: string - endTime: - format: date-time - type: string - phaseTraceIDs: - additionalProperties: - additionalProperties: - type: string - description: MapCarrier is a TextMapCarrier that uses a map held - in memory as a storage medium for propagated key-value pairs. - type: object - type: object - postDeploymentEvaluationStatus: - default: Pending - type: string - postDeploymentEvaluationTaskStatus: - items: - properties: - endTime: - format: date-time - type: string - evaluationDefinitionName: - type: string - evaluationName: - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - postDeploymentStatus: - default: Pending - type: string - postDeploymentTaskStatus: - items: - properties: - endTime: - format: date-time - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - taskDefinitionName: - type: string - taskName: - type: string - type: object - type: array - preDeploymentEvaluationStatus: - default: Pending - type: string - preDeploymentEvaluationTaskStatus: - items: - properties: - endTime: - format: date-time - type: string - evaluationDefinitionName: - type: string - evaluationName: - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - preDeploymentStatus: - default: Pending - type: string - preDeploymentTaskStatus: - items: - properties: - endTime: - format: date-time - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - taskDefinitionName: - type: string - taskName: - type: string - type: object - type: array - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .spec.app - name: AppName - type: string - - jsonPath: .spec.workloadName - name: WorkloadName - type: string - - jsonPath: .spec.version - name: WorkloadVersion - type: string - - jsonPath: .status.currentPhase - name: Phase - type: string - - jsonPath: .status.preDeploymentStatus - name: PreDeploymentStatus - priority: 1 - type: string - - jsonPath: .status.preDeploymentEvaluationStatus - name: PreDeploymentEvaluationStatus - priority: 1 - type: string - - jsonPath: .status.deploymentStatus - name: DeploymentStatus - priority: 1 - type: string - - jsonPath: .status.postDeploymentStatus - name: PostDeploymentStatus - priority: 1 - type: string - - jsonPath: .status.postDeploymentEvaluationStatus - name: PostDeploymentEvaluationStatus - priority: 1 - type: string - name: v1alpha2 - schema: - openAPIV3Schema: - description: KeptnWorkloadInstance is the Schema for the keptnworkloadinstances - 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 - spec: - description: KeptnWorkloadInstanceSpec defines the desired state of KeptnWorkloadInstance - properties: - app: - type: string - postDeploymentEvaluations: - items: - type: string - type: array - postDeploymentTasks: - items: - type: string - type: array - preDeploymentEvaluations: - items: - type: string - type: array - preDeploymentTasks: - items: - type: string - type: array - previousVersion: - type: string - resourceReference: - properties: - kind: - type: string - name: - type: string - uid: - description: UID is a type that holds unique ID values, including - UUIDs. Because we don't ONLY use UUIDs, this is an alias to - string. Being a type captures intent and helps make sure that - UIDs and names do not get conflated. - type: string - required: - - kind - - name - - uid - type: object - traceId: - additionalProperties: - type: string - type: object - version: - type: string - workloadName: - type: string - required: - - app - - resourceReference - - version - - workloadName - type: object - status: - description: KeptnWorkloadInstanceStatus defines the observed state of - KeptnWorkloadInstance - properties: - currentPhase: - type: string - deploymentStatus: - default: Pending - type: string - endTime: - format: date-time - type: string - phaseTraceIDs: - additionalProperties: - additionalProperties: - type: string - description: MapCarrier is a TextMapCarrier that uses a map held - in memory as a storage medium for propagated key-value pairs. - type: object - type: object - postDeploymentEvaluationStatus: - default: Pending - type: string - postDeploymentEvaluationTaskStatus: - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - postDeploymentStatus: - default: Pending - type: string - postDeploymentTaskStatus: - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - preDeploymentEvaluationStatus: - default: Pending - type: string - preDeploymentEvaluationTaskStatus: - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - preDeploymentStatus: - default: Pending - type: string - preDeploymentTaskStatus: - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - startTime: - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .spec.app - name: AppName - type: string - - jsonPath: .spec.workloadName - name: WorkloadName - type: string - - jsonPath: .spec.version - name: WorkloadVersion - type: string - - jsonPath: .status.currentPhase - name: Phase - type: string - - jsonPath: .status.preDeploymentStatus - name: PreDeploymentStatus - priority: 1 - type: string - - jsonPath: .status.preDeploymentEvaluationStatus - name: PreDeploymentEvaluationStatus - priority: 1 - type: string - - jsonPath: .status.deploymentStatus - name: DeploymentStatus - priority: 1 - type: string - - jsonPath: .status.postDeploymentStatus - name: PostDeploymentStatus - priority: 1 - type: string - - jsonPath: .status.postDeploymentEvaluationStatus - name: PostDeploymentEvaluationStatus - priority: 1 - type: string - name: v1alpha3 - schema: - openAPIV3Schema: - description: KeptnWorkloadInstance is the Schema for the keptnworkloadinstances - 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 - spec: - description: Spec describes the desired state of the KeptnWorkloadInstance. - properties: - app: - description: AppName is the name of the KeptnApp containing the KeptnWorkload. - type: string - postDeploymentEvaluations: - description: PostDeploymentEvaluations is a list of all evaluations - to be performed during the post-deployment phase of the KeptnWorkload. - The items of this list refer to the names of KeptnEvaluationDefinitions - located in the same namespace as the KeptnWorkload, or in the KLT - namespace. - items: - type: string - type: array - postDeploymentTasks: - description: PostDeploymentTasks is a list of all tasks to be performed - during the post-deployment phase of the KeptnWorkload. The items - of this list refer to the names of KeptnTaskDefinitions located - in the same namespace as the KeptnWorkload, or in the KLT namespace. - items: - type: string - type: array - preDeploymentEvaluations: - description: PreDeploymentEvaluations is a list of all evaluations - to be performed during the pre-deployment phase of the KeptnWorkload. - The items of this list refer to the names of KeptnEvaluationDefinitions - located in the same namespace as the KeptnWorkload, or in the KLT - namespace. - items: - type: string - type: array - preDeploymentTasks: - description: PreDeploymentTasks is a list of all tasks to be performed - during the pre-deployment phase of the KeptnWorkload. The items - of this list refer to the names of KeptnTaskDefinitions located - in the same namespace as the KeptnApp, or in the KLT namespace. - items: - type: string - type: array - previousVersion: - description: PreviousVersion is the version of the KeptnWorkload that - has been deployed prior to this version. - type: string - resourceReference: - description: ResourceReference is a reference to the Kubernetes resource - (Deployment, DaemonSet, StatefulSet or ReplicaSet) the KeptnWorkload - is representing. - properties: - kind: - type: string - name: - type: string - uid: - description: UID is a type that holds unique ID values, including - UUIDs. Because we don't ONLY use UUIDs, this is an alias to - string. Being a type captures intent and helps make sure that - UIDs and names do not get conflated. - type: string - required: - - kind - - name - - uid - type: object - traceId: - additionalProperties: - type: string - description: TraceId contains the OpenTelemetry trace ID. - type: object - version: - description: Version defines the version of the KeptnWorkload. - type: string - workloadName: - description: WorkloadName is the name of the KeptnWorkload. - type: string - required: - - app - - resourceReference - - version - - workloadName - type: object - status: - description: Status describes the current state of the KeptnWorkloadInstance. - properties: - currentPhase: - description: 'CurrentPhase indicates the current phase of the KeptnWorkloadInstance. - This can be: - PreDeploymentTasks - PreDeploymentEvaluations - Deployment - - PostDeploymentTasks - PostDeploymentEvaluations' - type: string - deploymentStatus: - default: Pending - description: DeploymentStatus indicates the current status of the - KeptnWorkloadInstance's Deployment phase. - type: string - endTime: - description: EndTime represents the time at which the deployment of - the KeptnWorkloadInstance finished. - format: date-time - type: string - phaseTraceIDs: - additionalProperties: - additionalProperties: - type: string - description: MapCarrier is a TextMapCarrier that uses a map held - in memory as a storage medium for propagated key-value pairs. - type: object - description: PhaseTraceIDs contains the trace IDs of the OpenTelemetry - spans of each phase of the KeptnWorkloadInstance - type: object - postDeploymentEvaluationStatus: - default: Pending - description: PostDeploymentEvaluationStatus indicates the current - status of the KeptnWorkloadInstance's PostDeploymentEvaluation phase. - type: string - postDeploymentEvaluationTaskStatus: - description: PostDeploymentEvaluationTaskStatus indicates the current - state of each postDeploymentEvaluation of the KeptnWorkloadInstance. - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - description: EndTime represents the time at which the Item (Evaluation/Task) - started. - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - description: StartTime represents the time at which the Item - (Evaluation/Task) started. - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - postDeploymentStatus: - default: Pending - description: PostDeploymentStatus indicates the current status of - the KeptnWorkloadInstance's PostDeployment phase. - type: string - postDeploymentTaskStatus: - description: PostDeploymentTaskStatus indicates the current state - of each postDeploymentTask of the KeptnWorkloadInstance. - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - description: EndTime represents the time at which the Item (Evaluation/Task) - started. - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - description: StartTime represents the time at which the Item - (Evaluation/Task) started. - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - preDeploymentEvaluationStatus: - default: Pending - description: PreDeploymentEvaluationStatus indicates the current status - of the KeptnWorkloadInstance's PreDeploymentEvaluation phase. - type: string - preDeploymentEvaluationTaskStatus: - description: PreDeploymentEvaluationTaskStatus indicates the current - state of each preDeploymentEvaluation of the KeptnWorkloadInstance. - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - description: EndTime represents the time at which the Item (Evaluation/Task) - started. - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - description: StartTime represents the time at which the Item - (Evaluation/Task) started. - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - preDeploymentStatus: - default: Pending - description: PreDeploymentStatus indicates the current status of the - KeptnWorkloadInstance's PreDeployment phase. - type: string - preDeploymentTaskStatus: - description: PreDeploymentTaskStatus indicates the current state of - each preDeploymentTask of the KeptnWorkloadInstance. - items: - properties: - definitionName: - description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton - type: string - endTime: - description: EndTime represents the time at which the Item (Evaluation/Task) - started. - format: date-time - type: string - name: - description: Name is the name of the Evaluation/Task - type: string - startTime: - description: StartTime represents the time at which the Item - (Evaluation/Task) started. - format: date-time - type: string - status: - default: Pending - type: string - type: object - type: array - startTime: - description: StartTime represents the time at which the deployment - of the KeptnWorkloadInstance started. - format: date-time - type: string - status: - default: Pending - description: Status represents the overall status of the KeptnWorkloadInstance. - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - app.kubernetes.io/part-of: keptn-lifecycle-toolkit - crdGroup: lifecycle.keptn.sh - keptn.sh/inject-cert: "true" - name: keptnworkloads.lifecycle.keptn.sh -spec: - group: lifecycle.keptn.sh - names: - kind: KeptnWorkload - listKind: KeptnWorkloadList - plural: keptnworkloads - singular: keptnworkload - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.app - name: AppName - type: string - - jsonPath: .spec.version - name: Version - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: KeptnWorkload is the Schema for the keptnworkloads 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 - spec: - description: KeptnWorkloadSpec defines the desired state of KeptnWorkload - properties: - app: - type: string - postDeploymentEvaluations: - items: - type: string - type: array - postDeploymentTasks: - items: - type: string - type: array - preDeploymentEvaluations: - items: - type: string - type: array - preDeploymentTasks: - items: - type: string - type: array - resourceReference: - properties: - kind: - type: string - name: - type: string - uid: - description: UID is a type that holds unique ID values, including - UUIDs. Because we don't ONLY use UUIDs, this is an alias to - string. Being a type captures intent and helps make sure that - UIDs and names do not get conflated. - type: string - required: - - kind - - name - - uid - type: object - version: - type: string - required: - - app - - resourceReference - - version - type: object - status: - description: KeptnWorkloadStatus defines the observed state of KeptnWorkload - properties: - currentVersion: - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .spec.app - name: AppName - type: string - - jsonPath: .spec.version - name: Version - type: string - name: v1alpha2 - schema: - openAPIV3Schema: - description: KeptnWorkload is the Schema for the keptnworkloads 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 - spec: - description: KeptnWorkloadSpec defines the desired state of KeptnWorkload - properties: - app: - type: string - postDeploymentEvaluations: - items: - type: string - type: array - postDeploymentTasks: - items: - type: string - type: array - preDeploymentEvaluations: - items: - type: string - type: array - preDeploymentTasks: - items: - type: string - type: array - resourceReference: - properties: - kind: - type: string - name: - type: string - uid: - description: UID is a type that holds unique ID values, including - UUIDs. Because we don't ONLY use UUIDs, this is an alias to - string. Being a type captures intent and helps make sure that - UIDs and names do not get conflated. - type: string - required: - - kind - - name - - uid - type: object - version: - type: string - required: - - app - - resourceReference - - version - type: object - status: - description: KeptnWorkloadStatus defines the observed state of KeptnWorkload - properties: - currentVersion: - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .spec.app - name: AppName - type: string - - jsonPath: .spec.version - name: Version - type: string - name: v1alpha3 - schema: - openAPIV3Schema: - description: KeptnWorkload is the Schema for the keptnworkloads 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 - spec: - description: Spec describes the desired state of the KeptnWorkload. - properties: - app: - description: AppName is the name of the KeptnApp containing the KeptnWorkload. - type: string - postDeploymentEvaluations: - description: PostDeploymentEvaluations is a list of all evaluations - to be performed during the post-deployment phase of the KeptnWorkload. - The items of this list refer to the names of KeptnEvaluationDefinitions - located in the same namespace as the KeptnWorkload, or in the KLT - namespace. - items: - type: string - type: array - postDeploymentTasks: - description: PostDeploymentTasks is a list of all tasks to be performed - during the post-deployment phase of the KeptnWorkload. The items - of this list refer to the names of KeptnTaskDefinitions located - in the same namespace as the KeptnWorkload, or in the KLT namespace. - items: - type: string - type: array - preDeploymentEvaluations: - description: PreDeploymentEvaluations is a list of all evaluations - to be performed during the pre-deployment phase of the KeptnWorkload. - The items of this list refer to the names of KeptnEvaluationDefinitions - located in the same namespace as the KeptnWorkload, or in the KLT - namespace. - items: - type: string - type: array - preDeploymentTasks: - description: PreDeploymentTasks is a list of all tasks to be performed - during the pre-deployment phase of the KeptnWorkload. The items - of this list refer to the names of KeptnTaskDefinitions located - in the same namespace as the KeptnApp, or in the KLT namespace. - items: - type: string - type: array - resourceReference: - description: ResourceReference is a reference to the Kubernetes resource - (Deployment, DaemonSet, StatefulSet or ReplicaSet) the KeptnWorkload - is representing. - properties: - kind: - type: string - name: - type: string - uid: - description: UID is a type that holds unique ID values, including - UUIDs. Because we don't ONLY use UUIDs, this is an alias to - string. Being a type captures intent and helps make sure that - UIDs and names do not get conflated. - type: string - required: - - kind - - name - - uid - type: object - version: - description: Version defines the version of the KeptnWorkload. - type: string - required: - - app - - resourceReference - - version - type: object - status: - description: Status describes the current state of the KeptnWorkload. - properties: - currentVersion: - description: CurrentVersion indicates the version that is currently - deployed or being reconciled. - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: lifecycle-operator - namespace: keptn-lifecycle-toolkit-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: lifecycle-operator-leader-election-role - namespace: keptn-lifecycle-toolkit-system -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: lifecycle-operator-role -rules: -- apiGroups: - - apps - resources: - - daemonsets - - deployments - - replicasets - - statefulsets - verbs: - - get - - list - - watch -- apiGroups: - - argoproj.io - resources: - - rollouts - verbs: - - get - - list - - watch -- apiGroups: - - batch - resources: - - jobs - verbs: - - create - - get - - list - - update - - watch -- apiGroups: - - batch - resources: - - jobs/status - verbs: - - get - - list -- apiGroups: - - "" - resources: - - configmaps - verbs: - - create - - get - - list - - update - - watch -- apiGroups: - - "" - resources: - - deployments - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - watch -- apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - pods - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - secrets - verbs: - - get -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnappcreationrequests - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnappcreationrequests/finalizers - verbs: - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnappcreationrequests/status - verbs: - - get - - patch - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnapps - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnapps/finalizers - verbs: - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnapps/status - verbs: - - get - - patch - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnappversion - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnappversion/finalizers - verbs: - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnappversion/status - verbs: - - get - - patch - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnappversions - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnappversions/finalizers - verbs: - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnappversions/status - verbs: - - get - - patch - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnevaluationdefinitions - verbs: - - get - - list - - watch -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnevaluationproviders - verbs: - - get - - list - - watch -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnevaluations - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnevaluations/finalizers - verbs: - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnevaluations/status - verbs: - - get - - patch - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptntaskdefinitions - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptntaskdefinitions/finalizers - verbs: - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptntaskdefinitions/status - verbs: - - get - - patch - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptntasks - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptntasks/finalizers - verbs: - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptntasks/status - verbs: - - get - - patch - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnworkloadinstances - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnworkloadinstances/finalizers - verbs: - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnworkloadinstances/status - verbs: - - get - - patch - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnworkloads - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnworkloads/finalizers - verbs: - - update -- apiGroups: - - lifecycle.keptn.sh - resources: - - keptnworkloads/status - verbs: - - get - - patch - - update -- apiGroups: - - metrics.keptn.sh - resources: - - keptnmetrics - verbs: - - get - - list - - watch -- apiGroups: - - options.keptn.sh - resources: - - keptnconfigs - verbs: - - get - - list - - watch -- apiGroups: - - options.keptn.sh - resources: - - keptnconfigs/status - verbs: - - get ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: lifecycle-operator-leader-election-rolebinding - namespace: keptn-lifecycle-toolkit-system -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: lifecycle-operator-leader-election-role -subjects: -- kind: ServiceAccount - name: lifecycle-operator - namespace: keptn-lifecycle-toolkit-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: lifecycle-operator-rolebinding - namespace: keptn-lifecycle-toolkit-system -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: lifecycle-operator-role -subjects: -- kind: ServiceAccount - name: lifecycle-operator - namespace: keptn-lifecycle-toolkit-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: lifecycle-operator-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: lifecycle-operator-role -subjects: -- kind: ServiceAccount - name: lifecycle-operator - namespace: keptn-lifecycle-toolkit-system ---- -apiVersion: v1 -data: - controller_manager_config.yaml: | - apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 - kind: ControllerManagerConfig - health: - healthProbeBindAddress: :8081 - metrics: - bindAddress: 127.0.0.1:8080 - webhook: - port: 9443 - leaderElection: - leaderElect: true - resourceName: 6b866dd9.keptn.sh - - # leaderElectionReleaseOnCancel defines if the leader should step down volume - # when the Manager ends. This requires the binary to immediately end when the - # Manager is stopped, otherwise, this setting is unsafe. Setting this significantly - # speeds up voluntary leader transitions as the new leader don't have to wait - # LeaseDuration time first. - # In the default scaffold provided, the program ends immediately after - # the manager stops, so would be fine to enable this option. However, - # if you are doing or is intended to do any operation such as perform cleanups - # after the manager stops then its usage might be unsafe. - # leaderElectionReleaseOnCancel: true -kind: ConfigMap -metadata: - name: lifecycle-manager-config - namespace: keptn-lifecycle-toolkit-system ---- -apiVersion: v1 -kind: Service -metadata: - labels: - control-plane: lifecycle-operator - name: lifecycle-operator-metrics-service - namespace: keptn-lifecycle-toolkit-system -spec: - ports: - - name: metrics - port: 2222 - protocol: TCP - targetPort: metrics - selector: - control-plane: lifecycle-operator ---- -apiVersion: v1 -kind: Service -metadata: - name: lifecycle-webhook-service - namespace: keptn-lifecycle-toolkit-system -spec: - ports: - - port: 443 - protocol: TCP - targetPort: 9443 - selector: - control-plane: lifecycle-operator ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/part-of: keptn-lifecycle-toolkit - control-plane: lifecycle-operator - keptn.sh/inject-cert: "true" - name: lifecycle-operator - namespace: keptn-lifecycle-toolkit-system -spec: - replicas: 1 - selector: - matchLabels: - control-plane: lifecycle-operator - template: - metadata: - annotations: - kubectl.kubernetes.io/default-container: manager - metrics.dynatrace.com/port: "2222" - metrics.dynatrace.com/scrape: "true" - labels: - control-plane: lifecycle-operator - spec: - containers: - - args: - - webhook-server - - --leader-elect - - --adapter-port=6443 - - --adapter-certs-dir=/tmp/metrics-adapter/serving-certs - - --v=10 - command: - - /manager - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: FUNCTION_RUNNER_IMAGE - value: ghcr.io/keptn/functions-runtime:v0.8.0 - - name: PYTHON_RUNNER_IMAGE - value: ghcr.io/keptn/python-runtime:v0.8.0 - - name: OTEL_COLLECTOR_URL - value: otel-collector:4317 - - name: KEPTN_APP_CONTROLLER_LOG_LEVEL - value: "0" - - name: KEPTN_APP_CREATION_REQUEST_CONTROLLER_LOG_LEVEL - value: "0" - - name: KEPTN_APP_VERSION_CONTROLLER_LOG_LEVEL - value: "0" - - name: KEPTN_EVALUATION_CONTROLLER_LOG_LEVEL - value: "0" - - name: KEPTN_TASK_CONTROLLER_LOG_LEVEL - value: "0" - - name: KEPTN_TASK_DEFINITION_CONTROLLER_LOG_LEVEL - value: "0" - - name: KEPTN_WORKLOAD_CONTROLLER_LOG_LEVEL - value: "0" - - name: KEPTN_WORKLOAD_INSTANCE_CONTROLLER_LOG_LEVEL - value: "0" - - name: OPTIONS_CONTROLLER_LOG_LEVEL - value: "0" - image: ghcr.io/keptn/lifecycle-operator:v0.8.0 - imagePullPolicy: Always - livenessProbe: - httpGet: - path: /healthz - port: 8081 - initialDelaySeconds: 15 - periodSeconds: 20 - name: manager - ports: - - containerPort: 9443 - name: webhook-server - protocol: TCP - - containerPort: 2222 - name: metrics - protocol: TCP - readinessProbe: - httpGet: - path: /readyz - port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - privileged: false - runAsGroup: 65532 - runAsNonRoot: true - runAsUser: 65532 - seccompProfile: - type: RuntimeDefault - volumeMounts: - - mountPath: /tmp/k8s-webhook-server/serving-certs/ - name: certs-dir - - mountPath: /tmp/metrics-adapter/serving-certs - name: adapter-certs-dir - securityContext: - runAsNonRoot: true - serviceAccountName: lifecycle-operator - terminationGracePeriodSeconds: 10 - volumes: - - emptyDir: {} - name: certs-dir - - emptyDir: {} - name: adapter-certs-dir ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: MutatingWebhookConfiguration -metadata: - creationTimestamp: null - labels: - app.kubernetes.io/part-of: keptn-lifecycle-toolkit - keptn.sh/inject-cert: "true" - name: lifecycle-mutating-webhook-configuration -webhooks: -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: lifecycle-webhook-service - namespace: keptn-lifecycle-toolkit-system - path: /mutate-v1-pod - failurePolicy: Fail - name: mpod.keptn.sh - namespaceSelector: - matchExpressions: - - key: control-plane - operator: NotIn - values: - - lifecycle-operator - - key: kubernetes.io/metadata.name - operator: NotIn - values: - - kube-system - - kube-public - - kube-node-lease - - cert-manager - - keptn-lifecycle-toolkit-system - - observability - - monitoring - rules: - - apiGroups: - - "" - apiVersions: - - v1 - operations: - - CREATE - - UPDATE - resources: - - pods - sideEffects: None ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingWebhookConfiguration -metadata: - creationTimestamp: null - labels: - keptn.sh/inject-cert: "true" - name: lifecycle-validating-webhook-configuration -webhooks: -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: lifecycle-webhook-service - namespace: keptn-lifecycle-toolkit-system - path: /validate-lifecycle-keptn-sh-v1alpha3-keptntaskdefinition - failurePolicy: Fail - name: vkeptntaskdefinition.kb.io - rules: - - apiGroups: - - lifecycle.keptn.sh - apiVersions: - - v1alpha3 - operations: - - CREATE - - UPDATE - resources: - - keptntaskdefinitions - sideEffects: None From 8e5e61a3f8310f87de0ea2e29a0f9b8416aaa794 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Fri, 4 Aug 2023 17:53:05 +0100 Subject: [PATCH 05/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .../actions/deploy-klt-on-cluster/action.yml | 1 - .github/workflows/helm-checks.yaml | 148 ------------------ .github/workflows/validate-helm-chart.yml | 33 ---- 3 files changed, 182 deletions(-) delete mode 100644 .github/workflows/helm-checks.yaml diff --git a/.github/actions/deploy-klt-on-cluster/action.yml b/.github/actions/deploy-klt-on-cluster/action.yml index 9b03aea25f..cc4e6fb8e9 100644 --- a/.github/actions/deploy-klt-on-cluster/action.yml +++ b/.github/actions/deploy-klt-on-cluster/action.yml @@ -89,7 +89,6 @@ runs: shell: bash run: | echo "Installing KLT using helm" - make helm-package helm version helm install -n keptn-lifecycle-toolkit-system --create-namespace toolkit ./helm/chart \ --set scheduler.scheduler.imagePullPolicy=Never \ diff --git a/.github/workflows/helm-checks.yaml b/.github/workflows/helm-checks.yaml deleted file mode 100644 index 7e0f0dc2cd..0000000000 --- a/.github/workflows/helm-checks.yaml +++ /dev/null @@ -1,148 +0,0 @@ -name: Helm-test -on: - schedule: - - cron: '0 3 * * 1' # run tests at 1 AM (UTC), every monday (1) - workflow_dispatch: - -env: - GO_VERSION: "~1.20" - # renovate: datasource=github-releases depName=kubernetes-sigs/controller-tools - CONTROLLER_TOOLS_VERSION: "v0.12.1" - ENVTEST_K8S_VERSION: "1.24.2" - SCHEDULER_COMPATIBLE_K8S_VERSION: "v0.24.3" -defaults: - run: - shell: bash - -jobs: - prepare_ci_run: - name: Prepare CI Run - runs-on: ubuntu-22.04 - outputs: - GIT_SHA: ${{ steps.extract_branch.outputs.GIT_SHA }} - BRANCH: ${{ steps.extract_branch.outputs.BRANCH }} - BRANCH_SLUG: ${{ steps.extract_branch.outputs.BRANCH_SLUG }} - DATETIME: ${{ steps.get_datetime.outputs.DATETIME }} - BUILD_TIME: ${{ steps.get_datetime.outputs.BUILD_TIME }} - - steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Extract branch name - id: extract_branch - uses: keptn/gh-action-extract-branch-name@main - - - name: Get current date and time - id: get_datetime - run: | - DATETIME=$(date +'%Y%m%d%H%M') - BUILD_TIME=$(date -u "+%F_%T") - echo "DATETIME=$DATETIME" >> "$GITHUB_OUTPUT" - echo "BUILD_TIME=$BUILD_TIME" >> "$GITHUB_OUTPUT" - - build_image: - name: Build Docker Image - needs: prepare_ci_run - runs-on: ubuntu-22.04 - env: - BRANCH: ${{ needs.prepare_ci_run.outputs.BRANCH }} - DATETIME: ${{ needs.prepare_ci_run.outputs.DATETIME }} - BUILD_TIME: ${{ needs.prepare_ci_run.outputs.BUILD_TIME }} - GIT_SHA: ${{ needs.prepare_ci_run.outputs.GIT_SHA }} - RELEASE_REGISTRY: "localhost:5000/keptn" - strategy: - matrix: - config: - - name: "lifecycle-operator" - folder: "lifecycle-operator/" - - name: "metrics-operator" - folder: "metrics-operator/" - - name: "scheduler" - folder: "scheduler/" - - name: "functions-runtime" - folder: "functions-runtime/" - - name: "python-runtime" - folder: "python-runtime/" - - name: "certificate-operator" - folder: "klt-cert-manager/" - steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Cache build tools - id: cache-build-tools - uses: actions/cache@v3 - with: - path: ./${{ matrix.config.folder }}bin - key: build-tools-${{ github.ref_name }} - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Build Docker Image - uses: docker/build-push-action@v4 - with: - context: ${{ matrix.config.folder }} - platforms: linux/amd64 - target: production - tags: | - ${{ env.RELEASE_REGISTRY }}/${{ matrix.config.name }}:dev-${{ env.DATETIME }} - build-args: | - GIT_HASH=${{ env.GIT_SHA }} - RELEASE_VERSION=dev-${{ env.DATETIME }} - BUILD_TIME=${{ env.BUILD_TIME }} - CONTROLLER_TOOLS_VERSION=${{ env.CONTROLLER_TOOLS_VERSION }} - SCHEDULER_COMPATIBLE_K8S_VERSION=${{ env.SCHEDULER_COMPATIBLE_K8S_VERSION }} - builder: ${{ steps.buildx.outputs.name }} - push: false - cache-from: type=gha,scope=${{ github.ref_name }}-${{ matrix.config.name }} - cache-to: type=gha,scope=${{ github.ref_name }}-${{ matrix.config.name }} - outputs: type=docker,dest=/tmp/${{ matrix.config.name }}-image.tar - - - name: Upload image as artifact - uses: actions/upload-artifact@v3 - with: - name: ${{ matrix.config.name }}-image.tar - path: /tmp/${{ matrix.config.name }}-image.tar - - - build_helm_chart: - name: Build Helm Chart - needs: [prepare_ci_run, build_image] - runs-on: ubuntu-22.04 - env: - RELEASE_REGISTRY: "localhost:5000/keptn" - DATETIME: ${{ needs.prepare_ci_run.outputs.DATETIME }} - steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Generate helm charts - run: | - make helm-package RELEASE_REGISTRY=${{ env.RELEASE_REGISTRY }} CHART_APPVERSION=dev-${{ env.DATETIME }} - for file in $(find ./helm/chart/templates -type f -name "*.yaml"); - do - sed -i 's/{{ include "chart.fullname" . }}-//g' "$file" - done - - - name: Upload KLT helm charts archive - uses: actions/upload-artifact@v3 - with: - name: keptn-lifecycle-toolkit.tgz - path: ./helm/chart/* - - - name: Upload generated helm yaml - uses: actions/upload-artifact@v3 - with: - name: helmchart.yaml - path: ./helmchart.yaml - - integration_tests: - name: Integration Tests - needs: [prepare_ci_run, build_helm_chart] - with: - runtime_tag: dev-${{ needs.prepare_ci_run.outputs.DATETIME }} - helm-install: true - uses: ./.github/workflows/integration-test.yml diff --git a/.github/workflows/validate-helm-chart.yml b/.github/workflows/validate-helm-chart.yml index 1140e3d95c..4d2b4f3193 100644 --- a/.github/workflows/validate-helm-chart.yml +++ b/.github/workflows/validate-helm-chart.yml @@ -54,36 +54,3 @@ jobs: echo "" echo "Helm values documentation is correct!" fi - - helm-generation-check: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Cache build tools - id: cache-build-tools - uses: actions/cache@v3 - with: - path: ./bin - key: build-tools-${{ github.ref_name }} - - - name: Generate helm charts - env: - RELEASE_REGISTRY: ghcr.io/keptn - run: make helm-package - - - name: Compare YAML file changes - run: | - if [ -z "$(git status --porcelain)" ]; then - echo "" - echo "There are no changes in the manifests" - else - echo "" - echo "Helm charts were not re-generated. Please regenerate them using make helm-package RELEASE_REGISTRY=ghcr.io/keptn" - echo "" - echo "=========== Diff ===========" - git diff - exit 1 - fi From 5f06a9f56c5d757888c5f6feff6594391b4f0bd6 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Fri, 4 Aug 2023 18:03:32 +0100 Subject: [PATCH 06/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .github/workflows/validate-helm-chart.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/validate-helm-chart.yml b/.github/workflows/validate-helm-chart.yml index 4d2b4f3193..a7c08f0a70 100644 --- a/.github/workflows/validate-helm-chart.yml +++ b/.github/workflows/validate-helm-chart.yml @@ -23,12 +23,7 @@ jobs: uses: actions/setup-node@v3.7.0 with: node-version: 16 - - - name: Generate helm charts - env: - RELEASE_REGISTRY: ghcr.io/keptn - run: make helm-package - + - name: Install readme generator run: | git clone https://github.com/bitnami-labs/readme-generator-for-helm.git From eda83d3d1252c6df11919cceb279b5822f5d1437 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Fri, 4 Aug 2023 18:18:21 +0100 Subject: [PATCH 07/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .github/workflows/validate-helm-chart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-helm-chart.yml b/.github/workflows/validate-helm-chart.yml index a7c08f0a70..4f23b17913 100644 --- a/.github/workflows/validate-helm-chart.yml +++ b/.github/workflows/validate-helm-chart.yml @@ -23,7 +23,7 @@ jobs: uses: actions/setup-node@v3.7.0 with: node-version: 16 - + - name: Install readme generator run: | git clone https://github.com/bitnami-labs/readme-generator-for-helm.git From 88aef5d061c204d3367e537f138b854830cb7384 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Fri, 4 Aug 2023 18:23:42 +0100 Subject: [PATCH 08/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .github/workflows/validate-helm-chart.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/validate-helm-chart.yml b/.github/workflows/validate-helm-chart.yml index 4f23b17913..6bc9b62dde 100644 --- a/.github/workflows/validate-helm-chart.yml +++ b/.github/workflows/validate-helm-chart.yml @@ -22,8 +22,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v3.7.0 with: - node-version: 16 - + node-version: 16 - name: Install readme generator run: | git clone https://github.com/bitnami-labs/readme-generator-for-helm.git From cb444b45a2070df8aa6bea096d240d60f2a190c5 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Fri, 4 Aug 2023 18:30:36 +0100 Subject: [PATCH 09/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .github/workflows/validate-helm-chart.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-helm-chart.yml b/.github/workflows/validate-helm-chart.yml index 6bc9b62dde..43caf76339 100644 --- a/.github/workflows/validate-helm-chart.yml +++ b/.github/workflows/validate-helm-chart.yml @@ -22,7 +22,8 @@ jobs: - name: Set up Node uses: actions/setup-node@v3.7.0 with: - node-version: 16 + node-version: 16 + - name: Install readme generator run: | git clone https://github.com/bitnami-labs/readme-generator-for-helm.git From c186e6b13783f0c055ec05224644db3ab7ee567e Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Fri, 4 Aug 2023 23:19:04 +0100 Subject: [PATCH 10/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 From ec1202d6619d9e5e4daa319c261a725e2674d2be Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Fri, 4 Aug 2023 23:23:47 +0100 Subject: [PATCH 11/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .github/workflows/validate-helm-chart.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/validate-helm-chart.yml b/.github/workflows/validate-helm-chart.yml index 43caf76339..727d32af41 100644 --- a/.github/workflows/validate-helm-chart.yml +++ b/.github/workflows/validate-helm-chart.yml @@ -22,8 +22,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v3.7.0 with: - node-version: 16 - + node-version: 16 - name: Install readme generator run: | git clone https://github.com/bitnami-labs/readme-generator-for-helm.git From e0556a4412123deedf7a619c4b5784f6bf48a406 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Fri, 4 Aug 2023 23:31:09 +0100 Subject: [PATCH 12/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .github/workflows/validate-helm-chart.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-helm-chart.yml b/.github/workflows/validate-helm-chart.yml index 727d32af41..88b836bc76 100644 --- a/.github/workflows/validate-helm-chart.yml +++ b/.github/workflows/validate-helm-chart.yml @@ -22,7 +22,8 @@ jobs: - name: Set up Node uses: actions/setup-node@v3.7.0 with: - node-version: 16 + node-version: 16 + - name: Install readme generator run: | git clone https://github.com/bitnami-labs/readme-generator-for-helm.git @@ -48,3 +49,4 @@ jobs: echo "" echo "Helm values documentation is correct!" fi + \ No newline at end of file From 61c240fb87706dccb91a066e8911c767e6ce7411 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Mon, 7 Aug 2023 10:14:58 +0100 Subject: [PATCH 13/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .github/workflows/validate-helm-chart.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/validate-helm-chart.yml b/.github/workflows/validate-helm-chart.yml index 88b836bc76..7dc5071669 100644 --- a/.github/workflows/validate-helm-chart.yml +++ b/.github/workflows/validate-helm-chart.yml @@ -23,7 +23,7 @@ jobs: uses: actions/setup-node@v3.7.0 with: node-version: 16 - + - name: Install readme generator run: | git clone https://github.com/bitnami-labs/readme-generator-for-helm.git @@ -49,4 +49,3 @@ jobs: echo "" echo "Helm values documentation is correct!" fi - \ No newline at end of file From 80d2286c0bd737733d28bc0c214152c0eeaf4c56 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Mon, 7 Aug 2023 10:18:06 +0100 Subject: [PATCH 14/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .github/workflows/validate-helm-chart.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/validate-helm-chart.yml b/.github/workflows/validate-helm-chart.yml index 7dc5071669..2f580b6e25 100644 --- a/.github/workflows/validate-helm-chart.yml +++ b/.github/workflows/validate-helm-chart.yml @@ -24,6 +24,8 @@ jobs: with: node-version: 16 + + - name: Install readme generator run: | git clone https://github.com/bitnami-labs/readme-generator-for-helm.git From 471dfcf0459c51eca4e6d07c519940ab99031737 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Mon, 7 Aug 2023 10:21:46 +0100 Subject: [PATCH 15/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .github/workflows/validate-helm-chart.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/validate-helm-chart.yml b/.github/workflows/validate-helm-chart.yml index 2f580b6e25..be2f8e352e 100644 --- a/.github/workflows/validate-helm-chart.yml +++ b/.github/workflows/validate-helm-chart.yml @@ -23,9 +23,7 @@ jobs: uses: actions/setup-node@v3.7.0 with: node-version: 16 - - - + - name: Install readme generator run: | git clone https://github.com/bitnami-labs/readme-generator-for-helm.git From d1d3d97f12c7197fb3222757f6e8424850e9fed9 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Mon, 7 Aug 2023 10:24:32 +0100 Subject: [PATCH 16/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 From 33fa7ba224f662268bec7efd0352085cc7fe62c9 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Mon, 7 Aug 2023 10:50:23 +0100 Subject: [PATCH 17/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .../config/crd/bases/metrics.keptn.sh_keptnmetrics.yaml | 2 +- .../crd/bases/metrics.keptn.sh_keptnmetricsproviders.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetrics.yaml b/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetrics.yaml index cca55c3374..08a3483b55 100644 --- a/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetrics.yaml +++ b/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetrics.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.12.0 name: keptnmetrics.metrics.keptn.sh spec: group: metrics.keptn.sh diff --git a/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetricsproviders.yaml b/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetricsproviders.yaml index 886d2a7da9..c2558eb074 100644 --- a/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetricsproviders.yaml +++ b/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetricsproviders.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.1 + controller-gen.kubebuilder.io/version: v0.12.0 name: keptnmetricsproviders.metrics.keptn.sh spec: group: metrics.keptn.sh From ec289079ec1d698ffad2b345af7e68f5d8fe3219 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Mon, 7 Aug 2023 11:27:55 +0100 Subject: [PATCH 18/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- helm/.gitignore | 10 +- ...ificate-operator-leader-election-rbac.yaml | 18 + .../templates/certificate-operator-rbac.yaml | 92 + ...ertificate-operator-role-binding-rbac.yaml | 18 + helm/chart/templates/deployment.yaml | 490 +++++ ...-apiserver-authentication-reader-rbac.yaml | 15 + .../chart/templates/keptn-scheduler-rbac.yaml | 201 ++ helm/chart/templates/keptnapp-crd.yaml | 264 +++ .../keptnappcreationrequest-crd.yaml | 62 + helm/chart/templates/keptnappversion-crd.yaml | 816 ++++++++ helm/chart/templates/keptnconfig-crd.yaml | 65 + helm/chart/templates/keptnevaluation-crd.yaml | 384 ++++ .../keptnevaluationdefinition-crd.yaml | 192 ++ .../keptnevaluationprovider-crd.yaml | 178 ++ helm/chart/templates/keptnmetric-crd.yaml | 298 +++ .../templates/keptnmetricsprovider-crd.yaml | 140 ++ helm/chart/templates/keptntask-crd.yaml | 435 +++++ .../templates/keptntaskdefinition-crd.yaml | 1654 +++++++++++++++++ helm/chart/templates/keptnworkload-crd.yaml | 291 +++ .../templates/keptnworkloadinstance-crd.yaml | 785 ++++++++ .../chart/templates/leader-election-rbac.yaml | 42 + .../templates/lifecycle-manager-config.yaml | 25 + ...ecycle-mutating-webhook-configuration.yaml | 51 + ...fecycle-operator-leader-election-rbac.yaml | 55 + .../lifecycle-operator-metrics-service.yaml | 15 + .../templates/lifecycle-operator-rbac.yaml | 400 ++++ ...ycle-validating-webhook-configuration.yaml | 29 + .../templates/lifecycle-webhook-service.yaml | 14 + .../templates/metrics-manager-config.yaml | 25 + .../metrics-operator-hpa-controller-rbac.yaml | 15 + ...metrics-operator-leader-election-rbac.yaml | 55 + .../templates/metrics-operator-rbac.yaml | 92 + ...etrics-operator-server-resources-rbac.yaml | 16 + .../templates/metrics-operator-service.yaml | 15 + ...rics-validating-webhook-configuration.yaml | 29 + .../templates/metrics-webhook-service.yaml | 14 + helm/chart/templates/scheduler-config.yaml | 16 + .../templates/system-auth-delegator-rbac.yaml | 15 + .../v1beta1.custom.metrics.k8s.io.yaml | 16 + .../v1beta2.custom.metrics.k8s.io.yaml | 16 + 40 files changed, 7358 insertions(+), 5 deletions(-) create mode 100644 helm/chart/templates/certificate-operator-leader-election-rbac.yaml create mode 100644 helm/chart/templates/certificate-operator-rbac.yaml create mode 100644 helm/chart/templates/certificate-operator-role-binding-rbac.yaml create mode 100644 helm/chart/templates/deployment.yaml create mode 100644 helm/chart/templates/extension-apiserver-authentication-reader-rbac.yaml create mode 100644 helm/chart/templates/keptn-scheduler-rbac.yaml create mode 100644 helm/chart/templates/keptnapp-crd.yaml create mode 100644 helm/chart/templates/keptnappcreationrequest-crd.yaml create mode 100644 helm/chart/templates/keptnappversion-crd.yaml create mode 100644 helm/chart/templates/keptnconfig-crd.yaml create mode 100644 helm/chart/templates/keptnevaluation-crd.yaml create mode 100644 helm/chart/templates/keptnevaluationdefinition-crd.yaml create mode 100644 helm/chart/templates/keptnevaluationprovider-crd.yaml create mode 100644 helm/chart/templates/keptnmetric-crd.yaml create mode 100644 helm/chart/templates/keptnmetricsprovider-crd.yaml create mode 100644 helm/chart/templates/keptntask-crd.yaml create mode 100644 helm/chart/templates/keptntaskdefinition-crd.yaml create mode 100644 helm/chart/templates/keptnworkload-crd.yaml create mode 100644 helm/chart/templates/keptnworkloadinstance-crd.yaml create mode 100644 helm/chart/templates/leader-election-rbac.yaml create mode 100644 helm/chart/templates/lifecycle-manager-config.yaml create mode 100644 helm/chart/templates/lifecycle-mutating-webhook-configuration.yaml create mode 100644 helm/chart/templates/lifecycle-operator-leader-election-rbac.yaml create mode 100644 helm/chart/templates/lifecycle-operator-metrics-service.yaml create mode 100644 helm/chart/templates/lifecycle-operator-rbac.yaml create mode 100644 helm/chart/templates/lifecycle-validating-webhook-configuration.yaml create mode 100644 helm/chart/templates/lifecycle-webhook-service.yaml create mode 100644 helm/chart/templates/metrics-manager-config.yaml create mode 100644 helm/chart/templates/metrics-operator-hpa-controller-rbac.yaml create mode 100644 helm/chart/templates/metrics-operator-leader-election-rbac.yaml create mode 100644 helm/chart/templates/metrics-operator-rbac.yaml create mode 100644 helm/chart/templates/metrics-operator-server-resources-rbac.yaml create mode 100644 helm/chart/templates/metrics-operator-service.yaml create mode 100644 helm/chart/templates/metrics-validating-webhook-configuration.yaml create mode 100644 helm/chart/templates/metrics-webhook-service.yaml create mode 100644 helm/chart/templates/scheduler-config.yaml create mode 100644 helm/chart/templates/system-auth-delegator-rbac.yaml create mode 100644 helm/chart/templates/v1beta1.custom.metrics.k8s.io.yaml create mode 100644 helm/chart/templates/v1beta2.custom.metrics.k8s.io.yaml diff --git a/helm/.gitignore b/helm/.gitignore index cc68a8f325..3c14fd3ca9 100644 --- a/helm/.gitignore +++ b/helm/.gitignore @@ -1,6 +1,6 @@ *.tgz -chart/rendered.yaml -chart/templates/rendered.yaml -chart/templates/crds.yaml -chart/crds/*.yaml -chart/templates/*.yaml +# chart/rendered.yaml +# chart/templates/rendered.yaml +# chart/templates/crds.yaml +# chart/crds/*.yaml +# chart/templates/*.yaml diff --git a/helm/chart/templates/certificate-operator-leader-election-rbac.yaml b/helm/chart/templates/certificate-operator-leader-election-rbac.yaml new file mode 100644 index 0000000000..57a9cd0c99 --- /dev/null +++ b/helm/chart/templates/certificate-operator-leader-election-rbac.yaml @@ -0,0 +1,18 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "chart.fullname" . }}-certificate-operator-leader-election-rolebinding + namespace: {{ .Release.Namespace | quote }} + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: certificate-operator + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + {{- include "chart.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: '{{ include "chart.fullname" . }}-leader-election-role' +subjects: +- kind: ServiceAccount + name: '{{ include "chart.fullname" . }}-certificate-operator' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/certificate-operator-rbac.yaml b/helm/chart/templates/certificate-operator-rbac.yaml new file mode 100644 index 0000000000..0053fe01a3 --- /dev/null +++ b/helm/chart/templates/certificate-operator-rbac.yaml @@ -0,0 +1,92 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "chart.fullname" . }}-certificate-operator-role + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +rules: +- apiGroups: + - "" + resources: + - secrets + verbs: + - create + - list + - watch +- apiGroups: + - "" + resourceNames: + - klt-certs + resources: + - secrets + verbs: + - get + - patch + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "chart.fullname" . }}-certificate-operator-role + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +rules: +- apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + verbs: + - get + - list + - patch + - update + - watch +- apiGroups: + - admissionregistration.k8s.io + resources: + - validatingwebhookconfigurations + verbs: + - get + - list + - patch + - update + - watch +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - deployments + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "chart.fullname" . }}-certificate-operator-rolebinding + namespace: {{ .Release.Namespace | quote }} + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: certificate-operator + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + {{- include "chart.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: '{{ include "chart.fullname" . }}-certificate-operator-role' +subjects: +- kind: ServiceAccount + name: '{{ include "chart.fullname" . }}-certificate-operator' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/certificate-operator-role-binding-rbac.yaml b/helm/chart/templates/certificate-operator-role-binding-rbac.yaml new file mode 100644 index 0000000000..a17ed1d259 --- /dev/null +++ b/helm/chart/templates/certificate-operator-role-binding-rbac.yaml @@ -0,0 +1,18 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "chart.fullname" . }}-certificate-operator-role-binding + namespace: {{ .Release.Namespace | quote }} + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: certificate-operator + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + {{- include "chart.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: '{{ include "chart.fullname" . }}-certificate-operator-role' +subjects: +- kind: ServiceAccount + name: '{{ include "chart.fullname" . }}-certificate-operator' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/deployment.yaml b/helm/chart/templates/deployment.yaml new file mode 100644 index 0000000000..92e6e506bf --- /dev/null +++ b/helm/chart/templates/deployment.yaml @@ -0,0 +1,490 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "chart.fullname" . }}-certificate-operator + namespace: {{ .Release.Namespace | quote }} + labels: + app.kuberentes.io/instance: certificate-operator + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: certificate-operator + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + {{- include "chart.labels" . | nindent 4 }} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "chart.fullname" . }}-keptn-scheduler + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "chart.fullname" . }}-lifecycle-operator + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "chart.fullname" . }}-metrics-operator + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "chart.fullname" . }}-certificate-operator + namespace: {{ .Release.Namespace | quote }} + labels: + app.kubernetes.io/component: manager + app.kubernetes.io/created-by: certificate-operator + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + control-plane: certificate-operator + {{- include "chart.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.certificateOperator.replicas }} + selector: + matchLabels: + control-plane: certificate-operator + {{- include "chart.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + control-plane: certificate-operator + {{- include "chart.selectorLabels" . | nindent 8 }} + annotations: + kubectl.kubernetes.io/default-container: manager + spec: + containers: + - args: + - --leader-elect + command: + - /manager + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: LABEL_SELECTOR_KEY + value: {{ .Values.certificateOperator.manager.env.labelSelectorKey | quote }} + - name: LABEL_SELECTOR_VALUE + value: {{ .Values.certificateOperator.manager.env.labelSelectorValue | quote }} + - name: KUBERNETES_CLUSTER_DOMAIN + value: {{ .Values.kubernetesClusterDomain }} + image: {{ .Values.certificateOperator.manager.image.repository }}:{{ .Values.certificateOperator.manager.image.tag + | default .Chart.AppVersion }} + imagePullPolicy: {{ .Values.certificateOperator.manager.imagePullPolicy }} + name: manager + resources: {{- toYaml .Values.certificateOperator.manager.resources | nindent 10 + }} + securityContext: + allowPrivilegeEscalation: {{ .Values.certificateOperator.manager.containerSecurityContext.allowPrivilegeEscalation + }} + capabilities: {{- include "tplvalues.render" (dict "value" .Values.certificateOperator.manager.containerSecurityContext.capabilities + "context" $) | nindent 12 }} + readOnlyRootFilesystem: {{ .Values.certificateOperator.manager.containerSecurityContext.readOnlyRootFilesystem + }} + runAsGroup: {{ .Values.certificateOperator.manager.containerSecurityContext.runAsGroup + }} + runAsUser: {{ .Values.certificateOperator.manager.containerSecurityContext.runAsUser + }} + seccompProfile: {{- include "tplvalues.render" (dict "value" .Values.certificateOperator.manager.containerSecurityContext.seccompProfile + "context" $) | nindent 12 }} + {{- if .Values.certificateOperator.manager.livenessProbe }} + livenessProbe: {{- include "tplvalues.render" (dict "value" .Values.certificateOperator.manager.livenessProbe "context" $) | nindent 10 }} + {{- else }} + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + {{- end }} + {{- if .Values.certificateOperator.manager.readinessProbe }} + readinessProbe: {{- include "tplvalues.render" (dict "value" .Values.certificateOperator.manager.readinessProbe "context" $) | nindent 10 }} + {{- else }} + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + {{- end }} + imagePullSecrets: {{ .Values.imagePullSecrets | default list | toJson }} + securityContext: + runAsNonRoot: true + serviceAccountName: {{ include "chart.fullname" . }}-certificate-operator + terminationGracePeriodSeconds: 10 +{{- if .Values.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" $) | nindent 8 }} +{{- end }} +{{- if .Values.nodeSelector }} + nodeSelector: {{- include "tplvalues.render" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }} +{{- end }} +{{- if .Values.tolerations }} + tolerations: {{- include "tplvalues.render" (dict "value" .Values.tolerations "context" .) | nindent 8 }} +{{- end }} + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "chart.fullname" . }}-lifecycle-operator + namespace: {{ .Release.Namespace | quote }} + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + control-plane: lifecycle-operator + keptn.sh/inject-cert: "true" + {{- include "chart.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.lifecycleOperator.replicas }} + selector: + matchLabels: + control-plane: lifecycle-operator + {{- include "chart.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + control-plane: lifecycle-operator + {{- include "chart.selectorLabels" . | nindent 8 }} + annotations: + kubectl.kubernetes.io/default-container: manager + metrics.dynatrace.com/port: "2222" + metrics.dynatrace.com/scrape: "true" + spec: + containers: + - args: + - --leader-elect + command: + - /manager + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: FUNCTION_RUNNER_IMAGE + value: {{ .Values.lifecycleOperator.manager.env.functionRunnerImage | quote }} + - name: PYTHON_RUNNER_IMAGE + value: {{ .Values.lifecycleOperator.manager.env.pythonRunnerImage | quote }} + - name: OTEL_COLLECTOR_URL + value: {{ .Values.lifecycleOperator.manager.env.otelCollectorUrl | quote }} + - name: KEPTN_APP_CONTROLLER_LOG_LEVEL + value: {{ .Values.lifecycleOperator.manager.env.keptnAppControllerLogLevel | quote + }} + - name: KEPTN_APP_CREATION_REQUEST_CONTROLLER_LOG_LEVEL + value: {{ .Values.lifecycleOperator.manager.env.keptnAppCreationRequestControllerLogLevel + | quote }} + - name: KEPTN_APP_VERSION_CONTROLLER_LOG_LEVEL + value: {{ .Values.lifecycleOperator.manager.env.keptnAppVersionControllerLogLevel + | quote }} + - name: KEPTN_EVALUATION_CONTROLLER_LOG_LEVEL + value: {{ .Values.lifecycleOperator.manager.env.keptnEvaluationControllerLogLevel + | quote }} + - name: KEPTN_TASK_CONTROLLER_LOG_LEVEL + value: {{ .Values.lifecycleOperator.manager.env.keptnTaskControllerLogLevel | quote + }} + - name: KEPTN_TASK_DEFINITION_CONTROLLER_LOG_LEVEL + value: {{ .Values.lifecycleOperator.manager.env.keptnTaskDefinitionControllerLogLevel + | quote }} + - name: KEPTN_WORKLOAD_CONTROLLER_LOG_LEVEL + value: {{ .Values.lifecycleOperator.manager.env.keptnWorkloadControllerLogLevel + | quote }} + - name: KEPTN_WORKLOAD_INSTANCE_CONTROLLER_LOG_LEVEL + value: {{ .Values.lifecycleOperator.manager.env.keptnWorkloadInstanceControllerLogLevel + | quote }} + - name: OPTIONS_CONTROLLER_LOG_LEVEL + value: {{ .Values.lifecycleOperator.manager.env.optionsControllerLogLevel | quote + }} + - name: KUBERNETES_CLUSTER_DOMAIN + value: {{ .Values.kubernetesClusterDomain }} + image: {{ .Values.lifecycleOperator.manager.image.repository }}:{{ .Values.lifecycleOperator.manager.image.tag + | default .Chart.AppVersion }} + imagePullPolicy: {{ .Values.lifecycleOperator.manager.imagePullPolicy }} + name: manager + ports: + - containerPort: 9443 + name: webhook-server + protocol: TCP + - containerPort: 2222 + name: metrics + protocol: TCP + resources: {{- toYaml .Values.lifecycleOperator.manager.resources | nindent 10 }} + securityContext: + allowPrivilegeEscalation: {{ .Values.lifecycleOperator.manager.containerSecurityContext.allowPrivilegeEscalation + }} + capabilities: {{- include "tplvalues.render" (dict "value" .Values.lifecycleOperator.manager.containerSecurityContext.capabilities + "context" $) | nindent 12 }} + privileged: {{ .Values.lifecycleOperator.manager.containerSecurityContext.privileged + }} + runAsGroup: {{ .Values.lifecycleOperator.manager.containerSecurityContext.runAsGroup + }} + runAsNonRoot: {{ .Values.lifecycleOperator.manager.containerSecurityContext.runAsNonRoot + }} + runAsUser: {{ .Values.lifecycleOperator.manager.containerSecurityContext.runAsUser + }} + seccompProfile: {{- include "tplvalues.render" (dict "value" .Values.lifecycleOperator.manager.containerSecurityContext.seccompProfile + "context" $) | nindent 12 }} + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs/ + name: certs-dir + - mountPath: /tmp/metrics-adapter/serving-certs + name: adapter-certs-dir + {{- if .Values.lifecycleOperator.manager.livenessProbe }} + livenessProbe: {{- include "tplvalues.render" (dict "value" .Values.lifecycleOperator.manager.livenessProbe "context" $) | nindent 10 }} + {{- else }} + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + {{- end }} + {{- if .Values.lifecycleOperator.manager.readinessProbe }} + readinessProbe: {{- include "tplvalues.render" (dict "value" .Values.lifecycleOperator.manager.readinessProbe "context" $) | nindent 10 }} + {{- else }} + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + {{- end }} + imagePullSecrets: {{ .Values.imagePullSecrets | default list | toJson }} + securityContext: + runAsNonRoot: true + serviceAccountName: {{ include "chart.fullname" . }}-lifecycle-operator + terminationGracePeriodSeconds: 10 + volumes: + - emptyDir: {} + name: certs-dir + - emptyDir: {} + name: adapter-certs-dir +{{- if .Values.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" $) | nindent 8 }} +{{- end }} +{{- if .Values.nodeSelector }} + nodeSelector: {{- include "tplvalues.render" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }} +{{- end }} +{{- if .Values.tolerations }} + tolerations: {{- include "tplvalues.render" (dict "value" .Values.tolerations "context" .) | nindent 8 }} +{{- end }} + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "chart.fullname" . }}-metrics-operator + namespace: {{ .Release.Namespace | quote }} + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + control-plane: metrics-operator + keptn.sh/inject-cert: "true" + {{- include "chart.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.metricsOperator.replicas }} + selector: + matchLabels: + control-plane: metrics-operator + {{- include "chart.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + control-plane: metrics-operator + {{- include "chart.selectorLabels" . | nindent 8 }} + annotations: + kubectl.kubernetes.io/default-container: manager + spec: + containers: + - args: + - webhook-server + - --leader-elect + - --adapter-port=6443 + - --adapter-certs-dir=/tmp/metrics-adapter/serving-certs + - --v=10 + command: + - /manager + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: EXPOSE_KEPTN_METRICS + value: {{ .Values.metricsOperator.manager.env.exposeKeptnMetrics | quote }} + - name: METRICS_CONTROLLER_LOG_LEVEL + value: {{ .Values.metricsOperator.manager.env.metricsControllerLogLevel | quote + }} + - name: KUBERNETES_CLUSTER_DOMAIN + value: {{ .Values.kubernetesClusterDomain }} + image: {{ .Values.metricsOperator.manager.image.repository }}:{{ .Values.metricsOperator.manager.image.tag + | default .Chart.AppVersion }} + name: manager + ports: + - containerPort: 9443 + name: webhook-server + protocol: TCP + - containerPort: 9999 + name: metrics + protocol: TCP + - containerPort: 6443 + name: custom-metrics + protocol: TCP + resources: {{- toYaml .Values.metricsOperator.manager.resources | nindent 10 }} + securityContext: + allowPrivilegeEscalation: {{ .Values.metricsOperator.manager.containerSecurityContext.allowPrivilegeEscalation + }} + capabilities: {{- include "tplvalues.render" (dict "value" .Values.metricsOperator.manager.containerSecurityContext.capabilities + "context" $) | nindent 12 }} + privileged: {{ .Values.metricsOperator.manager.containerSecurityContext.privileged + }} + runAsGroup: {{ .Values.metricsOperator.manager.containerSecurityContext.runAsGroup + }} + runAsNonRoot: {{ .Values.metricsOperator.manager.containerSecurityContext.runAsNonRoot + }} + runAsUser: {{ .Values.metricsOperator.manager.containerSecurityContext.runAsUser + }} + seccompProfile: {{- include "tplvalues.render" (dict "value" .Values.metricsOperator.manager.containerSecurityContext.seccompProfile + "context" $) | nindent 12 }} + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs/ + name: certs-dir + - mountPath: /tmp/metrics-adapter/serving-certs + name: adapter-certs-dir + {{- if .Values.metricsOperator.manager.livenessProbe }} + livenessProbe: {{- include "tplvalues.render" (dict "value" .Values.metricsOperator.manager.livenessProbe "context" $) | nindent 10 }} + {{- else }} + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + {{- end }} + {{- if .Values.metricsOperator.manager.readinessProbe }} + readinessProbe: {{- include "tplvalues.render" (dict "value" .Values.metricsOperator.manager.readinessProbe "context" $) | nindent 10 }} + {{- else }} + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + {{- end }} + imagePullSecrets: {{ .Values.imagePullSecrets | default list | toJson }} + securityContext: + runAsNonRoot: true + serviceAccountName: {{ include "chart.fullname" . }}-metrics-operator + terminationGracePeriodSeconds: 10 + volumes: + - emptyDir: {} + name: certs-dir + - emptyDir: {} + name: adapter-certs-dir +{{- if .Values.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" $) | nindent 8 }} +{{- end }} +{{- if .Values.nodeSelector }} + nodeSelector: {{- include "tplvalues.render" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }} +{{- end }} +{{- if .Values.tolerations }} + tolerations: {{- include "tplvalues.render" (dict "value" .Values.tolerations "context" .) | nindent 8 }} +{{- end }} + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "chart.fullname" . }}-scheduler + namespace: {{ .Release.Namespace | quote }} + labels: + component: scheduler + {{- include "chart.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.scheduler.replicas }} + selector: + matchLabels: + component: scheduler + {{- include "chart.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + component: scheduler + {{- include "chart.selectorLabels" . | nindent 8 }} + spec: + containers: + - command: + - /bin/kube-scheduler + - --config=/etc/kubernetes/scheduler-config.yaml + env: + - name: OTEL_COLLECTOR_URL + value: {{ .Values.scheduler.scheduler.env.otelCollectorUrl | quote }} + - name: KUBERNETES_CLUSTER_DOMAIN + value: {{ .Values.kubernetesClusterDomain }} + image: {{ .Values.scheduler.scheduler.image.repository }}:{{ .Values.scheduler.scheduler.image.tag + | default .Chart.AppVersion }} + imagePullPolicy: {{ .Values.scheduler.scheduler.imagePullPolicy }} + name: scheduler + resources: {{- toYaml .Values.scheduler.scheduler.resources | nindent 10 }} + securityContext: + allowPrivilegeEscalation: {{ .Values.scheduler.scheduler.containerSecurityContext.allowPrivilegeEscalation + }} + capabilities: {{- include "tplvalues.render" (dict "value" .Values.scheduler.scheduler.containerSecurityContext.capabilities + "context" $) | nindent 12 }} + privileged: {{ .Values.scheduler.scheduler.containerSecurityContext.privileged + }} + readOnlyRootFilesystem: {{ .Values.scheduler.scheduler.containerSecurityContext.readOnlyRootFilesystem + }} + runAsNonRoot: {{ .Values.scheduler.scheduler.containerSecurityContext.runAsNonRoot + }} + runAsUser: {{ .Values.scheduler.scheduler.containerSecurityContext.runAsUser }} + seccompProfile: {{- include "tplvalues.render" (dict "value" .Values.scheduler.scheduler.containerSecurityContext.seccompProfile + "context" $) | nindent 12 }} + volumeMounts: + - mountPath: /etc/kubernetes + name: scheduler-config + readOnly: true + {{- if .Values.scheduler.scheduler.livenessProbe }} + livenessProbe: {{- include "tplvalues.render" (dict "value" .Values.scheduler.scheduler.livenessProbe "context" $) | nindent 10 }} + {{- else }} + livenessProbe: + httpGet: + path: /healthz + port: 10259 + scheme: HTTPS + initialDelaySeconds: 15 + {{- end }} + {{- if .Values.scheduler.scheduler.readinessProbe }} + readinessProbe: {{- include "tplvalues.render" (dict "value" .Values.scheduler.scheduler.readinessProbe "context" $) | nindent 10 }} + {{- else }} + readinessProbe: + httpGet: + path: /healthz + port: 10259 + scheme: HTTPS + {{- end }} + imagePullSecrets: {{ .Values.imagePullSecrets | default list | toJson }} + serviceAccountName: {{ include "chart.fullname" . }}-keptn-scheduler + volumes: + - configMap: + name: {{ include "chart.fullname" . }}-scheduler-config + name: scheduler-config +{{- if .Values.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" $) | nindent 8 }} +{{- end }} +{{- if .Values.nodeSelector }} + nodeSelector: {{- include "tplvalues.render" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }} +{{- end }} +{{- if .Values.tolerations }} + tolerations: {{- include "tplvalues.render" (dict "value" .Values.tolerations "context" .) | nindent 8 }} +{{- end }} diff --git a/helm/chart/templates/extension-apiserver-authentication-reader-rbac.yaml b/helm/chart/templates/extension-apiserver-authentication-reader-rbac.yaml new file mode 100644 index 0000000000..feabc0376a --- /dev/null +++ b/helm/chart/templates/extension-apiserver-authentication-reader-rbac.yaml @@ -0,0 +1,15 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "chart.fullname" . }}-extension-apiserver-authentication-reader + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: '{{ include "chart.fullname" . }}-extension-apiserver-authentication-reader' +subjects: +- kind: ServiceAccount + name: '{{ include "chart.fullname" . }}-keptn-scheduler' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/keptn-scheduler-rbac.yaml b/helm/chart/templates/keptn-scheduler-rbac.yaml new file mode 100644 index 0000000000..087a087b40 --- /dev/null +++ b/helm/chart/templates/keptn-scheduler-rbac.yaml @@ -0,0 +1,201 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "chart.fullname" . }}-keptn-scheduler + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +rules: +- apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch +- apiGroups: + - "" + - events.k8s.io + resources: + - events + verbs: + - create + - patch + - update +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - create +- apiGroups: + - coordination.k8s.io + resourceNames: + - kube-scheduler + resources: + - leases + verbs: + - get + - update +- apiGroups: + - "" + resources: + - endpoints + verbs: + - create +- apiGroups: + - "" + resourceNames: + - kube-scheduler + resources: + - endpoints + verbs: + - get + - update +- apiGroups: + - "" + resources: + - nodes + verbs: + - get + - list + - watch + - patch +- apiGroups: + - "" + resources: + - pods + verbs: + - delete + - get + - list + - watch + - update +- apiGroups: + - "" + resources: + - bindings + - pods/binding + verbs: + - create +- apiGroups: + - "" + resources: + - pods/status + verbs: + - patch + - update +- apiGroups: + - "" + resources: + - replicationcontrollers + - services + verbs: + - get + - list + - watch +- apiGroups: + - apps + - extensions + resources: + - replicasets + verbs: + - get + - list + - watch +- apiGroups: + - apps + resources: + - statefulsets + verbs: + - get + - list + - watch +- apiGroups: + - policy + resources: + - poddisruptionbudgets + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - persistentvolumeclaims + - persistentvolumes + verbs: + - get + - list + - watch + - patch + - update +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +- apiGroups: + - storage.k8s.io + resources: + - csinodes + - storageclasses + - csidrivers + - csistoragecapacities + verbs: + - get + - list + - watch +- apiGroups: + - scheduling.sigs.k8s.io + resources: + - podgroups + - elasticquotas + verbs: + - get + - list + - watch + - create + - delete + - update + - patch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnworkloadinstances + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "chart.fullname" . }}-keptn-scheduler + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: '{{ include "chart.fullname" . }}-keptn-scheduler' +subjects: +- kind: ServiceAccount + name: '{{ include "chart.fullname" . }}-keptn-scheduler' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/keptnapp-crd.yaml b/helm/chart/templates/keptnapp-crd.yaml new file mode 100644 index 0000000000..a5521c96a1 --- /dev/null +++ b/helm/chart/templates/keptnapp-crd.yaml @@ -0,0 +1,264 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnapps.lifecycle.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + {{- include "chart.labels" . | nindent 4 }} +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: '{{ include "chart.fullname" . }}-lifecycle-webhook-service' + namespace: '{{ .Release.Namespace }}' + path: /convert + conversionReviewVersions: + - v1 + group: lifecycle.keptn.sh + names: + kind: KeptnApp + listKind: KeptnAppList + plural: keptnapps + singular: keptnapp + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnApp is the Schema for the keptnapps 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 + spec: + description: KeptnAppSpec defines the desired state of KeptnApp + properties: + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + version: + type: string + workloads: + items: + properties: + name: + type: string + version: + type: string + required: + - name + - version + type: object + type: array + required: + - version + type: object + status: + description: KeptnAppStatus defines the observed state of KeptnApp + properties: + currentVersion: + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnApp is the Schema for the keptnapps 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 + spec: + description: KeptnAppSpec defines the desired state of KeptnApp + properties: + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + revision: + default: 1 + type: integer + version: + type: string + workloads: + items: + properties: + name: + type: string + version: + type: string + required: + - name + - version + type: object + type: array + required: + - version + type: object + status: + description: KeptnAppStatus defines the observed state of KeptnApp + properties: + currentVersion: + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnApp is the Schema for the keptnapps 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 + spec: + description: Spec describes the desired state of the KeptnApp. + properties: + postDeploymentEvaluations: + description: PostDeploymentEvaluations is a list of all evaluations + to be performed during the post-deployment phase of the KeptnApp. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + postDeploymentTasks: + description: PostDeploymentTasks is a list of all tasks to be performed + during the post-deployment phase of the KeptnApp. The items of this + list refer to the names of KeptnTaskDefinitions located in the same + namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + preDeploymentEvaluations: + description: PreDeploymentEvaluations is a list of all evaluations to + be performed during the pre-deployment phase of the KeptnApp. The + items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + preDeploymentTasks: + description: PreDeploymentTasks is a list of all tasks to be performed + during the pre-deployment phase of the KeptnApp. The items of this + list refer to the names of KeptnTaskDefinitions located in the same + namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + revision: + default: 1 + description: Revision can be modified to trigger another deployment + of a KeptnApp of the same version. This can be used for restarting + a KeptnApp which failed to deploy, e.g. due to a failed preDeploymentEvaluation/preDeploymentTask. + type: integer + version: + description: Version defines the version of the application. For automatically + created KeptnApps, the version is a function of all KeptnWorkloads + that are part of the KeptnApp. + type: string + workloads: + description: Workloads is a list of all KeptnWorkloads that are part + of the KeptnApp. + items: + description: KeptnWorkloadRef refers to a KeptnWorkload that is part + of a KeptnApp + properties: + name: + description: Name is the name of the KeptnWorkload. + type: string + version: + description: Version is the version of the KeptnWorkload. + type: string + required: + - name + - version + type: object + type: array + required: + - version + type: object + status: + description: Status describes the current state of the KeptnApp. + properties: + currentVersion: + description: CurrentVersion indicates the version that is currently + deployed or being reconciled. + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/helm/chart/templates/keptnappcreationrequest-crd.yaml b/helm/chart/templates/keptnappcreationrequest-crd.yaml new file mode 100644 index 0000000000..fdbf1442e5 --- /dev/null +++ b/helm/chart/templates/keptnappcreationrequest-crd.yaml @@ -0,0 +1,62 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnappcreationrequests.lifecycle.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + {{- include "chart.labels" . | nindent 4 }} +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnAppCreationRequest + listKind: KeptnAppCreationRequestList + plural: keptnappcreationrequests + singular: keptnappcreationrequest + scope: Namespaced + versions: + - name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnAppCreationRequest is the Schema for the keptnappcreationrequests + 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 + spec: + description: Spec describes the desired state of the KeptnAppCreationRequest. + properties: + appName: + description: AppName is the name of the KeptnApp the KeptnAppCreationRequest + should create if no user-defined object with that name is found. + type: string + required: + - appName + type: object + status: + description: Status describes the current state of the KeptnAppCreationRequest. + type: string + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/helm/chart/templates/keptnappversion-crd.yaml b/helm/chart/templates/keptnappversion-crd.yaml new file mode 100644 index 0000000000..63f0881ee6 --- /dev/null +++ b/helm/chart/templates/keptnappversion-crd.yaml @@ -0,0 +1,816 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnappversions.lifecycle.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + {{- include "chart.labels" . | nindent 4 }} +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: '{{ include "chart.fullname" . }}-lifecycle-webhook-service' + namespace: '{{ .Release.Namespace }}' + path: /convert + conversionReviewVersions: + - v1 + group: lifecycle.keptn.sh + names: + kind: KeptnAppVersion + listKind: KeptnAppVersionList + plural: keptnappversions + shortNames: + - kav + singular: keptnappversion + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.appName + name: AppName + type: string + - jsonPath: .spec.version + name: Version + type: string + - jsonPath: .status.currentPhase + name: Phase + type: string + - jsonPath: .status.preDeploymentStatus + name: PreDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.preDeploymentEvaluationStatus + name: PreDeploymentEvaluationStatus + priority: 1 + type: string + - jsonPath: .status.workloadOverallStatus + name: WorkloadOverallStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentStatus + name: PostDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentEvaluationStatus + name: PostDeploymentEvaluationStatus + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnAppVersion is the Schema for the keptnappversions 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 + spec: + description: KeptnAppVersionSpec defines the desired state of KeptnAppVersion + properties: + appName: + type: string + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + previousVersion: + type: string + traceId: + additionalProperties: + type: string + type: object + version: + type: string + workloads: + items: + properties: + name: + type: string + version: + type: string + required: + - name + - version + type: object + type: array + required: + - appName + - version + type: object + status: + description: KeptnAppVersionStatus defines the observed state of KeptnAppVersion + properties: + currentPhase: + type: string + endTime: + format: date-time + type: string + phaseTraceIDs: + additionalProperties: + additionalProperties: + type: string + description: MapCarrier is a TextMapCarrier that uses a map held in + memory as a storage medium for propagated key-value pairs. + type: object + type: object + postDeploymentEvaluationStatus: + default: Pending + type: string + postDeploymentEvaluationTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + evaluationDefinitionName: + type: string + evaluationName: + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + postDeploymentStatus: + default: Pending + type: string + postDeploymentTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + taskDefinitionName: + type: string + taskName: + type: string + type: object + type: array + preDeploymentEvaluationStatus: + default: Pending + type: string + preDeploymentEvaluationTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + evaluationDefinitionName: + type: string + evaluationName: + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentStatus: + default: Pending + type: string + preDeploymentTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + taskDefinitionName: + type: string + taskName: + type: string + type: object + type: array + startTime: + format: date-time + type: string + status: + default: Pending + type: string + workloadOverallStatus: + default: Pending + type: string + workloadStatus: + items: + properties: + status: + default: Pending + type: string + workload: + properties: + name: + type: string + version: + type: string + required: + - name + - version + type: object + type: object + type: array + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.appName + name: AppName + type: string + - jsonPath: .spec.version + name: Version + type: string + - jsonPath: .status.currentPhase + name: Phase + type: string + - jsonPath: .status.preDeploymentStatus + name: PreDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.preDeploymentEvaluationStatus + name: PreDeploymentEvaluationStatus + priority: 1 + type: string + - jsonPath: .status.workloadOverallStatus + name: WorkloadOverallStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentStatus + name: PostDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentEvaluationStatus + name: PostDeploymentEvaluationStatus + priority: 1 + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnAppVersion is the Schema for the keptnappversions 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 + spec: + description: KeptnAppVersionSpec defines the desired state of KeptnAppVersion + properties: + appName: + type: string + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + previousVersion: + type: string + revision: + default: 1 + type: integer + traceId: + additionalProperties: + type: string + type: object + version: + type: string + workloads: + items: + properties: + name: + type: string + version: + type: string + required: + - name + - version + type: object + type: array + required: + - appName + - version + type: object + status: + description: KeptnAppVersionStatus defines the observed state of KeptnAppVersion + properties: + currentPhase: + type: string + endTime: + format: date-time + type: string + phaseTraceIDs: + additionalProperties: + additionalProperties: + type: string + description: MapCarrier is a TextMapCarrier that uses a map held in + memory as a storage medium for propagated key-value pairs. + type: object + type: object + postDeploymentEvaluationStatus: + default: Pending + type: string + postDeploymentEvaluationTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + postDeploymentStatus: + default: Pending + type: string + postDeploymentTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentEvaluationStatus: + default: Pending + type: string + preDeploymentEvaluationTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentStatus: + default: Pending + type: string + preDeploymentTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + startTime: + format: date-time + type: string + status: + default: Pending + type: string + workloadOverallStatus: + default: Pending + type: string + workloadStatus: + items: + properties: + status: + default: Pending + type: string + workload: + properties: + name: + type: string + version: + type: string + required: + - name + - version + type: object + type: object + type: array + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.appName + name: AppName + type: string + - jsonPath: .spec.version + name: Version + type: string + - jsonPath: .status.currentPhase + name: Phase + type: string + - jsonPath: .status.preDeploymentStatus + name: PreDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.preDeploymentEvaluationStatus + name: PreDeploymentEvaluationStatus + priority: 1 + type: string + - jsonPath: .status.workloadOverallStatus + name: WorkloadOverallStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentStatus + name: PostDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentEvaluationStatus + name: PostDeploymentEvaluationStatus + priority: 1 + type: string + name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnAppVersion is the Schema for the keptnappversions 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 + spec: + description: Spec describes the desired state of the KeptnAppVersion. + properties: + appName: + description: AppName is the name of the KeptnApp. + type: string + postDeploymentEvaluations: + description: PostDeploymentEvaluations is a list of all evaluations + to be performed during the post-deployment phase of the KeptnApp. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + postDeploymentTasks: + description: PostDeploymentTasks is a list of all tasks to be performed + during the post-deployment phase of the KeptnApp. The items of this + list refer to the names of KeptnTaskDefinitions located in the same + namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + preDeploymentEvaluations: + description: PreDeploymentEvaluations is a list of all evaluations to + be performed during the pre-deployment phase of the KeptnApp. The + items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + preDeploymentTasks: + description: PreDeploymentTasks is a list of all tasks to be performed + during the pre-deployment phase of the KeptnApp. The items of this + list refer to the names of KeptnTaskDefinitions located in the same + namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + previousVersion: + description: PreviousVersion is the version of the KeptnApp that has + been deployed prior to this version. + type: string + revision: + default: 1 + description: Revision can be modified to trigger another deployment + of a KeptnApp of the same version. This can be used for restarting + a KeptnApp which failed to deploy, e.g. due to a failed preDeploymentEvaluation/preDeploymentTask. + type: integer + traceId: + additionalProperties: + type: string + description: TraceId contains the OpenTelemetry trace ID. + type: object + version: + description: Version defines the version of the application. For automatically + created KeptnApps, the version is a function of all KeptnWorkloads + that are part of the KeptnApp. + type: string + workloads: + description: Workloads is a list of all KeptnWorkloads that are part + of the KeptnApp. + items: + description: KeptnWorkloadRef refers to a KeptnWorkload that is part + of a KeptnApp + properties: + name: + description: Name is the name of the KeptnWorkload. + type: string + version: + description: Version is the version of the KeptnWorkload. + type: string + required: + - name + - version + type: object + type: array + required: + - appName + - version + type: object + status: + description: Status describes the current state of the KeptnAppVersion. + properties: + currentPhase: + description: CurrentPhase indicates the current phase of the KeptnAppVersion. + type: string + endTime: + description: EndTime represents the time at which the deployment of + the KeptnAppVersion finished. + format: date-time + type: string + phaseTraceIDs: + additionalProperties: + additionalProperties: + type: string + description: MapCarrier is a TextMapCarrier that uses a map held in + memory as a storage medium for propagated key-value pairs. + type: object + description: PhaseTraceIDs contains the trace IDs of the OpenTelemetry + spans of each phase of the KeptnAppVersion. + type: object + postDeploymentEvaluationStatus: + default: Pending + description: PostDeploymentEvaluationStatus indicates the current status + of the KeptnAppVersion's PostDeploymentEvaluation phase. + type: string + postDeploymentEvaluationTaskStatus: + description: PostDeploymentEvaluationTaskStatus indicates the current + state of each postDeploymentEvaluation of the KeptnAppVersion. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + postDeploymentStatus: + default: Pending + description: PostDeploymentStatus indicates the current status of the + KeptnAppVersion's PostDeployment phase. + type: string + postDeploymentTaskStatus: + description: PostDeploymentTaskStatus indicates the current state of + each postDeploymentTask of the KeptnAppVersion. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentEvaluationStatus: + default: Pending + description: PreDeploymentEvaluationStatus indicates the current status + of the KeptnAppVersion's PreDeploymentEvaluation phase. + type: string + preDeploymentEvaluationTaskStatus: + description: PreDeploymentEvaluationTaskStatus indicates the current + state of each preDeploymentEvaluation of the KeptnAppVersion. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentStatus: + default: Pending + description: PreDeploymentStatus indicates the current status of the + KeptnAppVersion's PreDeployment phase. + type: string + preDeploymentTaskStatus: + description: PreDeploymentTaskStatus indicates the current state of + each preDeploymentTask of the KeptnAppVersion. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + startTime: + description: StartTime represents the time at which the deployment of + the KeptnAppVersion started. + format: date-time + type: string + status: + default: Pending + description: Status represents the overall status of the KeptnAppVersion. + type: string + workloadOverallStatus: + default: Pending + description: WorkloadOverallStatus indicates the current status of the + KeptnAppVersion's Workload deployment phase. + type: string + workloadStatus: + description: WorkloadStatus contains the current status of each KeptnWorkload + that is part of the KeptnAppVersion. + items: + properties: + status: + default: Pending + description: Status indicates the current status of the KeptnWorkload. + type: string + workload: + description: Workload refers to a KeptnWorkload that is part of + the KeptnAppVersion. + properties: + name: + description: Name is the name of the KeptnWorkload. + type: string + version: + description: Version is the version of the KeptnWorkload. + type: string + required: + - name + - version + type: object + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/helm/chart/templates/keptnconfig-crd.yaml b/helm/chart/templates/keptnconfig-crd.yaml new file mode 100644 index 0000000000..cbf508d36e --- /dev/null +++ b/helm/chart/templates/keptnconfig-crd.yaml @@ -0,0 +1,65 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnconfigs.options.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + {{- include "chart.labels" . | nindent 4 }} +spec: + group: options.keptn.sh + names: + kind: KeptnConfig + listKind: KeptnConfigList + plural: keptnconfigs + singular: keptnconfig + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnConfig is the Schema for the keptnconfigs 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 + spec: + description: KeptnConfigSpec defines the desired state of KeptnConfig + properties: + OTelCollectorUrl: + description: OTelCollectorUrl can be used to set the Open Telemetry + collector that the lifecycle operator should use + type: string + keptnAppCreationRequestTimeoutSeconds: + default: 30 + description: KeptnAppCreationRequestTimeoutSeconds is used to set the + interval in which automatic app discovery searches for workload to + put into the same auto-generated KeptnApp + type: integer + type: object + status: + description: unused field + type: string + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/helm/chart/templates/keptnevaluation-crd.yaml b/helm/chart/templates/keptnevaluation-crd.yaml new file mode 100644 index 0000000000..8a1f7ed862 --- /dev/null +++ b/helm/chart/templates/keptnevaluation-crd.yaml @@ -0,0 +1,384 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnevaluations.lifecycle.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + {{- include "chart.labels" . | nindent 4 }} +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnEvaluation + listKind: KeptnEvaluationList + plural: keptnevaluations + shortNames: + - ke + singular: keptnevaluation + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.appName + name: AppName + type: string + - jsonPath: .spec.appVersion + name: AppVersion + type: string + - jsonPath: .spec.workload + name: WorkloadName + type: string + - jsonPath: .spec.workloadVersion + name: WorkloadVersion + type: string + - jsonPath: .status.retryCount + name: RetryCount + type: string + - jsonPath: .status.evaluationStatus + name: EvaluationStatus + type: string + - jsonPath: .status.overallStatus + name: OverallStatus + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnEvaluation is the Schema for the keptnevaluations 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 + spec: + description: KeptnEvaluationSpec defines the desired state of KeptnEvaluation + properties: + appName: + type: string + appVersion: + type: string + checkType: + type: string + evaluationDefinition: + type: string + failAction: + type: string + retries: + default: 10 + type: integer + retryInterval: + default: 5s + pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ + type: string + workload: + type: string + workloadVersion: + type: string + required: + - evaluationDefinition + - workloadVersion + type: object + status: + description: KeptnEvaluationStatus defines the observed state of KeptnEvaluation + properties: + endTime: + format: date-time + type: string + evaluationStatus: + additionalProperties: + properties: + message: + type: string + status: + type: string + value: + type: string + required: + - status + - value + type: object + type: object + overallStatus: + default: Pending + type: string + retryCount: + default: 0 + type: integer + startTime: + format: date-time + type: string + required: + - evaluationStatus + - overallStatus + - retryCount + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.appName + name: AppName + type: string + - jsonPath: .spec.appVersion + name: AppVersion + type: string + - jsonPath: .spec.workload + name: WorkloadName + type: string + - jsonPath: .spec.workloadVersion + name: WorkloadVersion + type: string + - jsonPath: .status.retryCount + name: RetryCount + type: string + - jsonPath: .status.evaluationStatus + name: EvaluationStatus + type: string + - jsonPath: .status.overallStatus + name: OverallStatus + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnEvaluation is the Schema for the keptnevaluations 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 + spec: + description: KeptnEvaluationSpec defines the desired state of KeptnEvaluation + properties: + appName: + type: string + appVersion: + type: string + checkType: + type: string + evaluationDefinition: + type: string + failAction: + type: string + retries: + default: 10 + type: integer + retryInterval: + default: 5s + pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ + type: string + workload: + type: string + workloadVersion: + type: string + required: + - evaluationDefinition + - workloadVersion + type: object + status: + description: KeptnEvaluationStatus defines the observed state of KeptnEvaluation + properties: + endTime: + format: date-time + type: string + evaluationStatus: + additionalProperties: + properties: + message: + type: string + status: + type: string + value: + type: string + required: + - status + - value + type: object + type: object + overallStatus: + default: Pending + type: string + retryCount: + default: 0 + type: integer + startTime: + format: date-time + type: string + required: + - evaluationStatus + - overallStatus + - retryCount + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.appName + name: AppName + type: string + - jsonPath: .spec.appVersion + name: AppVersion + type: string + - jsonPath: .spec.workload + name: WorkloadName + type: string + - jsonPath: .spec.workloadVersion + name: WorkloadVersion + type: string + - jsonPath: .status.retryCount + name: RetryCount + type: string + - jsonPath: .status.evaluationStatus + name: EvaluationStatus + type: string + - jsonPath: .status.overallStatus + name: OverallStatus + type: string + name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnEvaluation is the Schema for the keptnevaluations 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 + spec: + description: Spec describes the desired state of the KeptnEvaluation. + properties: + appName: + description: AppName defines the KeptnApp for which the KeptnEvaluation + is done. + type: string + appVersion: + description: AppVersion defines the version of the KeptnApp for which + the KeptnEvaluation is done. + type: string + checkType: + description: Type indicates whether the KeptnEvaluation is part of the + pre- or postDeployment phase. + type: string + evaluationDefinition: + description: EvaluationDefinition refers to the name of the KeptnEvaluationDefinition + which includes the objectives for the KeptnEvaluation. The KeptnEvaluationDefinition + can be located in the same namespace as the KeptnEvaluation, or in + the KLT namespace. + type: string + failAction: + type: string + retries: + default: 10 + description: Retries indicates how many times the KeptnEvaluation can + be attempted in the case of an error or missed evaluation objective, + before considering the KeptnEvaluation to be failed. + type: integer + retryInterval: + default: 5s + description: RetryInterval specifies the interval at which the KeptnEvaluation + is retried in the case of an error or a missed objective. + pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ + type: string + workload: + description: Workload defines the KeptnWorkload for which the KeptnEvaluation + is done. + type: string + workloadVersion: + description: WorkloadVersion defines the version of the KeptnWorkload + for which the KeptnEvaluation is done. + type: string + required: + - evaluationDefinition + - workloadVersion + type: object + status: + description: Status describes the current state of the KeptnEvaluation. + properties: + endTime: + description: EndTime represents the time at which the KeptnEvaluation + finished. + format: date-time + type: string + evaluationStatus: + additionalProperties: + properties: + message: + description: Message contains additional information about the + evaluation of an objective. This can include explanations about + why an evaluation has failed (e.g. due to a missed objective), + or if there was any error during the evaluation of the objective. + type: string + status: + description: Status indicates the status of the objective being + evaluated. + type: string + value: + description: Value represents the value of the KeptnMetric being + evaluated. + type: string + required: + - status + - value + type: object + description: EvaluationStatus describes the status of each objective + of the KeptnEvaluationDefinition referenced by the KeptnEvaluation. + type: object + overallStatus: + default: Pending + description: OverallStatus describes the overall status of the KeptnEvaluation. + The Overall status is derived from the status of the individual objectives + of the KeptnEvaluationDefinition referenced by the KeptnEvaluation. + type: string + retryCount: + default: 0 + description: RetryCount indicates how many times the KeptnEvaluation + has been attempted already. + type: integer + startTime: + description: StartTime represents the time at which the KeptnEvaluation + started. + format: date-time + type: string + required: + - evaluationStatus + - overallStatus + - retryCount + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/helm/chart/templates/keptnevaluationdefinition-crd.yaml b/helm/chart/templates/keptnevaluationdefinition-crd.yaml new file mode 100644 index 0000000000..004785f26a --- /dev/null +++ b/helm/chart/templates/keptnevaluationdefinition-crd.yaml @@ -0,0 +1,192 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnevaluationdefinitions.lifecycle.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + {{- include "chart.labels" . | nindent 4 }} +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnEvaluationDefinition + listKind: KeptnEvaluationDefinitionList + plural: keptnevaluationdefinitions + shortNames: + - ked + singular: keptnevaluationdefinition + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnEvaluationDefinition is the Schema for the keptnevaluationdefinitions + 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 + spec: + description: KeptnEvaluationDefinitionSpec defines the desired state of + KeptnEvaluationDefinition + properties: + objectives: + items: + properties: + evaluationTarget: + type: string + name: + type: string + query: + type: string + required: + - evaluationTarget + - name + - query + type: object + type: array + source: + type: string + required: + - objectives + - source + type: object + status: + description: unused field + type: string + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnEvaluationDefinition is the Schema for the keptnevaluationdefinitions + 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 + spec: + description: KeptnEvaluationDefinitionSpec defines the desired state of + KeptnEvaluationDefinition + properties: + objectives: + items: + properties: + evaluationTarget: + type: string + name: + type: string + query: + type: string + required: + - evaluationTarget + - name + - query + type: object + type: array + source: + type: string + required: + - objectives + - source + type: object + status: + description: unused field + type: string + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnEvaluationDefinition is the Schema for the keptnevaluationdefinitions + 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 + spec: + description: Spec describes the desired state of the KeptnEvaluationDefinition. + properties: + objectives: + description: Objectives is a list of objectives that have to be met + for a KeptnEvaluation referencing this KeptnEvaluationDefinition to + be successful. + items: + properties: + evaluationTarget: + description: EvaluationTarget specifies the target value for the + references KeptnMetric. Needs to start with either '<' or '>', + followed by the target value (e.g. '<10'). + type: string + keptnMetricRef: + description: KeptnMetricRef references the KeptnMetric that should + be evaluated. + properties: + name: + description: Name is the name of the referenced KeptnMetric. + type: string + namespace: + description: Namespace is the namespace where the referenced + KeptnMetric is located. + type: string + required: + - name + type: object + required: + - evaluationTarget + - keptnMetricRef + type: object + type: array + required: + - objectives + type: object + status: + description: unused field + type: string + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/helm/chart/templates/keptnevaluationprovider-crd.yaml b/helm/chart/templates/keptnevaluationprovider-crd.yaml new file mode 100644 index 0000000000..78d4567b20 --- /dev/null +++ b/helm/chart/templates/keptnevaluationprovider-crd.yaml @@ -0,0 +1,178 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnevaluationproviders.lifecycle.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + {{- include "chart.labels" . | nindent 4 }} +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: '{{ include "chart.fullname" . }}-lifecycle-webhook-service' + namespace: '{{ .Release.Namespace }}' + path: /convert + conversionReviewVersions: + - v1 + group: lifecycle.keptn.sh + names: + kind: KeptnEvaluationProvider + listKind: KeptnEvaluationProviderList + plural: keptnevaluationproviders + shortNames: + - kep + singular: keptnevaluationprovider + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnEvaluationProvider is the Schema for the keptnevaluationproviders + 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 + spec: + description: KeptnEvaluationProviderSpec defines the desired state of KeptnEvaluationProvider + properties: + secretName: + type: string + targetServer: + type: string + required: + - targetServer + type: object + status: + description: unused field + type: string + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnEvaluationProvider is the Schema for the keptnevaluationproviders + 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 + spec: + description: KeptnEvaluationProviderSpec defines the desired state of KeptnEvaluationProvider + properties: + secretKeyRef: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + targetServer: + type: string + required: + - targetServer + type: object + status: + description: unused field + type: string + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnEvaluationProvider is the Schema for the keptnevaluationproviders + 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 + spec: + description: KeptnEvaluationProviderSpec defines the desired state of KeptnEvaluationProvider + properties: + secretKeyRef: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + targetServer: + type: string + required: + - targetServer + type: object + status: + description: unused field + type: string + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/helm/chart/templates/keptnmetric-crd.yaml b/helm/chart/templates/keptnmetric-crd.yaml new file mode 100644 index 0000000000..be4fa773e6 --- /dev/null +++ b/helm/chart/templates/keptnmetric-crd.yaml @@ -0,0 +1,298 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnmetrics.metrics.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: metrics.keptn.sh + keptn.sh/inject-cert: "true" + {{- include "chart.labels" . | nindent 4 }} +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: '{{ include "chart.fullname" . }}-metrics-webhook-service' + namespace: '{{ .Release.Namespace }}' + path: /convert + conversionReviewVersions: + - v1 + group: metrics.keptn.sh + names: + kind: KeptnMetric + listKind: KeptnMetricList + plural: keptnmetrics + singular: keptnmetric + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.provider.name + name: Provider + type: string + - jsonPath: .spec.query + name: Query + type: string + - jsonPath: .status.value + name: Value + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnMetric is the Schema for the keptnmetrics 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 + spec: + description: KeptnMetricSpec defines the desired state of KeptnMetric + properties: + fetchIntervalSeconds: + description: FetchIntervalSeconds represents the update frequency in + seconds that is used to update the metric + type: integer + provider: + description: Provider represents the provider object + properties: + name: + description: Name of the provider + type: string + required: + - name + type: object + query: + description: Query represents the query to be run + type: string + required: + - fetchIntervalSeconds + - provider + - query + type: object + status: + description: KeptnMetricStatus defines the observed state of KeptnMetric + properties: + lastUpdated: + description: LastUpdated represents the time when the status data was + last updated + format: date-time + type: string + rawValue: + description: RawValue represents the resulting value in raw format + format: byte + type: string + value: + description: Value represents the resulting value + type: string + required: + - lastUpdated + - rawValue + - value + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.provider.name + name: Provider + type: string + - jsonPath: .spec.query + name: Query + type: string + - jsonPath: .status.value + name: Value + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnMetric is the Schema for the keptnmetrics 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 + spec: + description: KeptnMetricSpec defines the desired state of KeptnMetric + properties: + fetchIntervalSeconds: + description: FetchIntervalSeconds represents the update frequency in + seconds that is used to update the metric + type: integer + provider: + description: Provider represents the provider object + properties: + name: + description: Name of the provider + type: string + required: + - name + type: object + query: + description: Query represents the query to be run + type: string + required: + - fetchIntervalSeconds + - provider + - query + type: object + status: + description: KeptnMetricStatus defines the observed state of KeptnMetric + properties: + lastUpdated: + description: LastUpdated represents the time when the status data was + last updated + format: date-time + type: string + rawValue: + description: RawValue represents the resulting value in raw format + format: byte + type: string + value: + description: Value represents the resulting value + type: string + required: + - lastUpdated + - rawValue + - value + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.provider.name + name: Provider + type: string + - jsonPath: .spec.query + name: Query + type: string + - jsonPath: .spec.range.interval + name: Interval + type: string + - jsonPath: .status.value + name: Value + type: string + name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnMetric is the Schema for the keptnmetrics 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 + spec: + description: KeptnMetricSpec defines the desired state of KeptnMetric + properties: + fetchIntervalSeconds: + description: FetchIntervalSeconds represents the update frequency in + seconds that is used to update the metric + type: integer + provider: + description: Provider represents the provider object + properties: + name: + description: Name of the provider + type: string + required: + - name + type: object + query: + description: Query represents the query to be run + type: string + range: + description: Range represents the time range for which data is to be + queried + properties: + aggregation: + description: 'Aggregation defines as the type of aggregation function + to be applied on the data. Accepted values: p90, p95, p99, max, + min, avg, median' + enum: + - p90 + - p95 + - p99 + - max + - min + - avg + - median + type: string + interval: + default: 5m + description: Interval specifies the duration of the time interval + for the data query + type: string + step: + description: Step represents the query resolution step width for + the data query + type: string + type: object + required: + - fetchIntervalSeconds + - provider + - query + type: object + status: + description: KeptnMetricStatus defines the observed state of KeptnMetric + properties: + errMsg: + description: ErrMsg represents the error details when the query could + not be evaluated + type: string + lastUpdated: + description: LastUpdated represents the time when the status data was + last updated + format: date-time + type: string + rawValue: + description: RawValue represents the resulting value in raw format + format: byte + type: string + value: + description: Value represents the resulting value + type: string + required: + - lastUpdated + - rawValue + - value + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/helm/chart/templates/keptnmetricsprovider-crd.yaml b/helm/chart/templates/keptnmetricsprovider-crd.yaml new file mode 100644 index 0000000000..ee8d685f2c --- /dev/null +++ b/helm/chart/templates/keptnmetricsprovider-crd.yaml @@ -0,0 +1,140 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnmetricsproviders.metrics.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: metrics.keptn.sh + keptn.sh/inject-cert: "true" + {{- include "chart.labels" . | nindent 4 }} +spec: + group: metrics.keptn.sh + names: + kind: KeptnMetricsProvider + listKind: KeptnMetricsProviderList + plural: keptnmetricsproviders + shortNames: + - kmp + singular: keptnmetricsprovider + scope: Namespaced + versions: + - name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnMetricsProvider is the Schema for the keptnmetricsproviders + 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 + spec: + description: KeptnMetricsProviderSpec defines the desired state of KeptnMetricsProvider + properties: + secretKeyRef: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + targetServer: + type: string + required: + - targetServer + type: object + status: + description: unused field + type: string + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnMetricsProvider is the Schema for the keptnmetricsproviders + 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 + spec: + description: KeptnMetricsProviderSpec defines the desired state of KeptnMetricsProvider + properties: + secretKeyRef: + description: SecretKeyRef defines an optional secret for access credentials + to the metrics provider. + properties: + key: + description: The key of the secret to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + targetServer: + description: TargetServer defined the URL at which the metrics provider + is reachable with included port and protocol. + type: string + type: + description: Type represents the provider type. This can be one of prometheus, + dynatrace, datadog, dql. + pattern: prometheus|dynatrace|datadog|dql + type: string + required: + - targetServer + type: object + status: + description: unused field + type: string + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/helm/chart/templates/keptntask-crd.yaml b/helm/chart/templates/keptntask-crd.yaml new file mode 100644 index 0000000000..3357161450 --- /dev/null +++ b/helm/chart/templates/keptntask-crd.yaml @@ -0,0 +1,435 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptntasks.lifecycle.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + {{- include "chart.labels" . | nindent 4 }} +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnTask + listKind: KeptnTaskList + plural: keptntasks + singular: keptntask + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.appVersion + name: AppVersion + type: string + - jsonPath: .spec.workload + name: WorkloadName + type: string + - jsonPath: .spec.workloadVersion + name: WorkloadVersion + type: string + - jsonPath: .status.jobName + name: Job Name + type: string + - jsonPath: .status.status + name: Status + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnTask is the Schema for the keptntasks 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 + spec: + description: KeptnTaskSpec defines the desired state of KeptnTask + properties: + app: + type: string + appVersion: + type: string + checkType: + type: string + context: + properties: + appName: + type: string + appVersion: + type: string + objectType: + type: string + taskType: + type: string + workloadName: + type: string + workloadVersion: + type: string + required: + - appName + - appVersion + - objectType + - taskType + - workloadName + - workloadVersion + type: object + parameters: + properties: + map: + additionalProperties: + type: string + type: object + type: object + secureParameters: + properties: + secret: + type: string + type: object + taskDefinition: + type: string + workload: + type: string + workloadVersion: + type: string + required: + - app + - appVersion + - context + - taskDefinition + - workload + - workloadVersion + type: object + status: + description: KeptnTaskStatus defines the observed state of KeptnTask + properties: + endTime: + format: date-time + type: string + jobName: + type: string + message: + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.appVersion + name: AppVersion + type: string + - jsonPath: .spec.workload + name: WorkloadName + type: string + - jsonPath: .spec.workloadVersion + name: WorkloadVersion + type: string + - jsonPath: .status.jobName + name: Job Name + type: string + - jsonPath: .status.status + name: Status + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnTask is the Schema for the keptntasks 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 + spec: + description: KeptnTaskSpec defines the desired state of KeptnTask + properties: + app: + type: string + appVersion: + type: string + checkType: + type: string + context: + properties: + appName: + type: string + appVersion: + type: string + objectType: + type: string + taskType: + type: string + workloadName: + type: string + workloadVersion: + type: string + required: + - appName + - appVersion + - objectType + - taskType + - workloadName + - workloadVersion + type: object + parameters: + properties: + map: + additionalProperties: + type: string + type: object + type: object + secureParameters: + properties: + secret: + type: string + type: object + taskDefinition: + type: string + workload: + type: string + workloadVersion: + type: string + required: + - app + - appVersion + - context + - taskDefinition + - workload + - workloadVersion + type: object + status: + description: KeptnTaskStatus defines the observed state of KeptnTask + properties: + endTime: + format: date-time + type: string + jobName: + type: string + message: + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.appVersion + name: AppVersion + type: string + - jsonPath: .spec.workload + name: WorkloadName + type: string + - jsonPath: .spec.workloadVersion + name: WorkloadVersion + type: string + - jsonPath: .status.jobName + name: Job Name + type: string + - jsonPath: .status.status + name: Status + type: string + name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnTask is the Schema for the keptntasks 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 + spec: + description: Spec describes the desired state of the KeptnTask. + properties: + app: + description: AppName defines the KeptnApp for which the KeptnTask is + executed. + type: string + appVersion: + description: AppVersion defines the version of the KeptnApp for which + the KeptnTask is executed. + type: string + checkType: + description: Type indicates whether the KeptnTask is part of the pre- + or postDeployment phase. + type: string + context: + description: Context contains contextual information about the task + execution. + properties: + appName: + description: AppName the name of the KeptnApp the KeptnTask is being + executed for. + type: string + appVersion: + description: AppVersion the version of the KeptnApp the KeptnTask + is being executed for. + type: string + objectType: + description: ObjectType indicates whether the KeptnTask is being + executed for a KeptnApp or KeptnWorkload. + type: string + taskType: + description: TaskType indicates whether the KeptnTask is part of + the pre- or postDeployment phase. + type: string + workloadName: + description: WorkloadName the name of the KeptnWorkload the KeptnTask + is being executed for. + type: string + workloadVersion: + description: WorkloadVersion the version of the KeptnWorkload the + KeptnTask is being executed for. + type: string + required: + - appName + - appVersion + - objectType + - taskType + - workloadName + - workloadVersion + type: object + parameters: + description: Parameters contains parameters that will be passed to the + job that executes the task. + properties: + map: + additionalProperties: + type: string + description: Inline contains the parameters that will be made available + to the job executing the KeptnTask via the 'DATA' environment + variable. The 'DATA' environment variable's content will be a + json encoded string containing all properties of the map provided. + type: object + type: object + retries: + default: 10 + description: Retries indicates how many times the KeptnTask can be attempted + in the case of an error before considering the KeptnTask to be failed. + format: int32 + type: integer + secureParameters: + description: SecureParameters contains secure parameters that will be + passed to the job that executes the task. These will be stored and + accessed as secrets in the cluster. + properties: + secret: + description: Secret contains the parameters that will be made available + to the job executing the KeptnTask via the 'SECRET_DATA' environment + variable. The 'SECRET_DATA' environment variable's content will + the same as value of the 'SECRET_DATA' key of the referenced secret. + type: string + type: object + taskDefinition: + description: TaskDefinition refers to the name of the KeptnTaskDefinition + which includes the specification for the task to be performed. The + KeptnTaskDefinition can be located in the same namespace as the KeptnTask, + or in the KLT namespace. + type: string + timeout: + default: 5m + description: Timeout specifies the maximum time to wait for the task + to be completed successfully. If the task does not complete successfully + within this time frame, it will be considered to be failed. + pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ + type: string + workload: + description: Workload defines the KeptnWorkload for which the KeptnTask + is executed. + type: string + workloadVersion: + description: WorkloadVersion defines the version of the KeptnWorkload + for which the KeptnTask is executed. + type: string + required: + - app + - appVersion + - context + - taskDefinition + - workload + - workloadVersion + type: object + status: + description: Status describes the current state of the KeptnTask. + properties: + endTime: + description: EndTime represents the time at which the KeptnTask finished. + format: date-time + type: string + jobName: + description: JobName is the name of the Job executing the Task. + type: string + message: + description: Message contains information about unexpected errors encountered + during the execution of the KeptnTask. + type: string + reason: + description: Reason contains more information about the reason for the + last transition of the Job executing the KeptnTask. + type: string + startTime: + description: StartTime represents the time at which the KeptnTask started. + format: date-time + type: string + status: + default: Pending + description: Status represents the overall state of the KeptnTask. + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/helm/chart/templates/keptntaskdefinition-crd.yaml b/helm/chart/templates/keptntaskdefinition-crd.yaml new file mode 100644 index 0000000000..703f94e177 --- /dev/null +++ b/helm/chart/templates/keptntaskdefinition-crd.yaml @@ -0,0 +1,1654 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptntaskdefinitions.lifecycle.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + {{- include "chart.labels" . | nindent 4 }} +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnTaskDefinition + listKind: KeptnTaskDefinitionList + plural: keptntaskdefinitions + singular: keptntaskdefinition + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnTaskDefinition is the Schema for the keptntaskdefinitions + 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 + spec: + description: KeptnTaskDefinitionSpec defines the desired state of KeptnTaskDefinition + properties: + function: + properties: + configMapRef: + properties: + name: + type: string + type: object + functionRef: + properties: + name: + type: string + type: object + httpRef: + properties: + url: + type: string + type: object + inline: + properties: + code: + type: string + type: object + parameters: + properties: + map: + additionalProperties: + type: string + type: object + type: object + secureParameters: + properties: + secret: + type: string + type: object + type: object + type: object + status: + description: KeptnTaskDefinitionStatus defines the observed state of KeptnTaskDefinition + properties: + function: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed state + of cluster Important: Run "make" to regenerate code after modifying + this file' + properties: + configMap: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed state + of cluster Important: Run "make" to regenerate code after modifying + this file' + type: string + type: object + type: object + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnTaskDefinition is the Schema for the keptntaskdefinitions + 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 + spec: + description: KeptnTaskDefinitionSpec defines the desired state of KeptnTaskDefinition + properties: + function: + properties: + configMapRef: + properties: + name: + type: string + type: object + functionRef: + properties: + name: + type: string + type: object + httpRef: + properties: + url: + type: string + type: object + inline: + properties: + code: + type: string + type: object + parameters: + properties: + map: + additionalProperties: + type: string + type: object + type: object + secureParameters: + properties: + secret: + type: string + type: object + type: object + type: object + status: + description: KeptnTaskDefinitionStatus defines the observed state of KeptnTaskDefinition + properties: + function: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed state + of cluster Important: Run "make" to regenerate code after modifying + this file' + properties: + configMap: + description: 'INSERT ADDITIONAL STATUS FIELD - define observed state + of cluster Important: Run "make" to regenerate code after modifying + this file' + type: string + type: object + type: object + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnTaskDefinition is the Schema for the keptntaskdefinitions + 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 + spec: + description: Spec describes the desired state of the KeptnTaskDefinition. + properties: + container: + description: Container contains the definition for the container that + is to be used in Job based on the KeptnTaskDefinitions. + properties: + args: + description: 'Arguments to the entrypoint. The container image''s + CMD is used if this is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. If a variable + cannot be resolved, the reference in the input string will be + unchanged. Double $$ are reduced to a single $, which allows for + escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce + the string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or not. + Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a shell. The + container image''s ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the reference in + the input string will be unchanged. Double $$ are reduced to a + single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the + container and any service environment variables. If a variable + cannot be resolved, the reference in the input string will + be unchanged. Double $$ are reduced to a single $, which + allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" + will produce the string literal "$(VAR_NAME)". Escaped references + will never be expanded, regardless of whether the variable + exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables in + the container. The keys defined within a source must be a C_IDENTIFIER. + All invalid keys will be reported as an event when the container + is starting. When a key exists in multiple sources, the value + associated with the last source will take precedence. Values defined + by an Env with a duplicate key will take precedence. Cannot be + updated. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each key + in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level config management + to default or override container images in workload controllers + like Deployments and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, IfNotPresent. + Defaults to Always if :latest tag is specified, or IfNotPresent + otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system should take in response + to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. Other management + of the container blocks until the hook completes. More info: + https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported as a + LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle hooks + will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event such + as liveness/startup probe failure, preemption, resource contention, + etc. The handler is not called if the container crashes or + exits. The Pod''s termination grace period countdown begins + before the PreStop hook is executed. Regardless of the outcome + of the handler, the container will eventually terminate within + the Pod''s termination grace period (unless delayed by finalizers). + Other management of the container blocks until the hook completes + or until the termination grace period is reached. More info: + https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported as a + LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle hooks + will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container will + be restarted if the probe fails. Cannot be updated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. The command + is simply exec'd, it is not run inside a shell, so traditional + shell instructions ('|', etc) won't work. To use a shell, + you need to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be + considered failed after having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + This is a beta field and requires enabling GRPCContainerProbe + feature gate. + properties: + port: + description: Port number of the gRPC service. Number must + be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior is defined + by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod + IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to be + used in HTTP probes + properties: + name: + description: The header field name. This will be canonicalized + upon output, so case-variant names will be understood + as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults + to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started + before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default + to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to + be considered successful after having failed. Defaults to + 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate + gracefully upon probe failure. The grace period is the duration + in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer than the + expected cleanup time for your process. If this value is nil, + the pod's terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. Value + must be non-negative integer. The value zero indicates stop + immediately via the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. Each + container in a pod must have a unique name (DNS_LABEL). Cannot + be updated. + type: string + ports: + description: List of ports to expose from the container. Not specifying + a port here DOES NOT prevent that port from being exposed. Any + port which is listening on the default "0.0.0.0" address inside + a container will be accessible from the network. Modifying this + array with strategic merge patch may corrupt the data. For more + information See https://github.com/kubernetes/kubernetes/issues/108255. + Cannot be updated. + items: + description: ContainerPort represents a network port in a single + container. + properties: + containerPort: + description: Number of port to expose on the pod's IP address. + This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If specified, + this must be a valid port number, 0 < x < 65536. If HostNetwork + is specified, this must match ContainerPort. Most containers + do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME and + unique within the pod. Each named port in a pod must have + a unique name. Name for the port that can be referred to + by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. Container + will be removed from service endpoints if the probe fails. Cannot + be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. The command + is simply exec'd, it is not run inside a shell, so traditional + shell instructions ('|', etc) won't work. To use a shell, + you need to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be + considered failed after having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + This is a beta field and requires enabling GRPCContainerProbe + feature gate. + properties: + port: + description: Port number of the gRPC service. Number must + be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior is defined + by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod + IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to be + used in HTTP probes + properties: + name: + description: The header field name. This will be canonicalized + upon output, so case-variant names will be understood + as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults + to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started + before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default + to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to + be considered successful after having failed. Defaults to + 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate + gracefully upon probe failure. The grace period is the duration + in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer than the + expected cleanup time for your process. If this value is nil, + the pod's terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. Value + must be non-negative integer. The value zero indicates stop + immediately via the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. Cannot + be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be set + for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a container. + 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 + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + 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 + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + securityContext: + description: 'SecurityContext defines the security options the container + should be run with. If set, the fields of SecurityContext override + the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a process + can gain more privileges than its parent process. This bool + directly controls if the no_new_privs flag will be set on + the container process. AllowPrivilegeEscalation is true always + when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the + container runtime. Note that this field cannot be set when + spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in + privileged containers are essentially equivalent to root on + the host. Defaults to false. Note that this field cannot be + set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use + for the containers. The default is DefaultProcMount which + uses the container runtime defaults for readonly paths and + masked paths. This requires the ProcMountType feature flag + to be enabled. Note that this field cannot be set when spec.os.name + is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. Note that this field cannot be set when + spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set in + PodSecurityContext. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail to + start the container if it does. If unset or false, no such + validation will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If + seccomp options are provided at both the pod & container level, + the container options override the pod options. Note that + this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must + be preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must only be set if type is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used. RuntimeDefault + - the container runtime default profile should be used. + Unconfined - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will + be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. This field is alpha-level + and will only be honored by components that enable the + WindowsHostProcessContainers feature flag. Setting this + field without the feature flag will result in errors when + validating the Pod. All of a Pod's containers must have + the same effective HostProcess value (it is not allowed + to have a mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true then + HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. If this probe fails, the Pod will + be restarted, just as if the livenessProbe failed. This can be + used to provide different probe parameters at the beginning of + a Pod''s lifecycle, when it might take a long time to load data + or warm a cache, than during steady-state operation. This cannot + be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. The command + is simply exec'd, it is not run inside a shell, so traditional + shell instructions ('|', etc) won't work. To use a shell, + you need to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be + considered failed after having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + This is a beta field and requires enabling GRPCContainerProbe + feature gate. + properties: + port: + description: Port number of the gRPC service. Number must + be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior is defined + by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod + IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to be + used in HTTP probes + properties: + name: + description: The header field name. This will be canonicalized + upon output, so case-variant names will be understood + as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults + to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started + before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default + to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to + be considered successful after having failed. Defaults to + 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate + gracefully upon probe failure. The grace period is the duration + in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer than the + expected cleanup time for your process. If this value is nil, + the pod's terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. Value + must be non-negative integer. The value zero indicates stop + immediately via the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + stdin: + description: Whether this container should allocate a buffer for + stdin in the container runtime. If this is not set, reads from + stdin in the container will always result in EOF. Default is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close the stdin + channel after it has been opened by a single attach. When stdin + is true the stdin stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin is opened on container + start, is empty until the first client attaches to stdin, and + then remains open and accepts data until the client disconnects, + at which time stdin is closed and remains closed until the container + is restarted. If this flag is false, a container processes that + reads from stdin will never receive an EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which the container''s + termination message will be written is mounted into the container''s + filesystem. Message written is intended to be brief final status, + such as an assertion failure message. Will be truncated by the + node if greater than 4096 bytes. The total message length across + all containers will be limited to 12kb. Defaults to /dev/termination-log. + Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should be populated. + File will use the contents of terminationMessagePath to populate + the container status message on both success and failure. FallbackToLogsOnError + will use the last chunk of container log output if the termination + message file is empty and the container exited with an error. + The log output is limited to 2048 bytes or 80 lines, whichever + is smaller. Defaults to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate a TTY for itself, + also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be used + by the container. + items: + description: volumeDevice describes a mapping of a raw block device + within a container. + properties: + devicePath: + description: devicePath is the path inside of the container + that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume within + a container. + properties: + mountPath: + description: Path within the container at which the volume + should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are propagated + from the host to container and the other way around. When + not set, MountPropagationNone is used. This field is beta + in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which the + container's volume should be mounted. Behaves similarly + to SubPath but environment variable references $(VAR_NAME) + are expanded using the container's environment. Defaults + to "" (volume's root). SubPathExpr and SubPath are mutually + exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, the + container runtime's default will be used, which might be configured + in the container image. Cannot be updated. + type: string + required: + - name + type: object + deno: + description: Deno contains the definition for the Deno function that + is to be executed in KeptnTasks based on the KeptnTaskDefinitions. + properties: + cmdParameters: + description: CmdParameters contains parameters that will be passed + to the command + type: string + configMapRef: + description: ConfigMapReference allows to reference a ConfigMap + containing the code of the function. When referencing a ConfigMap, + the code of the function must be available as a value of the 'code' + key of the referenced ConfigMap. + properties: + name: + description: Name is the name of the referenced ConfigMap. + type: string + type: object + functionRef: + description: FunctionReference allows to reference another KeptnTaskDefinition + which contains the source code of the function to be executes + for KeptnTasks based on this KeptnTaskDefinition. This can be + useful when you have multiple KeptnTaskDefinitions that should + execute the same logic, but each with different parameters. + properties: + name: + description: Name is the name of the referenced KeptnTaksDefinition. + type: string + type: object + httpRef: + description: HttpReference allows to point to an HTTP URL containing + the code of the function. + properties: + url: + description: Url is the URL containing the code of the function. + type: string + type: object + inline: + description: Inline allows to specify the code that should be executed + directly in the KeptnTaskDefinition, as a multi-line string. + properties: + code: + description: Code contains the code of the function. + type: string + type: object + parameters: + description: Parameters contains parameters that will be passed + to the job that executes the task as env variables. + properties: + map: + additionalProperties: + type: string + description: Inline contains the parameters that will be made + available to the job executing the KeptnTask via the 'DATA' + environment variable. The 'DATA' environment variable's content + will be a json encoded string containing all properties of + the map provided. + type: object + type: object + secureParameters: + description: SecureParameters contains secure parameters that will + be passed to the job that executes the task. These will be stored + and accessed as secrets in the cluster. + properties: + secret: + description: Secret contains the parameters that will be made + available to the job executing the KeptnTask via the 'SECRET_DATA' + environment variable. The 'SECRET_DATA' environment variable's + content will the same as value of the 'SECRET_DATA' key of + the referenced secret. + type: string + type: object + type: object + function: + description: Deprecated Function contains the definition for the function + that is to be executed in KeptnTasks based on the KeptnTaskDefinitions. + properties: + cmdParameters: + description: CmdParameters contains parameters that will be passed + to the command + type: string + configMapRef: + description: ConfigMapReference allows to reference a ConfigMap + containing the code of the function. When referencing a ConfigMap, + the code of the function must be available as a value of the 'code' + key of the referenced ConfigMap. + properties: + name: + description: Name is the name of the referenced ConfigMap. + type: string + type: object + functionRef: + description: FunctionReference allows to reference another KeptnTaskDefinition + which contains the source code of the function to be executes + for KeptnTasks based on this KeptnTaskDefinition. This can be + useful when you have multiple KeptnTaskDefinitions that should + execute the same logic, but each with different parameters. + properties: + name: + description: Name is the name of the referenced KeptnTaksDefinition. + type: string + type: object + httpRef: + description: HttpReference allows to point to an HTTP URL containing + the code of the function. + properties: + url: + description: Url is the URL containing the code of the function. + type: string + type: object + inline: + description: Inline allows to specify the code that should be executed + directly in the KeptnTaskDefinition, as a multi-line string. + properties: + code: + description: Code contains the code of the function. + type: string + type: object + parameters: + description: Parameters contains parameters that will be passed + to the job that executes the task as env variables. + properties: + map: + additionalProperties: + type: string + description: Inline contains the parameters that will be made + available to the job executing the KeptnTask via the 'DATA' + environment variable. The 'DATA' environment variable's content + will be a json encoded string containing all properties of + the map provided. + type: object + type: object + secureParameters: + description: SecureParameters contains secure parameters that will + be passed to the job that executes the task. These will be stored + and accessed as secrets in the cluster. + properties: + secret: + description: Secret contains the parameters that will be made + available to the job executing the KeptnTask via the 'SECRET_DATA' + environment variable. The 'SECRET_DATA' environment variable's + content will the same as value of the 'SECRET_DATA' key of + the referenced secret. + type: string + type: object + type: object + python: + description: Python contains the definition for the python function + that is to be executed in KeptnTasks based on the KeptnTaskDefinitions. + properties: + cmdParameters: + description: CmdParameters contains parameters that will be passed + to the command + type: string + configMapRef: + description: ConfigMapReference allows to reference a ConfigMap + containing the code of the function. When referencing a ConfigMap, + the code of the function must be available as a value of the 'code' + key of the referenced ConfigMap. + properties: + name: + description: Name is the name of the referenced ConfigMap. + type: string + type: object + functionRef: + description: FunctionReference allows to reference another KeptnTaskDefinition + which contains the source code of the function to be executes + for KeptnTasks based on this KeptnTaskDefinition. This can be + useful when you have multiple KeptnTaskDefinitions that should + execute the same logic, but each with different parameters. + properties: + name: + description: Name is the name of the referenced KeptnTaksDefinition. + type: string + type: object + httpRef: + description: HttpReference allows to point to an HTTP URL containing + the code of the function. + properties: + url: + description: Url is the URL containing the code of the function. + type: string + type: object + inline: + description: Inline allows to specify the code that should be executed + directly in the KeptnTaskDefinition, as a multi-line string. + properties: + code: + description: Code contains the code of the function. + type: string + type: object + parameters: + description: Parameters contains parameters that will be passed + to the job that executes the task as env variables. + properties: + map: + additionalProperties: + type: string + description: Inline contains the parameters that will be made + available to the job executing the KeptnTask via the 'DATA' + environment variable. The 'DATA' environment variable's content + will be a json encoded string containing all properties of + the map provided. + type: object + type: object + secureParameters: + description: SecureParameters contains secure parameters that will + be passed to the job that executes the task. These will be stored + and accessed as secrets in the cluster. + properties: + secret: + description: Secret contains the parameters that will be made + available to the job executing the KeptnTask via the 'SECRET_DATA' + environment variable. The 'SECRET_DATA' environment variable's + content will the same as value of the 'SECRET_DATA' key of + the referenced secret. + type: string + type: object + type: object + retries: + default: 10 + description: Retries specifies how many times a job executing the KeptnTaskDefinition + should be restarted in the case of an unsuccessful attempt. + format: int32 + type: integer + timeout: + default: 5m + description: Timeout specifies the maximum time to wait for the task + to be completed successfully. If the task does not complete successfully + within this time frame, it will be considered to be failed. + pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ + type: string + type: object + status: + description: Status describes the current state of the KeptnTaskDefinition. + properties: + function: + description: Function contains status information of the function definition + for the task. + properties: + configMap: + description: ConfigMap indicates the ConfigMap in which the function + code is stored. + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/helm/chart/templates/keptnworkload-crd.yaml b/helm/chart/templates/keptnworkload-crd.yaml new file mode 100644 index 0000000000..6de136f0c9 --- /dev/null +++ b/helm/chart/templates/keptnworkload-crd.yaml @@ -0,0 +1,291 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnworkloads.lifecycle.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + {{- include "chart.labels" . | nindent 4 }} +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnWorkload + listKind: KeptnWorkloadList + plural: keptnworkloads + singular: keptnworkload + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.version + name: Version + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnWorkload is the Schema for the keptnworkloads 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 + spec: + description: KeptnWorkloadSpec defines the desired state of KeptnWorkload + properties: + app: + type: string + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + resourceReference: + properties: + kind: + type: string + name: + type: string + uid: + description: UID is a type that holds unique ID values, including + UUIDs. Because we don't ONLY use UUIDs, this is an alias to string. Being + a type captures intent and helps make sure that UIDs and names + do not get conflated. + type: string + required: + - kind + - name + - uid + type: object + version: + type: string + required: + - app + - resourceReference + - version + type: object + status: + description: KeptnWorkloadStatus defines the observed state of KeptnWorkload + properties: + currentVersion: + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.version + name: Version + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnWorkload is the Schema for the keptnworkloads 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 + spec: + description: KeptnWorkloadSpec defines the desired state of KeptnWorkload + properties: + app: + type: string + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + resourceReference: + properties: + kind: + type: string + name: + type: string + uid: + description: UID is a type that holds unique ID values, including + UUIDs. Because we don't ONLY use UUIDs, this is an alias to string. Being + a type captures intent and helps make sure that UIDs and names + do not get conflated. + type: string + required: + - kind + - name + - uid + type: object + version: + type: string + required: + - app + - resourceReference + - version + type: object + status: + description: KeptnWorkloadStatus defines the observed state of KeptnWorkload + properties: + currentVersion: + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.version + name: Version + type: string + name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnWorkload is the Schema for the keptnworkloads 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 + spec: + description: Spec describes the desired state of the KeptnWorkload. + properties: + app: + description: AppName is the name of the KeptnApp containing the KeptnWorkload. + type: string + postDeploymentEvaluations: + description: PostDeploymentEvaluations is a list of all evaluations + to be performed during the post-deployment phase of the KeptnWorkload. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnWorkload, or in the KLT + namespace. + items: + type: string + type: array + postDeploymentTasks: + description: PostDeploymentTasks is a list of all tasks to be performed + during the post-deployment phase of the KeptnWorkload. The items of + this list refer to the names of KeptnTaskDefinitions located in the + same namespace as the KeptnWorkload, or in the KLT namespace. + items: + type: string + type: array + preDeploymentEvaluations: + description: PreDeploymentEvaluations is a list of all evaluations to + be performed during the pre-deployment phase of the KeptnWorkload. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnWorkload, or in the KLT + namespace. + items: + type: string + type: array + preDeploymentTasks: + description: PreDeploymentTasks is a list of all tasks to be performed + during the pre-deployment phase of the KeptnWorkload. The items of + this list refer to the names of KeptnTaskDefinitions located in the + same namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + resourceReference: + description: ResourceReference is a reference to the Kubernetes resource + (Deployment, DaemonSet, StatefulSet or ReplicaSet) the KeptnWorkload + is representing. + properties: + kind: + type: string + name: + type: string + uid: + description: UID is a type that holds unique ID values, including + UUIDs. Because we don't ONLY use UUIDs, this is an alias to string. Being + a type captures intent and helps make sure that UIDs and names + do not get conflated. + type: string + required: + - kind + - name + - uid + type: object + version: + description: Version defines the version of the KeptnWorkload. + type: string + required: + - app + - resourceReference + - version + type: object + status: + description: Status describes the current state of the KeptnWorkload. + properties: + currentVersion: + description: CurrentVersion indicates the version that is currently + deployed or being reconciled. + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/helm/chart/templates/keptnworkloadinstance-crd.yaml b/helm/chart/templates/keptnworkloadinstance-crd.yaml new file mode 100644 index 0000000000..1d38b5c6af --- /dev/null +++ b/helm/chart/templates/keptnworkloadinstance-crd.yaml @@ -0,0 +1,785 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnworkloadinstances.lifecycle.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.12.1 + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + {{- include "chart.labels" . | nindent 4 }} +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: '{{ include "chart.fullname" . }}-lifecycle-webhook-service' + namespace: '{{ .Release.Namespace }}' + path: /convert + conversionReviewVersions: + - v1 + group: lifecycle.keptn.sh + names: + kind: KeptnWorkloadInstance + listKind: KeptnWorkloadInstanceList + plural: keptnworkloadinstances + shortNames: + - kwi + singular: keptnworkloadinstance + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.workloadName + name: WorkloadName + type: string + - jsonPath: .spec.version + name: WorkloadVersion + type: string + - jsonPath: .status.currentPhase + name: Phase + type: string + - jsonPath: .status.preDeploymentStatus + name: PreDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.preDeploymentEvaluationStatus + name: PreDeploymentEvaluationStatus + priority: 1 + type: string + - jsonPath: .status.deploymentStatus + name: DeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentStatus + name: PostDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentEvaluationStatus + name: PostDeploymentEvaluationStatus + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: KeptnWorkloadInstance is the Schema for the keptnworkloadinstances + 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 + spec: + description: KeptnWorkloadInstanceSpec defines the desired state of KeptnWorkloadInstance + properties: + app: + type: string + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + previousVersion: + type: string + resourceReference: + properties: + kind: + type: string + name: + type: string + uid: + description: UID is a type that holds unique ID values, including + UUIDs. Because we don't ONLY use UUIDs, this is an alias to string. Being + a type captures intent and helps make sure that UIDs and names + do not get conflated. + type: string + required: + - kind + - name + - uid + type: object + traceId: + additionalProperties: + type: string + type: object + version: + type: string + workloadName: + type: string + required: + - app + - resourceReference + - version + - workloadName + type: object + status: + description: KeptnWorkloadInstanceStatus defines the observed state of KeptnWorkloadInstance + properties: + currentPhase: + type: string + deploymentStatus: + default: Pending + type: string + endTime: + format: date-time + type: string + phaseTraceIDs: + additionalProperties: + additionalProperties: + type: string + description: MapCarrier is a TextMapCarrier that uses a map held in + memory as a storage medium for propagated key-value pairs. + type: object + type: object + postDeploymentEvaluationStatus: + default: Pending + type: string + postDeploymentEvaluationTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + evaluationDefinitionName: + type: string + evaluationName: + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + postDeploymentStatus: + default: Pending + type: string + postDeploymentTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + taskDefinitionName: + type: string + taskName: + type: string + type: object + type: array + preDeploymentEvaluationStatus: + default: Pending + type: string + preDeploymentEvaluationTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + evaluationDefinitionName: + type: string + evaluationName: + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentStatus: + default: Pending + type: string + preDeploymentTaskStatus: + items: + properties: + endTime: + format: date-time + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + taskDefinitionName: + type: string + taskName: + type: string + type: object + type: array + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.workloadName + name: WorkloadName + type: string + - jsonPath: .spec.version + name: WorkloadVersion + type: string + - jsonPath: .status.currentPhase + name: Phase + type: string + - jsonPath: .status.preDeploymentStatus + name: PreDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.preDeploymentEvaluationStatus + name: PreDeploymentEvaluationStatus + priority: 1 + type: string + - jsonPath: .status.deploymentStatus + name: DeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentStatus + name: PostDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentEvaluationStatus + name: PostDeploymentEvaluationStatus + priority: 1 + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: KeptnWorkloadInstance is the Schema for the keptnworkloadinstances + 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 + spec: + description: KeptnWorkloadInstanceSpec defines the desired state of KeptnWorkloadInstance + properties: + app: + type: string + postDeploymentEvaluations: + items: + type: string + type: array + postDeploymentTasks: + items: + type: string + type: array + preDeploymentEvaluations: + items: + type: string + type: array + preDeploymentTasks: + items: + type: string + type: array + previousVersion: + type: string + resourceReference: + properties: + kind: + type: string + name: + type: string + uid: + description: UID is a type that holds unique ID values, including + UUIDs. Because we don't ONLY use UUIDs, this is an alias to string. Being + a type captures intent and helps make sure that UIDs and names + do not get conflated. + type: string + required: + - kind + - name + - uid + type: object + traceId: + additionalProperties: + type: string + type: object + version: + type: string + workloadName: + type: string + required: + - app + - resourceReference + - version + - workloadName + type: object + status: + description: KeptnWorkloadInstanceStatus defines the observed state of KeptnWorkloadInstance + properties: + currentPhase: + type: string + deploymentStatus: + default: Pending + type: string + endTime: + format: date-time + type: string + phaseTraceIDs: + additionalProperties: + additionalProperties: + type: string + description: MapCarrier is a TextMapCarrier that uses a map held in + memory as a storage medium for propagated key-value pairs. + type: object + type: object + postDeploymentEvaluationStatus: + default: Pending + type: string + postDeploymentEvaluationTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + postDeploymentStatus: + default: Pending + type: string + postDeploymentTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentEvaluationStatus: + default: Pending + type: string + preDeploymentEvaluationTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentStatus: + default: Pending + type: string + preDeploymentTaskStatus: + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + startTime: + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.app + name: AppName + type: string + - jsonPath: .spec.workloadName + name: WorkloadName + type: string + - jsonPath: .spec.version + name: WorkloadVersion + type: string + - jsonPath: .status.currentPhase + name: Phase + type: string + - jsonPath: .status.preDeploymentStatus + name: PreDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.preDeploymentEvaluationStatus + name: PreDeploymentEvaluationStatus + priority: 1 + type: string + - jsonPath: .status.deploymentStatus + name: DeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentStatus + name: PostDeploymentStatus + priority: 1 + type: string + - jsonPath: .status.postDeploymentEvaluationStatus + name: PostDeploymentEvaluationStatus + priority: 1 + type: string + name: v1alpha3 + schema: + openAPIV3Schema: + description: KeptnWorkloadInstance is the Schema for the keptnworkloadinstances + 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 + spec: + description: Spec describes the desired state of the KeptnWorkloadInstance. + properties: + app: + description: AppName is the name of the KeptnApp containing the KeptnWorkload. + type: string + postDeploymentEvaluations: + description: PostDeploymentEvaluations is a list of all evaluations + to be performed during the post-deployment phase of the KeptnWorkload. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnWorkload, or in the KLT + namespace. + items: + type: string + type: array + postDeploymentTasks: + description: PostDeploymentTasks is a list of all tasks to be performed + during the post-deployment phase of the KeptnWorkload. The items of + this list refer to the names of KeptnTaskDefinitions located in the + same namespace as the KeptnWorkload, or in the KLT namespace. + items: + type: string + type: array + preDeploymentEvaluations: + description: PreDeploymentEvaluations is a list of all evaluations to + be performed during the pre-deployment phase of the KeptnWorkload. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnWorkload, or in the KLT + namespace. + items: + type: string + type: array + preDeploymentTasks: + description: PreDeploymentTasks is a list of all tasks to be performed + during the pre-deployment phase of the KeptnWorkload. The items of + this list refer to the names of KeptnTaskDefinitions located in the + same namespace as the KeptnApp, or in the KLT namespace. + items: + type: string + type: array + previousVersion: + description: PreviousVersion is the version of the KeptnWorkload that + has been deployed prior to this version. + type: string + resourceReference: + description: ResourceReference is a reference to the Kubernetes resource + (Deployment, DaemonSet, StatefulSet or ReplicaSet) the KeptnWorkload + is representing. + properties: + kind: + type: string + name: + type: string + uid: + description: UID is a type that holds unique ID values, including + UUIDs. Because we don't ONLY use UUIDs, this is an alias to string. Being + a type captures intent and helps make sure that UIDs and names + do not get conflated. + type: string + required: + - kind + - name + - uid + type: object + traceId: + additionalProperties: + type: string + description: TraceId contains the OpenTelemetry trace ID. + type: object + version: + description: Version defines the version of the KeptnWorkload. + type: string + workloadName: + description: WorkloadName is the name of the KeptnWorkload. + type: string + required: + - app + - resourceReference + - version + - workloadName + type: object + status: + description: Status describes the current state of the KeptnWorkloadInstance. + properties: + currentPhase: + description: 'CurrentPhase indicates the current phase of the KeptnWorkloadInstance. + This can be: - PreDeploymentTasks - PreDeploymentEvaluations - Deployment + - PostDeploymentTasks - PostDeploymentEvaluations' + type: string + deploymentStatus: + default: Pending + description: DeploymentStatus indicates the current status of the KeptnWorkloadInstance's + Deployment phase. + type: string + endTime: + description: EndTime represents the time at which the deployment of + the KeptnWorkloadInstance finished. + format: date-time + type: string + phaseTraceIDs: + additionalProperties: + additionalProperties: + type: string + description: MapCarrier is a TextMapCarrier that uses a map held in + memory as a storage medium for propagated key-value pairs. + type: object + description: PhaseTraceIDs contains the trace IDs of the OpenTelemetry + spans of each phase of the KeptnWorkloadInstance + type: object + postDeploymentEvaluationStatus: + default: Pending + description: PostDeploymentEvaluationStatus indicates the current status + of the KeptnWorkloadInstance's PostDeploymentEvaluation phase. + type: string + postDeploymentEvaluationTaskStatus: + description: PostDeploymentEvaluationTaskStatus indicates the current + state of each postDeploymentEvaluation of the KeptnWorkloadInstance. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + postDeploymentStatus: + default: Pending + description: PostDeploymentStatus indicates the current status of the + KeptnWorkloadInstance's PostDeployment phase. + type: string + postDeploymentTaskStatus: + description: PostDeploymentTaskStatus indicates the current state of + each postDeploymentTask of the KeptnWorkloadInstance. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentEvaluationStatus: + default: Pending + description: PreDeploymentEvaluationStatus indicates the current status + of the KeptnWorkloadInstance's PreDeploymentEvaluation phase. + type: string + preDeploymentEvaluationTaskStatus: + description: PreDeploymentEvaluationTaskStatus indicates the current + state of each preDeploymentEvaluation of the KeptnWorkloadInstance. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + preDeploymentStatus: + default: Pending + description: PreDeploymentStatus indicates the current status of the + KeptnWorkloadInstance's PreDeployment phase. + type: string + preDeploymentTaskStatus: + description: PreDeploymentTaskStatus indicates the current state of + each preDeploymentTask of the KeptnWorkloadInstance. + items: + properties: + definitionName: + description: DefinitionName is the name of the EvaluationDefinition/TaskDefiniton + type: string + endTime: + description: EndTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + name: + description: Name is the name of the Evaluation/Task + type: string + startTime: + description: StartTime represents the time at which the Item (Evaluation/Task) + started. + format: date-time + type: string + status: + default: Pending + type: string + type: object + type: array + startTime: + description: StartTime represents the time at which the deployment of + the KeptnWorkloadInstance started. + format: date-time + type: string + status: + default: Pending + description: Status represents the overall status of the KeptnWorkloadInstance. + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/helm/chart/templates/leader-election-rbac.yaml b/helm/chart/templates/leader-election-rbac.yaml new file mode 100644 index 0000000000..066755fbc3 --- /dev/null +++ b/helm/chart/templates/leader-election-rbac.yaml @@ -0,0 +1,42 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "chart.fullname" . }}-leader-election-role + namespace: {{ .Release.Namespace | quote }} + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: certificate-operator + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + {{- include "chart.labels" . | nindent 4 }} +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch \ No newline at end of file diff --git a/helm/chart/templates/lifecycle-manager-config.yaml b/helm/chart/templates/lifecycle-manager-config.yaml new file mode 100644 index 0000000000..7251eddbef --- /dev/null +++ b/helm/chart/templates/lifecycle-manager-config.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "chart.fullname" . }}-lifecycle-manager-config + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +data: + controller_manager_config.yaml: | + apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 + health: + healthProbeBindAddress: {{ .Values.lifecycleManagerConfig.controllerManagerConfigYaml.health.healthProbeBindAddress + | quote }} + kind: ControllerManagerConfig + leaderElection: + leaderElect: {{ .Values.lifecycleManagerConfig.controllerManagerConfigYaml.leaderElection.leaderElect + }} + resourceName: {{ .Values.lifecycleManagerConfig.controllerManagerConfigYaml.leaderElection.resourceName + | quote }} + metrics: + bindAddress: {{ .Values.lifecycleManagerConfig.controllerManagerConfigYaml.metrics.bindAddress + | quote }} + webhook: + port: {{ .Values.lifecycleManagerConfig.controllerManagerConfigYaml.webhook.port + }} \ No newline at end of file diff --git a/helm/chart/templates/lifecycle-mutating-webhook-configuration.yaml b/helm/chart/templates/lifecycle-mutating-webhook-configuration.yaml new file mode 100644 index 0000000000..4b5a23c425 --- /dev/null +++ b/helm/chart/templates/lifecycle-mutating-webhook-configuration.yaml @@ -0,0 +1,51 @@ +apiVersion: admissionregistration.k8s.io/v1 +kind: MutatingWebhookConfiguration +metadata: + name: {{ include "chart.fullname" . }}-lifecycle-mutating-webhook-configuration + annotations: + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "chart.fullname" . }}- + labels: + keptn.sh/inject-cert: "true" + app.kubernetes.io/part-of: "keptn-lifecycle-toolkit" + {{- include "chart.labels" . | nindent 4 }} +webhooks: +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: '{{ include "chart.fullname" . }}-lifecycle-webhook-service' + namespace: '{{ .Release.Namespace }}' + path: /mutate-v1-pod + failurePolicy: Fail + name: mpod.keptn.sh + namespaceSelector: + matchExpressions: + - key: control-plane + operator: NotIn + values: + - lifecycle-operator + - key: kubernetes.io/metadata.name + operator: NotIn + values: + - kube-system + - kube-public + - kube-node-lease + - cert-manager + - keptn-lifecycle-toolkit-system + - observability + - monitoring + - key: kubernetes.io/metadata.name + operator: NotIn + values: + - '{{ .Release.Namespace }}' + rules: + - apiGroups: + - "" + apiVersions: + - v1 + operations: + - CREATE + - UPDATE + resources: + - pods + sideEffects: None \ No newline at end of file diff --git a/helm/chart/templates/lifecycle-operator-leader-election-rbac.yaml b/helm/chart/templates/lifecycle-operator-leader-election-rbac.yaml new file mode 100644 index 0000000000..41808c3622 --- /dev/null +++ b/helm/chart/templates/lifecycle-operator-leader-election-rbac.yaml @@ -0,0 +1,55 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "chart.fullname" . }}-lifecycle-operator-leader-election-role + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "chart.fullname" . }}-lifecycle-operator-leader-election-rolebinding + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: '{{ include "chart.fullname" . }}-lifecycle-operator-leader-election-role' +subjects: +- kind: ServiceAccount + name: '{{ include "chart.fullname" . }}-lifecycle-operator' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/lifecycle-operator-metrics-service.yaml b/helm/chart/templates/lifecycle-operator-metrics-service.yaml new file mode 100644 index 0000000000..aa3b41a9c0 --- /dev/null +++ b/helm/chart/templates/lifecycle-operator-metrics-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "chart.fullname" . }}-lifecycle-operator-metrics-service + namespace: {{ .Release.Namespace | quote }} + labels: + control-plane: lifecycle-operator + {{- include "chart.labels" . | nindent 4 }} +spec: + type: {{ .Values.lifecycleOperatorMetricsService.type }} + selector: + control-plane: lifecycle-operator + {{- include "chart.selectorLabels" . | nindent 4 }} + ports: + {{- .Values.lifecycleOperatorMetricsService.ports | toYaml | nindent 2 -}} \ No newline at end of file diff --git a/helm/chart/templates/lifecycle-operator-rbac.yaml b/helm/chart/templates/lifecycle-operator-rbac.yaml new file mode 100644 index 0000000000..7c9a4553b0 --- /dev/null +++ b/helm/chart/templates/lifecycle-operator-rbac.yaml @@ -0,0 +1,400 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "chart.fullname" . }}-lifecycle-operator-role + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +rules: +- apiGroups: + - apps + resources: + - daemonsets + - deployments + - replicasets + - statefulsets + verbs: + - get + - list + - watch +- apiGroups: + - argoproj.io + resources: + - rollouts + verbs: + - get + - list + - watch +- apiGroups: + - batch + resources: + - jobs + verbs: + - create + - get + - list + - update + - watch +- apiGroups: + - batch + resources: + - jobs/status + verbs: + - get + - list +- apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - get + - list + - update + - watch +- apiGroups: + - "" + resources: + - deployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch + - watch +- apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - pods + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - secrets + verbs: + - get +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappcreationrequests + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappcreationrequests/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappcreationrequests/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnapps + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnapps/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnapps/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappversion + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappversion/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappversion/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappversions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappversions/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappversions/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnevaluationdefinitions + verbs: + - get + - list + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnevaluationproviders + verbs: + - get + - list + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnevaluations + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnevaluations/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnevaluations/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptntaskdefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptntaskdefinitions/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptntaskdefinitions/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptntasks + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptntasks/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptntasks/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnworkloadinstances + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnworkloadinstances/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnworkloadinstances/status + verbs: + - get + - patch + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnworkloads + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnworkloads/finalizers + verbs: + - update +- apiGroups: + - lifecycle.keptn.sh + resources: + - keptnworkloads/status + verbs: + - get + - patch + - update +- apiGroups: + - metrics.keptn.sh + resources: + - keptnmetrics + verbs: + - get + - list + - watch +- apiGroups: + - options.keptn.sh + resources: + - keptnconfigs + verbs: + - get + - list + - watch +- apiGroups: + - options.keptn.sh + resources: + - keptnconfigs/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "chart.fullname" . }}-lifecycle-operator-rolebinding + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: '{{ include "chart.fullname" . }}-lifecycle-operator-role' +subjects: +- kind: ServiceAccount + name: '{{ include "chart.fullname" . }}-lifecycle-operator' + namespace: '{{ .Release.Namespace }}' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "chart.fullname" . }}-lifecycle-operator-rolebinding + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: '{{ include "chart.fullname" . }}-lifecycle-operator-role' +subjects: +- kind: ServiceAccount + name: '{{ include "chart.fullname" . }}-lifecycle-operator' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/lifecycle-validating-webhook-configuration.yaml b/helm/chart/templates/lifecycle-validating-webhook-configuration.yaml new file mode 100644 index 0000000000..0c7c61e142 --- /dev/null +++ b/helm/chart/templates/lifecycle-validating-webhook-configuration.yaml @@ -0,0 +1,29 @@ +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + name: {{ include "chart.fullname" . }}-lifecycle-validating-webhook-configuration + annotations: + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "chart.fullname" . }}- + labels: + {{- include "chart.labels" . | nindent 4 }} +webhooks: +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: '{{ include "chart.fullname" . }}-lifecycle-webhook-service' + namespace: '{{ .Release.Namespace }}' + path: /validate-lifecycle-keptn-sh-v1alpha3-keptntaskdefinition + failurePolicy: Fail + name: vkeptntaskdefinition.kb.io + rules: + - apiGroups: + - lifecycle.keptn.sh + apiVersions: + - v1alpha3 + operations: + - CREATE + - UPDATE + resources: + - keptntaskdefinitions + sideEffects: None \ No newline at end of file diff --git a/helm/chart/templates/lifecycle-webhook-service.yaml b/helm/chart/templates/lifecycle-webhook-service.yaml new file mode 100644 index 0000000000..7e10d64d71 --- /dev/null +++ b/helm/chart/templates/lifecycle-webhook-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "chart.fullname" . }}-lifecycle-webhook-service + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +spec: + type: {{ .Values.lifecycleWebhookService.type }} + selector: + control-plane: lifecycle-operator + {{- include "chart.selectorLabels" . | nindent 4 }} + ports: + {{- .Values.lifecycleWebhookService.ports | toYaml | nindent 2 -}} \ No newline at end of file diff --git a/helm/chart/templates/metrics-manager-config.yaml b/helm/chart/templates/metrics-manager-config.yaml new file mode 100644 index 0000000000..dfc73dedab --- /dev/null +++ b/helm/chart/templates/metrics-manager-config.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "chart.fullname" . }}-metrics-manager-config + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +data: + controller_manager_config.yaml: | + apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 + health: + healthProbeBindAddress: {{ .Values.metricsManagerConfig.controllerManagerConfigYaml.health.healthProbeBindAddress + | quote }} + kind: ControllerManagerConfig + leaderElection: + leaderElect: {{ .Values.metricsManagerConfig.controllerManagerConfigYaml.leaderElection.leaderElect + }} + resourceName: {{ .Values.metricsManagerConfig.controllerManagerConfigYaml.leaderElection.resourceName + | quote }} + metrics: + bindAddress: {{ .Values.metricsManagerConfig.controllerManagerConfigYaml.metrics.bindAddress + | quote }} + webhook: + port: {{ .Values.metricsManagerConfig.controllerManagerConfigYaml.webhook.port + }} \ No newline at end of file diff --git a/helm/chart/templates/metrics-operator-hpa-controller-rbac.yaml b/helm/chart/templates/metrics-operator-hpa-controller-rbac.yaml new file mode 100644 index 0000000000..7348c453f8 --- /dev/null +++ b/helm/chart/templates/metrics-operator-hpa-controller-rbac.yaml @@ -0,0 +1,15 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "chart.fullname" . }}-metrics-operator-hpa-controller + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: '{{ include "chart.fullname" . }}-metrics-operator-server-resources' +subjects: +- kind: ServiceAccount + name: horizontal-pod-autoscaler + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/metrics-operator-leader-election-rbac.yaml b/helm/chart/templates/metrics-operator-leader-election-rbac.yaml new file mode 100644 index 0000000000..f6fccf5f4e --- /dev/null +++ b/helm/chart/templates/metrics-operator-leader-election-rbac.yaml @@ -0,0 +1,55 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "chart.fullname" . }}-metrics-operator-leader-election-role + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "chart.fullname" . }}-metrics-operator-leader-election-rolebinding + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: '{{ include "chart.fullname" . }}-metrics-operator-leader-election-role' +subjects: +- kind: ServiceAccount + name: '{{ include "chart.fullname" . }}-metrics-operator' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/metrics-operator-rbac.yaml b/helm/chart/templates/metrics-operator-rbac.yaml new file mode 100644 index 0000000000..af5f7808ca --- /dev/null +++ b/helm/chart/templates/metrics-operator-rbac.yaml @@ -0,0 +1,92 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "chart.fullname" . }}-metrics-operator-role + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - secrets + verbs: + - get +- apiGroups: + - metrics.keptn.sh + resources: + - keptnmetrics + verbs: + - get + - list + - watch +- apiGroups: + - metrics.keptn.sh + resources: + - keptnmetrics/finalizers + verbs: + - update +- apiGroups: + - metrics.keptn.sh + resources: + - keptnmetrics/status + verbs: + - get + - patch + - update +- apiGroups: + - metrics.keptn.sh + resources: + - keptnmetricsproviders + verbs: + - get + - list + - watch +- apiGroups: + - metrics.keptn.sh + resources: + - providers + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "chart.fullname" . }}-metrics-operator-rolebinding + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: '{{ include "chart.fullname" . }}-metrics-operator-role' +subjects: +- kind: ServiceAccount + name: '{{ include "chart.fullname" . }}-metrics-operator' + namespace: '{{ .Release.Namespace }}' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "chart.fullname" . }}-metrics-operator-rolebinding + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: '{{ include "chart.fullname" . }}-metrics-operator-role' +subjects: +- kind: ServiceAccount + name: '{{ include "chart.fullname" . }}-metrics-operator' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/metrics-operator-server-resources-rbac.yaml b/helm/chart/templates/metrics-operator-server-resources-rbac.yaml new file mode 100644 index 0000000000..83599483b4 --- /dev/null +++ b/helm/chart/templates/metrics-operator-server-resources-rbac.yaml @@ -0,0 +1,16 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "chart.fullname" . }}-metrics-operator-server-resources + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +rules: +- apiGroups: + - custom.metrics.k8s.io + resources: + - '*' + verbs: + - get + - list + - watch \ No newline at end of file diff --git a/helm/chart/templates/metrics-operator-service.yaml b/helm/chart/templates/metrics-operator-service.yaml new file mode 100644 index 0000000000..7bfbce4dc8 --- /dev/null +++ b/helm/chart/templates/metrics-operator-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "chart.fullname" . }}-metrics-operator-service + namespace: {{ .Release.Namespace | quote }} + labels: + control-plane: metrics-operator + {{- include "chart.labels" . | nindent 4 }} +spec: + type: {{ .Values.metricsOperatorService.type }} + selector: + control-plane: metrics-operator + {{- include "chart.selectorLabels" . | nindent 4 }} + ports: + {{- .Values.metricsOperatorService.ports | toYaml | nindent 2 -}} \ No newline at end of file diff --git a/helm/chart/templates/metrics-validating-webhook-configuration.yaml b/helm/chart/templates/metrics-validating-webhook-configuration.yaml new file mode 100644 index 0000000000..b69c020909 --- /dev/null +++ b/helm/chart/templates/metrics-validating-webhook-configuration.yaml @@ -0,0 +1,29 @@ +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + name: {{ include "chart.fullname" . }}-metrics-validating-webhook-configuration + annotations: + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "chart.fullname" . }}- + labels: + {{- include "chart.labels" . | nindent 4 }} +webhooks: +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: '{{ include "chart.fullname" . }}-metrics-webhook-service' + namespace: '{{ .Release.Namespace }}' + path: /validate-metrics-keptn-sh-v1alpha3-keptnmetric + failurePolicy: Fail + name: vkeptnmetric.kb.io + rules: + - apiGroups: + - metrics.keptn.sh + apiVersions: + - v1alpha3 + operations: + - CREATE + - UPDATE + resources: + - keptnmetrics + sideEffects: None \ No newline at end of file diff --git a/helm/chart/templates/metrics-webhook-service.yaml b/helm/chart/templates/metrics-webhook-service.yaml new file mode 100644 index 0000000000..43dd64961f --- /dev/null +++ b/helm/chart/templates/metrics-webhook-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "chart.fullname" . }}-metrics-webhook-service + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +spec: + type: {{ .Values.metricsWebhookService.type }} + selector: + control-plane: metrics-operator + {{- include "chart.selectorLabels" . | nindent 4 }} + ports: + {{- .Values.metricsWebhookService.ports | toYaml | nindent 2 -}} \ No newline at end of file diff --git a/helm/chart/templates/scheduler-config.yaml b/helm/chart/templates/scheduler-config.yaml new file mode 100644 index 0000000000..58105f9d2f --- /dev/null +++ b/helm/chart/templates/scheduler-config.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "chart.fullname" . }}-scheduler-config + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +data: + scheduler-config.yaml: | + apiVersion: kubescheduler.config.k8s.io/v1beta3 + kind: KubeSchedulerConfiguration + leaderElection: + leaderElect: {{ .Values.schedulerConfig.schedulerConfigYaml.leaderElection.leaderElect + }} + profiles: {{ toYaml .Values.schedulerConfig.schedulerConfigYaml.profiles | nindent + 6 }} \ No newline at end of file diff --git a/helm/chart/templates/system-auth-delegator-rbac.yaml b/helm/chart/templates/system-auth-delegator-rbac.yaml new file mode 100644 index 0000000000..55b809ba86 --- /dev/null +++ b/helm/chart/templates/system-auth-delegator-rbac.yaml @@ -0,0 +1,15 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "chart.fullname" . }}-system-auth-delegator + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:auth-delegator +subjects: +- kind: ServiceAccount + name: '{{ include "chart.fullname" . }}-metrics-operator' + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/v1beta1.custom.metrics.k8s.io.yaml b/helm/chart/templates/v1beta1.custom.metrics.k8s.io.yaml new file mode 100644 index 0000000000..5933d1e303 --- /dev/null +++ b/helm/chart/templates/v1beta1.custom.metrics.k8s.io.yaml @@ -0,0 +1,16 @@ +apiVersion: apiregistration.k8s.io/v1 +kind: APIService +metadata: + name: v1beta1.custom.metrics.k8s.io + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +spec: + group: custom.metrics.k8s.io + groupPriorityMinimum: 100 + insecureSkipTLSVerify: true + service: + name: '{{ include "chart.fullname" . }}-metrics-operator-service' + namespace: '{{ .Release.Namespace }}' + version: v1beta1 + versionPriority: 100 \ No newline at end of file diff --git a/helm/chart/templates/v1beta2.custom.metrics.k8s.io.yaml b/helm/chart/templates/v1beta2.custom.metrics.k8s.io.yaml new file mode 100644 index 0000000000..f1543ca672 --- /dev/null +++ b/helm/chart/templates/v1beta2.custom.metrics.k8s.io.yaml @@ -0,0 +1,16 @@ +apiVersion: apiregistration.k8s.io/v1 +kind: APIService +metadata: + name: v1beta2.custom.metrics.k8s.io + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +spec: + group: custom.metrics.k8s.io + groupPriorityMinimum: 100 + insecureSkipTLSVerify: true + service: + name: '{{ include "chart.fullname" . }}-metrics-operator-service' + namespace: '{{ .Release.Namespace }}' + version: v1beta2 + versionPriority: 200 \ No newline at end of file From 6a00b20468fbff3aa479b87af6c1038f1fe902c6 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Mon, 7 Aug 2023 11:29:53 +0100 Subject: [PATCH 19/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .github/workflows/validate-helm-chart.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate-helm-chart.yml b/.github/workflows/validate-helm-chart.yml index be2f8e352e..e44d81a203 100644 --- a/.github/workflows/validate-helm-chart.yml +++ b/.github/workflows/validate-helm-chart.yml @@ -22,8 +22,8 @@ jobs: - name: Set up Node uses: actions/setup-node@v3.7.0 with: - node-version: 16 - + node-version: 16 + - name: Install readme generator run: | git clone https://github.com/bitnami-labs/readme-generator-for-helm.git From d4844fbc7bd9430feeb1e7488ab94239824bd82f Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Mon, 7 Aug 2023 12:20:44 +0100 Subject: [PATCH 20/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .github/actions/deploy-klt-on-cluster/action.yml | 1 + helm/.gitignore | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/actions/deploy-klt-on-cluster/action.yml b/.github/actions/deploy-klt-on-cluster/action.yml index cc4e6fb8e9..bb4a47df2f 100644 --- a/.github/actions/deploy-klt-on-cluster/action.yml +++ b/.github/actions/deploy-klt-on-cluster/action.yml @@ -93,6 +93,7 @@ runs: helm install -n keptn-lifecycle-toolkit-system --create-namespace toolkit ./helm/chart \ --set scheduler.scheduler.imagePullPolicy=Never \ --set scheduler.scheduler.image.tag=${{ inputs.runtime_tag }} \ + --set scheduler.scheduler.image.repository="localhost:5000/keptn/scheduler" \ --set lifecycleOperator.manager.imagePullPolicy=Never \ --set lifecycleOperator.manager.image.tag=${{ inputs.runtime_tag }} \ --set metricsOperator.manager.imagePullPolicy=Never \ diff --git a/helm/.gitignore b/helm/.gitignore index 3c14fd3ca9..aa1ec1ea06 100644 --- a/helm/.gitignore +++ b/helm/.gitignore @@ -1,6 +1 @@ *.tgz -# chart/rendered.yaml -# chart/templates/rendered.yaml -# chart/templates/crds.yaml -# chart/crds/*.yaml -# chart/templates/*.yaml From 7ce256bb00fc959fbb0025f322c66fbdb54b526d Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Mon, 7 Aug 2023 12:30:50 +0100 Subject: [PATCH 21/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .github/actions/deploy-klt-on-cluster/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/deploy-klt-on-cluster/action.yml b/.github/actions/deploy-klt-on-cluster/action.yml index bb4a47df2f..b78120e5b5 100644 --- a/.github/actions/deploy-klt-on-cluster/action.yml +++ b/.github/actions/deploy-klt-on-cluster/action.yml @@ -96,10 +96,13 @@ runs: --set scheduler.scheduler.image.repository="localhost:5000/keptn/scheduler" \ --set lifecycleOperator.manager.imagePullPolicy=Never \ --set lifecycleOperator.manager.image.tag=${{ inputs.runtime_tag }} \ + --set lifecycleOperator.manager.image.repository="localhost:5000/keptn/manager" \ --set metricsOperator.manager.imagePullPolicy=Never \ --set metricsOperator.manager.image.tag=${{ inputs.runtime_tag }} \ + --set metricsOperator.manager.image.repository="localhost:5000/keptn/manager" \ --set lifecycleOperator.manager.env.functionRunnerImage=localhost:5000/keptn/functions-runtime:${{ inputs.runtime_tag }} \ --set lifecycleOperator.manager.env.pythonRunnerImage=localhost:5000/keptn/python-runtime:${{ inputs.runtime_tag }} \ --set certificateOperator.manager.imagePullPolicy=Never \ --set certificateOperator.manager.image.tag=${{ inputs.runtime_tag }} \ + --set certificateOperator.manager.image.repository="localhost:5000/keptn/manager" \ --debug --wait --timeout 1m From 1cc313d422919253e7d6b2daec47041046477f0e Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Mon, 7 Aug 2023 14:19:25 +0100 Subject: [PATCH 22/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .github/actions/deploy-klt-on-cluster/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/deploy-klt-on-cluster/action.yml b/.github/actions/deploy-klt-on-cluster/action.yml index b78120e5b5..d072e7ca3a 100644 --- a/.github/actions/deploy-klt-on-cluster/action.yml +++ b/.github/actions/deploy-klt-on-cluster/action.yml @@ -96,13 +96,13 @@ runs: --set scheduler.scheduler.image.repository="localhost:5000/keptn/scheduler" \ --set lifecycleOperator.manager.imagePullPolicy=Never \ --set lifecycleOperator.manager.image.tag=${{ inputs.runtime_tag }} \ - --set lifecycleOperator.manager.image.repository="localhost:5000/keptn/manager" \ + --set lifecycleOperator.manager.image.repository="localhost:5000/keptn/lifecycle-operator" \ --set metricsOperator.manager.imagePullPolicy=Never \ --set metricsOperator.manager.image.tag=${{ inputs.runtime_tag }} \ - --set metricsOperator.manager.image.repository="localhost:5000/keptn/manager" \ + --set metricsOperator.manager.image.repository="localhost:5000/keptn/metrics-operator" \ --set lifecycleOperator.manager.env.functionRunnerImage=localhost:5000/keptn/functions-runtime:${{ inputs.runtime_tag }} \ --set lifecycleOperator.manager.env.pythonRunnerImage=localhost:5000/keptn/python-runtime:${{ inputs.runtime_tag }} \ --set certificateOperator.manager.imagePullPolicy=Never \ --set certificateOperator.manager.image.tag=${{ inputs.runtime_tag }} \ - --set certificateOperator.manager.image.repository="localhost:5000/keptn/manager" \ + --set certificateOperator.manager.image.repository="localhost:5000/keptn/certificate-operator" \ --debug --wait --timeout 1m From 98921cc0c54c7cc8e8298519050ddea090b849a0 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Mon, 7 Aug 2023 14:56:20 +0100 Subject: [PATCH 23/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- ...ificate-operator-leader-election-rbac.yaml | 6 ++--- .../templates/certificate-operator-rbac.yaml | 10 +++---- ...ertificate-operator-role-binding-rbac.yaml | 6 ++--- helm/chart/templates/deployment.yaml | 26 +++++++++---------- ...-apiserver-authentication-reader-rbac.yaml | 6 ++--- .../chart/templates/keptn-scheduler-rbac.yaml | 8 +++--- helm/chart/templates/keptnapp-crd.yaml | 2 +- helm/chart/templates/keptnappversion-crd.yaml | 2 +- .../keptnevaluationprovider-crd.yaml | 2 +- helm/chart/templates/keptnmetric-crd.yaml | 2 +- .../templates/keptnworkloadinstance-crd.yaml | 2 +- .../chart/templates/leader-election-rbac.yaml | 2 +- .../templates/lifecycle-manager-config.yaml | 2 +- ...ecycle-mutating-webhook-configuration.yaml | 6 ++--- ...fecycle-operator-leader-election-rbac.yaml | 8 +++--- .../lifecycle-operator-metrics-service.yaml | 2 +- .../templates/lifecycle-operator-rbac.yaml | 14 +++++----- ...ycle-validating-webhook-configuration.yaml | 6 ++--- .../templates/lifecycle-webhook-service.yaml | 2 +- .../templates/metrics-manager-config.yaml | 2 +- .../metrics-operator-hpa-controller-rbac.yaml | 4 +-- ...metrics-operator-leader-election-rbac.yaml | 8 +++--- .../templates/metrics-operator-rbac.yaml | 14 +++++----- ...etrics-operator-server-resources-rbac.yaml | 2 +- .../templates/metrics-operator-service.yaml | 2 +- ...rics-validating-webhook-configuration.yaml | 6 ++--- .../templates/metrics-webhook-service.yaml | 2 +- helm/chart/templates/scheduler-config.yaml | 2 +- .../templates/system-auth-delegator-rbac.yaml | 4 +-- .../v1beta1.custom.metrics.k8s.io.yaml | 2 +- .../v1beta2.custom.metrics.k8s.io.yaml | 2 +- 31 files changed, 82 insertions(+), 82 deletions(-) diff --git a/helm/chart/templates/certificate-operator-leader-election-rbac.yaml b/helm/chart/templates/certificate-operator-leader-election-rbac.yaml index 57a9cd0c99..4032796cf8 100644 --- a/helm/chart/templates/certificate-operator-leader-election-rbac.yaml +++ b/helm/chart/templates/certificate-operator-leader-election-rbac.yaml @@ -1,7 +1,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ include "chart.fullname" . }}-certificate-operator-leader-election-rolebinding + name: certificate-operator-leader-election-rolebinding namespace: {{ .Release.Namespace | quote }} labels: app.kubernetes.io/component: rbac @@ -11,8 +11,8 @@ metadata: roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: '{{ include "chart.fullname" . }}-leader-election-role' + name: 'leader-election-role' subjects: - kind: ServiceAccount - name: '{{ include "chart.fullname" . }}-certificate-operator' + name: 'certificate-operator' namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/certificate-operator-rbac.yaml b/helm/chart/templates/certificate-operator-rbac.yaml index 0053fe01a3..d6fbee14bc 100644 --- a/helm/chart/templates/certificate-operator-rbac.yaml +++ b/helm/chart/templates/certificate-operator-rbac.yaml @@ -1,7 +1,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: {{ include "chart.fullname" . }}-certificate-operator-role + name: certificate-operator-role namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} @@ -28,7 +28,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ include "chart.fullname" . }}-certificate-operator-role + name: certificate-operator-role namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} @@ -75,7 +75,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: {{ include "chart.fullname" . }}-certificate-operator-rolebinding + name: certificate-operator-rolebinding namespace: {{ .Release.Namespace | quote }} labels: app.kubernetes.io/component: rbac @@ -85,8 +85,8 @@ metadata: roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: '{{ include "chart.fullname" . }}-certificate-operator-role' + name: 'certificate-operator-role' subjects: - kind: ServiceAccount - name: '{{ include "chart.fullname" . }}-certificate-operator' + name: 'certificate-operator' namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/certificate-operator-role-binding-rbac.yaml b/helm/chart/templates/certificate-operator-role-binding-rbac.yaml index a17ed1d259..ce81dc486e 100644 --- a/helm/chart/templates/certificate-operator-role-binding-rbac.yaml +++ b/helm/chart/templates/certificate-operator-role-binding-rbac.yaml @@ -1,7 +1,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ include "chart.fullname" . }}-certificate-operator-role-binding + name: certificate-operator-role-binding namespace: {{ .Release.Namespace | quote }} labels: app.kubernetes.io/component: rbac @@ -11,8 +11,8 @@ metadata: roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: '{{ include "chart.fullname" . }}-certificate-operator-role' + name: 'certificate-operator-role' subjects: - kind: ServiceAccount - name: '{{ include "chart.fullname" . }}-certificate-operator' + name: 'certificate-operator' namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/deployment.yaml b/helm/chart/templates/deployment.yaml index 92e6e506bf..f126962e4c 100644 --- a/helm/chart/templates/deployment.yaml +++ b/helm/chart/templates/deployment.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "chart.fullname" . }}-certificate-operator + name: certificate-operator namespace: {{ .Release.Namespace | quote }} labels: app.kuberentes.io/instance: certificate-operator @@ -13,7 +13,7 @@ metadata: apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "chart.fullname" . }}-keptn-scheduler + name: keptn-scheduler namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} @@ -21,7 +21,7 @@ metadata: apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "chart.fullname" . }}-lifecycle-operator + name: lifecycle-operator namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} @@ -29,7 +29,7 @@ metadata: apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "chart.fullname" . }}-metrics-operator + name: metrics-operator namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} @@ -37,7 +37,7 @@ metadata: apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "chart.fullname" . }}-certificate-operator + name: certificate-operator namespace: {{ .Release.Namespace | quote }} labels: app.kubernetes.io/component: manager @@ -117,7 +117,7 @@ spec: imagePullSecrets: {{ .Values.imagePullSecrets | default list | toJson }} securityContext: runAsNonRoot: true - serviceAccountName: {{ include "chart.fullname" . }}-certificate-operator + serviceAccountName: certificate-operator terminationGracePeriodSeconds: 10 {{- if .Values.topologySpreadConstraints }} topologySpreadConstraints: {{- include "tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" $) | nindent 8 }} @@ -133,7 +133,7 @@ spec: apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "chart.fullname" . }}-lifecycle-operator + name: lifecycle-operator namespace: {{ .Release.Namespace | quote }} labels: app.kubernetes.io/part-of: keptn-lifecycle-toolkit @@ -260,7 +260,7 @@ spec: imagePullSecrets: {{ .Values.imagePullSecrets | default list | toJson }} securityContext: runAsNonRoot: true - serviceAccountName: {{ include "chart.fullname" . }}-lifecycle-operator + serviceAccountName: lifecycle-operator terminationGracePeriodSeconds: 10 volumes: - emptyDir: {} @@ -281,7 +281,7 @@ spec: apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "chart.fullname" . }}-metrics-operator + name: metrics-operator namespace: {{ .Release.Namespace | quote }} labels: app.kubernetes.io/part-of: keptn-lifecycle-toolkit @@ -384,7 +384,7 @@ spec: imagePullSecrets: {{ .Values.imagePullSecrets | default list | toJson }} securityContext: runAsNonRoot: true - serviceAccountName: {{ include "chart.fullname" . }}-metrics-operator + serviceAccountName: metrics-operator terminationGracePeriodSeconds: 10 volumes: - emptyDir: {} @@ -405,7 +405,7 @@ spec: apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "chart.fullname" . }}-scheduler + name: scheduler namespace: {{ .Release.Namespace | quote }} labels: component: scheduler @@ -474,10 +474,10 @@ spec: scheme: HTTPS {{- end }} imagePullSecrets: {{ .Values.imagePullSecrets | default list | toJson }} - serviceAccountName: {{ include "chart.fullname" . }}-keptn-scheduler + serviceAccountName: keptn-scheduler volumes: - configMap: - name: {{ include "chart.fullname" . }}-scheduler-config + name: scheduler-config name: scheduler-config {{- if .Values.topologySpreadConstraints }} topologySpreadConstraints: {{- include "tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" $) | nindent 8 }} diff --git a/helm/chart/templates/extension-apiserver-authentication-reader-rbac.yaml b/helm/chart/templates/extension-apiserver-authentication-reader-rbac.yaml index feabc0376a..5307cafb65 100644 --- a/helm/chart/templates/extension-apiserver-authentication-reader-rbac.yaml +++ b/helm/chart/templates/extension-apiserver-authentication-reader-rbac.yaml @@ -1,15 +1,15 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ include "chart.fullname" . }}-extension-apiserver-authentication-reader + name: extension-apiserver-authentication-reader namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: '{{ include "chart.fullname" . }}-extension-apiserver-authentication-reader' + name: 'extension-apiserver-authentication-reader' subjects: - kind: ServiceAccount - name: '{{ include "chart.fullname" . }}-keptn-scheduler' + name: 'keptn-scheduler' namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/keptn-scheduler-rbac.yaml b/helm/chart/templates/keptn-scheduler-rbac.yaml index 087a087b40..10776b56ae 100644 --- a/helm/chart/templates/keptn-scheduler-rbac.yaml +++ b/helm/chart/templates/keptn-scheduler-rbac.yaml @@ -1,7 +1,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ include "chart.fullname" . }}-keptn-scheduler + name: keptn-scheduler namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} @@ -187,15 +187,15 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: {{ include "chart.fullname" . }}-keptn-scheduler + name: keptn-scheduler namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: '{{ include "chart.fullname" . }}-keptn-scheduler' + name: 'keptn-scheduler' subjects: - kind: ServiceAccount - name: '{{ include "chart.fullname" . }}-keptn-scheduler' + name: 'keptn-scheduler' namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/keptnapp-crd.yaml b/helm/chart/templates/keptnapp-crd.yaml index a5521c96a1..e91c140173 100644 --- a/helm/chart/templates/keptnapp-crd.yaml +++ b/helm/chart/templates/keptnapp-crd.yaml @@ -15,7 +15,7 @@ spec: webhook: clientConfig: service: - name: '{{ include "chart.fullname" . }}-lifecycle-webhook-service' + name: 'lifecycle-webhook-service' namespace: '{{ .Release.Namespace }}' path: /convert conversionReviewVersions: diff --git a/helm/chart/templates/keptnappversion-crd.yaml b/helm/chart/templates/keptnappversion-crd.yaml index 63f0881ee6..87e27df853 100644 --- a/helm/chart/templates/keptnappversion-crd.yaml +++ b/helm/chart/templates/keptnappversion-crd.yaml @@ -15,7 +15,7 @@ spec: webhook: clientConfig: service: - name: '{{ include "chart.fullname" . }}-lifecycle-webhook-service' + name: 'lifecycle-webhook-service' namespace: '{{ .Release.Namespace }}' path: /convert conversionReviewVersions: diff --git a/helm/chart/templates/keptnevaluationprovider-crd.yaml b/helm/chart/templates/keptnevaluationprovider-crd.yaml index 78d4567b20..f56a2a1ddd 100644 --- a/helm/chart/templates/keptnevaluationprovider-crd.yaml +++ b/helm/chart/templates/keptnevaluationprovider-crd.yaml @@ -15,7 +15,7 @@ spec: webhook: clientConfig: service: - name: '{{ include "chart.fullname" . }}-lifecycle-webhook-service' + name: 'lifecycle-webhook-service' namespace: '{{ .Release.Namespace }}' path: /convert conversionReviewVersions: diff --git a/helm/chart/templates/keptnmetric-crd.yaml b/helm/chart/templates/keptnmetric-crd.yaml index be4fa773e6..47495a92d7 100644 --- a/helm/chart/templates/keptnmetric-crd.yaml +++ b/helm/chart/templates/keptnmetric-crd.yaml @@ -15,7 +15,7 @@ spec: webhook: clientConfig: service: - name: '{{ include "chart.fullname" . }}-metrics-webhook-service' + name: 'metrics-webhook-service' namespace: '{{ .Release.Namespace }}' path: /convert conversionReviewVersions: diff --git a/helm/chart/templates/keptnworkloadinstance-crd.yaml b/helm/chart/templates/keptnworkloadinstance-crd.yaml index 1d38b5c6af..63db74ac45 100644 --- a/helm/chart/templates/keptnworkloadinstance-crd.yaml +++ b/helm/chart/templates/keptnworkloadinstance-crd.yaml @@ -15,7 +15,7 @@ spec: webhook: clientConfig: service: - name: '{{ include "chart.fullname" . }}-lifecycle-webhook-service' + name: 'lifecycle-webhook-service' namespace: '{{ .Release.Namespace }}' path: /convert conversionReviewVersions: diff --git a/helm/chart/templates/leader-election-rbac.yaml b/helm/chart/templates/leader-election-rbac.yaml index 066755fbc3..48295746e4 100644 --- a/helm/chart/templates/leader-election-rbac.yaml +++ b/helm/chart/templates/leader-election-rbac.yaml @@ -1,7 +1,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: {{ include "chart.fullname" . }}-leader-election-role + name: leader-election-role namespace: {{ .Release.Namespace | quote }} labels: app.kubernetes.io/component: rbac diff --git a/helm/chart/templates/lifecycle-manager-config.yaml b/helm/chart/templates/lifecycle-manager-config.yaml index 7251eddbef..cd6362d7d6 100644 --- a/helm/chart/templates/lifecycle-manager-config.yaml +++ b/helm/chart/templates/lifecycle-manager-config.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "chart.fullname" . }}-lifecycle-manager-config + name: lifecycle-manager-config namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} diff --git a/helm/chart/templates/lifecycle-mutating-webhook-configuration.yaml b/helm/chart/templates/lifecycle-mutating-webhook-configuration.yaml index 4b5a23c425..0ea3c3ad70 100644 --- a/helm/chart/templates/lifecycle-mutating-webhook-configuration.yaml +++ b/helm/chart/templates/lifecycle-mutating-webhook-configuration.yaml @@ -1,9 +1,9 @@ apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: - name: {{ include "chart.fullname" . }}-lifecycle-mutating-webhook-configuration + name: lifecycle-mutating-webhook-configuration annotations: - cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "chart.fullname" . }}- + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/ labels: keptn.sh/inject-cert: "true" app.kubernetes.io/part-of: "keptn-lifecycle-toolkit" @@ -13,7 +13,7 @@ webhooks: - v1 clientConfig: service: - name: '{{ include "chart.fullname" . }}-lifecycle-webhook-service' + name: 'lifecycle-webhook-service' namespace: '{{ .Release.Namespace }}' path: /mutate-v1-pod failurePolicy: Fail diff --git a/helm/chart/templates/lifecycle-operator-leader-election-rbac.yaml b/helm/chart/templates/lifecycle-operator-leader-election-rbac.yaml index 41808c3622..fc1caf0d58 100644 --- a/helm/chart/templates/lifecycle-operator-leader-election-rbac.yaml +++ b/helm/chart/templates/lifecycle-operator-leader-election-rbac.yaml @@ -1,7 +1,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: {{ include "chart.fullname" . }}-lifecycle-operator-leader-election-role + name: lifecycle-operator-leader-election-role namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} @@ -41,15 +41,15 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ include "chart.fullname" . }}-lifecycle-operator-leader-election-rolebinding + name: lifecycle-operator-leader-election-rolebinding namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: '{{ include "chart.fullname" . }}-lifecycle-operator-leader-election-role' + name: 'lifecycle-operator-leader-election-role' subjects: - kind: ServiceAccount - name: '{{ include "chart.fullname" . }}-lifecycle-operator' + name: 'lifecycle-operator' namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/lifecycle-operator-metrics-service.yaml b/helm/chart/templates/lifecycle-operator-metrics-service.yaml index aa3b41a9c0..42971278d8 100644 --- a/helm/chart/templates/lifecycle-operator-metrics-service.yaml +++ b/helm/chart/templates/lifecycle-operator-metrics-service.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "chart.fullname" . }}-lifecycle-operator-metrics-service + name: lifecycle-operator-metrics-service namespace: {{ .Release.Namespace | quote }} labels: control-plane: lifecycle-operator diff --git a/helm/chart/templates/lifecycle-operator-rbac.yaml b/helm/chart/templates/lifecycle-operator-rbac.yaml index 7c9a4553b0..51054332a1 100644 --- a/helm/chart/templates/lifecycle-operator-rbac.yaml +++ b/helm/chart/templates/lifecycle-operator-rbac.yaml @@ -1,7 +1,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ include "chart.fullname" . }}-lifecycle-operator-role + name: lifecycle-operator-role namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} @@ -370,31 +370,31 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ include "chart.fullname" . }}-lifecycle-operator-rolebinding + name: lifecycle-operator-rolebinding namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: '{{ include "chart.fullname" . }}-lifecycle-operator-role' + name: 'lifecycle-operator-role' subjects: - kind: ServiceAccount - name: '{{ include "chart.fullname" . }}-lifecycle-operator' + name: 'lifecycle-operator' namespace: '{{ .Release.Namespace }}' --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: {{ include "chart.fullname" . }}-lifecycle-operator-rolebinding + name: lifecycle-operator-rolebinding namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: '{{ include "chart.fullname" . }}-lifecycle-operator-role' + name: 'lifecycle-operator-role' subjects: - kind: ServiceAccount - name: '{{ include "chart.fullname" . }}-lifecycle-operator' + name: 'lifecycle-operator' namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/lifecycle-validating-webhook-configuration.yaml b/helm/chart/templates/lifecycle-validating-webhook-configuration.yaml index 0c7c61e142..a4c4b11346 100644 --- a/helm/chart/templates/lifecycle-validating-webhook-configuration.yaml +++ b/helm/chart/templates/lifecycle-validating-webhook-configuration.yaml @@ -1,9 +1,9 @@ apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: - name: {{ include "chart.fullname" . }}-lifecycle-validating-webhook-configuration + name: lifecycle-validating-webhook-configuration annotations: - cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "chart.fullname" . }}- + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/ labels: {{- include "chart.labels" . | nindent 4 }} webhooks: @@ -11,7 +11,7 @@ webhooks: - v1 clientConfig: service: - name: '{{ include "chart.fullname" . }}-lifecycle-webhook-service' + name: 'lifecycle-webhook-service' namespace: '{{ .Release.Namespace }}' path: /validate-lifecycle-keptn-sh-v1alpha3-keptntaskdefinition failurePolicy: Fail diff --git a/helm/chart/templates/lifecycle-webhook-service.yaml b/helm/chart/templates/lifecycle-webhook-service.yaml index 7e10d64d71..3090da59d2 100644 --- a/helm/chart/templates/lifecycle-webhook-service.yaml +++ b/helm/chart/templates/lifecycle-webhook-service.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "chart.fullname" . }}-lifecycle-webhook-service + name: lifecycle-webhook-service namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} diff --git a/helm/chart/templates/metrics-manager-config.yaml b/helm/chart/templates/metrics-manager-config.yaml index dfc73dedab..6a4ed20c63 100644 --- a/helm/chart/templates/metrics-manager-config.yaml +++ b/helm/chart/templates/metrics-manager-config.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "chart.fullname" . }}-metrics-manager-config + name: metrics-manager-config namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} diff --git a/helm/chart/templates/metrics-operator-hpa-controller-rbac.yaml b/helm/chart/templates/metrics-operator-hpa-controller-rbac.yaml index 7348c453f8..87f0983cb9 100644 --- a/helm/chart/templates/metrics-operator-hpa-controller-rbac.yaml +++ b/helm/chart/templates/metrics-operator-hpa-controller-rbac.yaml @@ -1,14 +1,14 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: {{ include "chart.fullname" . }}-metrics-operator-hpa-controller + name: metrics-operator-hpa-controller namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: '{{ include "chart.fullname" . }}-metrics-operator-server-resources' + name: 'metrics-operator-server-resources' subjects: - kind: ServiceAccount name: horizontal-pod-autoscaler diff --git a/helm/chart/templates/metrics-operator-leader-election-rbac.yaml b/helm/chart/templates/metrics-operator-leader-election-rbac.yaml index f6fccf5f4e..0d25f741b3 100644 --- a/helm/chart/templates/metrics-operator-leader-election-rbac.yaml +++ b/helm/chart/templates/metrics-operator-leader-election-rbac.yaml @@ -1,7 +1,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: {{ include "chart.fullname" . }}-metrics-operator-leader-election-role + name: metrics-operator-leader-election-role namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} @@ -41,15 +41,15 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ include "chart.fullname" . }}-metrics-operator-leader-election-rolebinding + name: metrics-operator-leader-election-rolebinding namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: '{{ include "chart.fullname" . }}-metrics-operator-leader-election-role' + name: 'metrics-operator-leader-election-role' subjects: - kind: ServiceAccount - name: '{{ include "chart.fullname" . }}-metrics-operator' + name: 'metrics-operator' namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/metrics-operator-rbac.yaml b/helm/chart/templates/metrics-operator-rbac.yaml index af5f7808ca..b21f94b752 100644 --- a/helm/chart/templates/metrics-operator-rbac.yaml +++ b/helm/chart/templates/metrics-operator-rbac.yaml @@ -1,7 +1,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ include "chart.fullname" . }}-metrics-operator-role + name: metrics-operator-role namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} @@ -62,31 +62,31 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ include "chart.fullname" . }}-metrics-operator-rolebinding + name: metrics-operator-rolebinding namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: '{{ include "chart.fullname" . }}-metrics-operator-role' + name: 'metrics-operator-role' subjects: - kind: ServiceAccount - name: '{{ include "chart.fullname" . }}-metrics-operator' + name: 'metrics-operator' namespace: '{{ .Release.Namespace }}' --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: {{ include "chart.fullname" . }}-metrics-operator-rolebinding + name: metrics-operator-rolebinding namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: '{{ include "chart.fullname" . }}-metrics-operator-role' + name: 'metrics-operator-role' subjects: - kind: ServiceAccount - name: '{{ include "chart.fullname" . }}-metrics-operator' + name: 'metrics-operator' namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/metrics-operator-server-resources-rbac.yaml b/helm/chart/templates/metrics-operator-server-resources-rbac.yaml index 83599483b4..e57b594cca 100644 --- a/helm/chart/templates/metrics-operator-server-resources-rbac.yaml +++ b/helm/chart/templates/metrics-operator-server-resources-rbac.yaml @@ -1,7 +1,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ include "chart.fullname" . }}-metrics-operator-server-resources + name: metrics-operator-server-resources namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} diff --git a/helm/chart/templates/metrics-operator-service.yaml b/helm/chart/templates/metrics-operator-service.yaml index 7bfbce4dc8..3c051bf34c 100644 --- a/helm/chart/templates/metrics-operator-service.yaml +++ b/helm/chart/templates/metrics-operator-service.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "chart.fullname" . }}-metrics-operator-service + name: metrics-operator-service namespace: {{ .Release.Namespace | quote }} labels: control-plane: metrics-operator diff --git a/helm/chart/templates/metrics-validating-webhook-configuration.yaml b/helm/chart/templates/metrics-validating-webhook-configuration.yaml index b69c020909..c1f43f6dcb 100644 --- a/helm/chart/templates/metrics-validating-webhook-configuration.yaml +++ b/helm/chart/templates/metrics-validating-webhook-configuration.yaml @@ -1,9 +1,9 @@ apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: - name: {{ include "chart.fullname" . }}-metrics-validating-webhook-configuration + name: metrics-validating-webhook-configuration annotations: - cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "chart.fullname" . }}- + cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/ labels: {{- include "chart.labels" . | nindent 4 }} webhooks: @@ -11,7 +11,7 @@ webhooks: - v1 clientConfig: service: - name: '{{ include "chart.fullname" . }}-metrics-webhook-service' + name: 'metrics-webhook-service' namespace: '{{ .Release.Namespace }}' path: /validate-metrics-keptn-sh-v1alpha3-keptnmetric failurePolicy: Fail diff --git a/helm/chart/templates/metrics-webhook-service.yaml b/helm/chart/templates/metrics-webhook-service.yaml index 43dd64961f..41a1f88181 100644 --- a/helm/chart/templates/metrics-webhook-service.yaml +++ b/helm/chart/templates/metrics-webhook-service.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "chart.fullname" . }}-metrics-webhook-service + name: metrics-webhook-service namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} diff --git a/helm/chart/templates/scheduler-config.yaml b/helm/chart/templates/scheduler-config.yaml index 58105f9d2f..d1bf70335f 100644 --- a/helm/chart/templates/scheduler-config.yaml +++ b/helm/chart/templates/scheduler-config.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "chart.fullname" . }}-scheduler-config + name: scheduler-config namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} diff --git a/helm/chart/templates/system-auth-delegator-rbac.yaml b/helm/chart/templates/system-auth-delegator-rbac.yaml index 55b809ba86..5ec4afe7a5 100644 --- a/helm/chart/templates/system-auth-delegator-rbac.yaml +++ b/helm/chart/templates/system-auth-delegator-rbac.yaml @@ -1,7 +1,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: {{ include "chart.fullname" . }}-system-auth-delegator + name: system-auth-delegator namespace: {{ .Release.Namespace | quote }} labels: {{- include "chart.labels" . | nindent 4 }} @@ -11,5 +11,5 @@ roleRef: name: system:auth-delegator subjects: - kind: ServiceAccount - name: '{{ include "chart.fullname" . }}-metrics-operator' + name: 'metrics-operator' namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/v1beta1.custom.metrics.k8s.io.yaml b/helm/chart/templates/v1beta1.custom.metrics.k8s.io.yaml index 5933d1e303..c00e53716b 100644 --- a/helm/chart/templates/v1beta1.custom.metrics.k8s.io.yaml +++ b/helm/chart/templates/v1beta1.custom.metrics.k8s.io.yaml @@ -10,7 +10,7 @@ spec: groupPriorityMinimum: 100 insecureSkipTLSVerify: true service: - name: '{{ include "chart.fullname" . }}-metrics-operator-service' + name: 'metrics-operator-service' namespace: '{{ .Release.Namespace }}' version: v1beta1 versionPriority: 100 \ No newline at end of file diff --git a/helm/chart/templates/v1beta2.custom.metrics.k8s.io.yaml b/helm/chart/templates/v1beta2.custom.metrics.k8s.io.yaml index f1543ca672..0dcde353ed 100644 --- a/helm/chart/templates/v1beta2.custom.metrics.k8s.io.yaml +++ b/helm/chart/templates/v1beta2.custom.metrics.k8s.io.yaml @@ -10,7 +10,7 @@ spec: groupPriorityMinimum: 100 insecureSkipTLSVerify: true service: - name: '{{ include "chart.fullname" . }}-metrics-operator-service' + name: 'metrics-operator-service' namespace: '{{ .Release.Namespace }}' version: v1beta2 versionPriority: 200 \ No newline at end of file From 122cccd33f6c00cf6a6f37a5a3197aaf184e2e56 Mon Sep 17 00:00:00 2001 From: geoffrey1330 Date: Mon, 7 Aug 2023 15:13:45 +0100 Subject: [PATCH 24/26] chore: moved from continuous helmify to custom chart Signed-off-by: geoffrey1330 --- .../config/crd/bases/metrics.keptn.sh_keptnmetrics.yaml | 2 +- .../crd/bases/metrics.keptn.sh_keptnmetricsproviders.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetrics.yaml b/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetrics.yaml index 08a3483b55..cca55c3374 100644 --- a/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetrics.yaml +++ b/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetrics.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: keptnmetrics.metrics.keptn.sh spec: group: metrics.keptn.sh diff --git a/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetricsproviders.yaml b/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetricsproviders.yaml index c2558eb074..886d2a7da9 100644 --- a/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetricsproviders.yaml +++ b/metrics-operator/config/crd/bases/metrics.keptn.sh_keptnmetricsproviders.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: keptnmetricsproviders.metrics.keptn.sh spec: group: metrics.keptn.sh From 2c8b8aa4c9a522cc7470c9cd8537ee71a01d3256 Mon Sep 17 00:00:00 2001 From: RealAnna <89971034+RealAnna@users.noreply.github.com> Date: Tue, 8 Aug 2023 08:48:53 +0200 Subject: [PATCH 25/26] Add back certificate annotation Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com> --- .../templates/lifecycle-validating-webhook-configuration.yaml | 1 + .../templates/metrics-validating-webhook-configuration.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/helm/chart/templates/lifecycle-validating-webhook-configuration.yaml b/helm/chart/templates/lifecycle-validating-webhook-configuration.yaml index a4c4b11346..417b05905e 100644 --- a/helm/chart/templates/lifecycle-validating-webhook-configuration.yaml +++ b/helm/chart/templates/lifecycle-validating-webhook-configuration.yaml @@ -5,6 +5,7 @@ metadata: annotations: cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/ labels: + keptn.sh/inject-cert: "true" {{- include "chart.labels" . | nindent 4 }} webhooks: - admissionReviewVersions: diff --git a/helm/chart/templates/metrics-validating-webhook-configuration.yaml b/helm/chart/templates/metrics-validating-webhook-configuration.yaml index c1f43f6dcb..f391869c05 100644 --- a/helm/chart/templates/metrics-validating-webhook-configuration.yaml +++ b/helm/chart/templates/metrics-validating-webhook-configuration.yaml @@ -5,6 +5,7 @@ metadata: annotations: cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/ labels: + keptn.sh/inject-cert: "true" labels: {{- include "chart.labels" . | nindent 4 }} webhooks: - admissionReviewVersions: From b354eec537547695f6e083d9c58260b6954e42c1 Mon Sep 17 00:00:00 2001 From: realanna Date: Tue, 8 Aug 2023 09:10:25 +0200 Subject: [PATCH 26/26] feat(metrics-operator): add missing yaml Signed-off-by: realanna --- .../hpa-controller-keptn-metrics-rbac.yaml | 15 +++++++++++++++ ...ifecycle-validating-webhook-configuration.yaml | 2 +- .../metrics-validating-webhook-configuration.yaml | 2 +- helm/chart/templates/server-resources-rbac.yaml | 14 ++++++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 helm/chart/templates/hpa-controller-keptn-metrics-rbac.yaml create mode 100644 helm/chart/templates/server-resources-rbac.yaml diff --git a/helm/chart/templates/hpa-controller-keptn-metrics-rbac.yaml b/helm/chart/templates/hpa-controller-keptn-metrics-rbac.yaml new file mode 100644 index 0000000000..2ddb4ad488 --- /dev/null +++ b/helm/chart/templates/hpa-controller-keptn-metrics-rbac.yaml @@ -0,0 +1,15 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "chart.fullname" . }}-hpa-controller-keptn-metrics + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: '{{ include "chart.fullname" . }}-server-resources' +subjects: +- kind: ServiceAccount + name: horizontal-pod-autoscaler + namespace: '{{ .Release.Namespace }}' \ No newline at end of file diff --git a/helm/chart/templates/lifecycle-validating-webhook-configuration.yaml b/helm/chart/templates/lifecycle-validating-webhook-configuration.yaml index 417b05905e..30e53a24ff 100644 --- a/helm/chart/templates/lifecycle-validating-webhook-configuration.yaml +++ b/helm/chart/templates/lifecycle-validating-webhook-configuration.yaml @@ -5,7 +5,7 @@ metadata: annotations: cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/ labels: - keptn.sh/inject-cert: "true" + keptn.sh/inject-cert: "true" {{- include "chart.labels" . | nindent 4 }} webhooks: - admissionReviewVersions: diff --git a/helm/chart/templates/metrics-validating-webhook-configuration.yaml b/helm/chart/templates/metrics-validating-webhook-configuration.yaml index f391869c05..ee0485fe99 100644 --- a/helm/chart/templates/metrics-validating-webhook-configuration.yaml +++ b/helm/chart/templates/metrics-validating-webhook-configuration.yaml @@ -5,7 +5,7 @@ metadata: annotations: cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/ labels: - keptn.sh/inject-cert: "true" labels: + keptn.sh/inject-cert: "true" {{- include "chart.labels" . | nindent 4 }} webhooks: - admissionReviewVersions: diff --git a/helm/chart/templates/server-resources-rbac.yaml b/helm/chart/templates/server-resources-rbac.yaml new file mode 100644 index 0000000000..d78b2f9e9b --- /dev/null +++ b/helm/chart/templates/server-resources-rbac.yaml @@ -0,0 +1,14 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "chart.fullname" . }}-server-resources + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "chart.labels" . | nindent 4 }} +rules: +- apiGroups: + - custom.metrics.k8s.io + resources: + - '*' + verbs: + - '*' \ No newline at end of file