From 41bd47b7748c4d645243a4dae165651bbfd3533f Mon Sep 17 00:00:00 2001 From: Moritz Wiesinger Date: Wed, 4 Oct 2023 14:16:36 +0200 Subject: [PATCH] feat: create new Keptn umbrella Helm chart (#2214) Co-authored-by: realanna --- .../actions/deploy-klt-on-cluster/action.yml | 41 +- .../scripts/.helm-tests/default/result.yaml | 2688 ++++++++++++++--- .../scripts/.helm-tests/default/values.yaml | 134 +- .github/scripts/generate-helm-docs.sh | 3 + .github/scripts/helm-test.sh | 7 +- chart/.gitignore | 1 + chart/.helmignore | 23 + chart/Chart.lock | 12 + chart/Chart.yaml | 71 + chart/README.md | 16 + chart/charts/.gitkeep | 0 chart/templates/_helpers.tpl | 75 + chart/values.yaml | 10 + .../components/scheduler/_index.md | 2 +- docs/content/en/docs/install/install.md | 4 +- klt-cert-manager/chart/templates/_helpers.tpl | 22 +- ...ificate-operator-leader-election-rbac.yaml | 2 +- .../templates/certificate-operator-rbac.yaml | 6 +- ...ertificate-operator-role-binding-rbac.yaml | 2 +- .../chart/templates/deployment.yaml | 17 +- .../chart/templates/service-account.yaml | 4 +- lifecycle-operator/chart/Chart.yaml | 4 +- .../chart/templates/_helpers.tpl | 4 +- .../chart/templates/deployment.yaml | 24 +- metrics-operator/chart/Chart.yaml | 2 +- metrics-operator/chart/templates/_helpers.tpl | 5 +- .../chart/templates/deployment.yaml | 2 +- 27 files changed, 2629 insertions(+), 552 deletions(-) create mode 100644 chart/.gitignore create mode 100644 chart/.helmignore create mode 100644 chart/Chart.lock create mode 100644 chart/Chart.yaml create mode 100644 chart/README.md create mode 100644 chart/charts/.gitkeep create mode 100644 chart/templates/_helpers.tpl create mode 100644 chart/values.yaml diff --git a/.github/actions/deploy-klt-on-cluster/action.yml b/.github/actions/deploy-klt-on-cluster/action.yml index ed1e02ad48..62c2ecf470 100644 --- a/.github/actions/deploy-klt-on-cluster/action.yml +++ b/.github/actions/deploy-klt-on-cluster/action.yml @@ -94,25 +94,26 @@ runs: run: | echo "Installing Keptn using helm" helm version - helm install -n keptn-lifecycle-toolkit-system --create-namespace lifecycle-operator ./lifecycle-operator/chart \ - --set schedulingGatesEnabled=${{ inputs.scheduling-gates }} \ - --set scheduler.imagePullPolicy=Never \ - --set scheduler.image.tag=${{ inputs.runtime_tag }} \ - --set scheduler.image.repository="localhost:5000/keptn/scheduler" \ - --set lifecycleOperator.imagePullPolicy=Never \ - --set lifecycleOperator.image.tag=${{ inputs.runtime_tag }} \ - --set lifecycleOperator.image.repository="localhost:5000/keptn/lifecycle-operator" \ - --set lifecycleOperator.env.functionRunnerImage=localhost:5000/keptn/deno-runtime:${{ inputs.runtime_tag }} \ - --set lifecycleOperator.env.pythonRunnerImage=localhost:5000/keptn/python-runtime:${{ inputs.runtime_tag }} \ - helm install -n keptn-lifecycle-toolkit-system --create-namespace cert-manager ./klt-cert-manager/chart \ - --set imagePullPolicy=Never \ - --set image.tag=${{ inputs.runtime_tag }} \ - --set image.repository="localhost:5000/keptn/certificate-operator" \ - --debug --wait --timeout 1m - helm install -n keptn-lifecycle-toolkit-system metrics-operator --create-namespace ./metrics-operator/chart \ - --set imagePullPolicy=Never \ - --set env.enableKeptnAnalysis="true" \ - --set image.tag=${{ inputs.runtime_tag }} \ - --set image.repository="localhost:5000/keptn/metrics-operator" \ + cd ./chart + helm dependency update + helm dependency build + + helm install -n keptn-lifecycle-toolkit-system --create-namespace keptn ./ \ + --set lifecycleOperator.schedulingGatesEnabled=${{ inputs.scheduling-gates }} \ + --set lifecycleOperator.scheduler.imagePullPolicy=Never \ + --set lifecycleOperator.scheduler.image.tag=${{ inputs.runtime_tag }} \ + --set lifecycleOperator.scheduler.image.repository="localhost:5000/keptn/scheduler" \ + --set lifecycleOperator.lifecycleOperator.imagePullPolicy=Never \ + --set lifecycleOperator.lifecycleOperator.image.tag=${{ inputs.runtime_tag }} \ + --set lifecycleOperator.lifecycleOperator.image.repository="localhost:5000/keptn/lifecycle-operator" \ + --set lifecycleOperator.lifecycleOperator.env.functionRunnerImage=localhost:5000/keptn/deno-runtime:${{ inputs.runtime_tag }} \ + --set lifecycleOperator.lifecycleOperator.env.pythonRunnerImage=localhost:5000/keptn/python-runtime:${{ inputs.runtime_tag }} \ + --set certManager.imagePullPolicy=Never \ + --set certManager.image.tag=${{ inputs.runtime_tag }} \ + --set certManager.image.repository="localhost:5000/keptn/certificate-operator" \ + --set metricsOperator.imagePullPolicy=Never \ + --set metricsOperator.env.enableKeptnAnalysis="true" \ + --set metricsOperator.image.tag=${{ inputs.runtime_tag }} \ + --set metricsOperator.image.repository="localhost:5000/keptn/metrics-operator" \ --debug --wait --timeout 1m diff --git a/.github/scripts/.helm-tests/default/result.yaml b/.github/scripts/.helm-tests/default/result.yaml index b4fb0685e3..3f89f9c3aa 100644 --- a/.github/scripts/.helm-tests/default/result.yaml +++ b/.github/scripts/.helm-tests/default/result.yaml @@ -1,40 +1,68 @@ --- -# Source: keptn-lifecycle-operator/templates/deployment.yaml +# Source: keptn/charts/certManager/templates/service-account.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: certificate-operator + namespace: "helmtests" + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + helm.sh/chart: cert-manager-0.1.0 + app.kubernetes.io/name: cert-manager + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v1.1.0" + app.kubernetes.io/managed-by: Helm +--- +# Source: keptn/charts/lifecycleOperator/templates/deployment.yaml apiVersion: v1 kind: ServiceAccount metadata: name: keptn-scheduler namespace: "helmtests" labels: - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm --- -# Source: keptn-lifecycle-operator/templates/deployment.yaml +# Source: keptn/charts/lifecycleOperator/templates/deployment.yaml apiVersion: v1 kind: ServiceAccount metadata: name: lifecycle-operator namespace: "helmtests" labels: - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +--- +# Source: keptn/charts/metricsOperator/templates/metrics-operator-service-account.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: metrics-operator + namespace: "helmtests" + labels: + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm --- -# Source: keptn-lifecycle-operator/templates/lifecycle-manager-config.yaml +# Source: keptn/charts/lifecycleOperator/templates/lifecycle-manager-config.yaml apiVersion: v1 kind: ConfigMap metadata: name: lifecycle-manager-config namespace: "helmtests" labels: - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm data: @@ -51,16 +79,16 @@ data: webhook: port: 9443 --- -# Source: keptn-lifecycle-operator/templates/scheduler-config.yaml +# Source: keptn/charts/lifecycleOperator/templates/scheduler-config.yaml apiVersion: v1 kind: ConfigMap metadata: name: scheduler-config namespace: "helmtests" labels: - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm data: @@ -76,7 +104,33 @@ data: - name: KLCPermit schedulerName: keptn-scheduler --- -# Source: keptn-lifecycle-operator/templates/keptnapp-crd.yaml +# Source: keptn/charts/metricsOperator/templates/metrics-manager-config.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: metrics-operator-config + namespace: "helmtests" + labels: + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +data: + controller_manager_config.yaml: | + apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 + health: + healthProbeBindAddress: ":8081" + kind: ControllerManagerConfig + leaderElection: + leaderElect: true + resourceName: "3f8532ca.keptn.sh" + metrics: + bindAddress: "127.0.0.1:8080" + webhook: + port: 9443 +--- +# Source: keptn/charts/lifecycleOperator/templates/keptnapp-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -88,9 +142,9 @@ metadata: app.kubernetes.io/part-of: keptn-lifecycle-toolkit crdGroup: lifecycle.keptn.sh keptn.sh/inject-cert: "true" - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm spec: @@ -341,7 +395,7 @@ spec: subresources: status: {} --- -# Source: keptn-lifecycle-operator/templates/keptnappcreationrequest-crd.yaml +# Source: keptn/charts/lifecycleOperator/templates/keptnappcreationrequest-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -353,9 +407,9 @@ metadata: app.kubernetes.io/part-of: keptn-lifecycle-toolkit crdGroup: lifecycle.keptn.sh keptn.sh/inject-cert: "true" - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm spec: @@ -404,7 +458,7 @@ spec: subresources: status: {} --- -# Source: keptn-lifecycle-operator/templates/keptnappversion-crd.yaml +# Source: keptn/charts/lifecycleOperator/templates/keptnappversion-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -416,9 +470,9 @@ metadata: app.kubernetes.io/part-of: keptn-lifecycle-toolkit crdGroup: lifecycle.keptn.sh keptn.sh/inject-cert: "true" - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm spec: @@ -1223,7 +1277,7 @@ spec: subresources: status: {} --- -# Source: keptn-lifecycle-operator/templates/keptnconfig-crd.yaml +# Source: keptn/charts/lifecycleOperator/templates/keptnconfig-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -1235,9 +1289,9 @@ metadata: app.kubernetes.io/part-of: keptn-lifecycle-toolkit crdGroup: lifecycle.keptn.sh keptn.sh/inject-cert: "true" - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm spec: @@ -1293,7 +1347,7 @@ spec: subresources: status: {} --- -# Source: keptn-lifecycle-operator/templates/keptnevaluation-crd.yaml +# Source: keptn/charts/lifecycleOperator/templates/keptnevaluation-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -1305,9 +1359,9 @@ metadata: app.kubernetes.io/part-of: keptn-lifecycle-toolkit crdGroup: lifecycle.keptn.sh keptn.sh/inject-cert: "true" - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm spec: @@ -1678,7 +1732,7 @@ spec: subresources: status: {} --- -# Source: keptn-lifecycle-operator/templates/keptnevaluationdefinition-crd.yaml +# Source: keptn/charts/lifecycleOperator/templates/keptnevaluationdefinition-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -1690,9 +1744,9 @@ metadata: app.kubernetes.io/part-of: keptn-lifecycle-toolkit crdGroup: lifecycle.keptn.sh keptn.sh/inject-cert: "true" - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm spec: @@ -1871,7 +1925,7 @@ spec: subresources: status: {} --- -# Source: keptn-lifecycle-operator/templates/keptnevaluationprovider-crd.yaml +# Source: keptn/charts/lifecycleOperator/templates/keptnevaluationprovider-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -1883,9 +1937,9 @@ metadata: app.kubernetes.io/part-of: keptn-lifecycle-toolkit crdGroup: lifecycle.keptn.sh keptn.sh/inject-cert: "true" - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm spec: @@ -2053,7 +2107,7 @@ spec: subresources: status: {} --- -# Source: keptn-lifecycle-operator/templates/keptntask-crd.yaml +# Source: keptn/charts/lifecycleOperator/templates/keptntask-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -2065,9 +2119,9 @@ metadata: app.kubernetes.io/part-of: keptn-lifecycle-toolkit crdGroup: lifecycle.keptn.sh keptn.sh/inject-cert: "true" - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm spec: @@ -2465,7 +2519,7 @@ spec: subresources: status: {} --- -# Source: keptn-lifecycle-operator/templates/keptntaskdefinition-crd.yaml +# Source: keptn/charts/lifecycleOperator/templates/keptntaskdefinition-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -2477,9 +2531,9 @@ metadata: app.kubernetes.io/part-of: keptn-lifecycle-toolkit crdGroup: lifecycle.keptn.sh keptn.sh/inject-cert: "true" - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm spec: @@ -4185,7 +4239,7 @@ spec: subresources: status: {} --- -# Source: keptn-lifecycle-operator/templates/keptnworkload-crd.yaml +# Source: keptn/charts/lifecycleOperator/templates/keptnworkload-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -4197,9 +4251,9 @@ metadata: app.kubernetes.io/part-of: keptn-lifecycle-toolkit crdGroup: lifecycle.keptn.sh keptn.sh/inject-cert: "true" - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm spec: @@ -4477,7 +4531,7 @@ spec: subresources: status: {} --- -# Source: keptn-lifecycle-operator/templates/keptnworkloadinstance-crd.yaml +# Source: keptn/charts/lifecycleOperator/templates/keptnworkloadinstance-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -4489,9 +4543,9 @@ metadata: app.kubernetes.io/part-of: keptn-lifecycle-toolkit crdGroup: lifecycle.keptn.sh keptn.sh/inject-cert: "true" - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm spec: @@ -5267,230 +5321,1404 @@ spec: subresources: status: {} --- -# Source: keptn-lifecycle-operator/templates/keptn-scheduler-rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: keptn-scheduler - namespace: "helmtests" - labels: - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name - app.kubernetes.io/version: "v0.8.2" - app.kubernetes.io/managed-by: Helm -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 ---- -# Source: keptn-lifecycle-operator/templates/lifecycle-operator-rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole +# Source: keptn/charts/metricsOperator/templates/analysis-crd.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: - name: lifecycle-operator-role - namespace: "helmtests" + name: analyses.metrics.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + cert-manager.io/inject-ca-from: 'helmtests/klt-certs' labels: - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: metrics.keptn.sh + keptn.sh/inject-cert: "true" + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm -rules: -- apiGroups: - - apps - resources: - - daemonsets - - deployments - - replicasets - - statefulsets - verbs: - - get - - list - - watch -- apiGroups: - - argoproj.io - resources: - - rollouts - verbs: - - get - - list - - watch -- apiGroups: +spec: + group: metrics.keptn.sh + names: + kind: Analysis + listKind: AnalysisList + plural: analyses + singular: analysis + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.analysisDefinition.name + name: AnalysisDefinition + type: string + - jsonPath: .status.state + name: State + type: string + - jsonPath: .status.warning + name: Warning + type: string + - jsonPath: .status.pass + name: Pass + type: string + name: v1alpha3 + schema: + openAPIV3Schema: + description: Analysis is the Schema for the analyses 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: AnalysisSpec defines the desired state of Analysis + properties: + analysisDefinition: + description: AnalysisDefinition refers to the AnalysisDefinition, + a CRD that stores the AnalysisValuesTemplates + properties: + name: + description: Name defines the name of the referenced object + type: string + namespace: + description: Namespace defines the namespace of the referenced + object + type: string + required: + - name + type: object + args: + additionalProperties: + type: string + description: Args corresponds to a map of key/value pairs that can + be used to substitute placeholders in the AnalysisValueTemplate + query. i.e. for args foo:bar the query could be "query:percentile(95)?scope=tag(my_foo_label:)". + type: object + timeframe: + description: Timeframe specifies the range for the corresponding query + in the AnalysisValueTemplate. Please note that either a combination + of 'from' and 'to' or the 'recent' property may be set. If neither + is set, the Analysis can not be added to the cluster. + properties: + from: + description: From is the time of start for the query. This field + follows RFC3339 time format + format: date-time + type: string + recent: + description: Recent describes a recent timeframe using a duration + string. E.g. Setting this to '5m' provides an Analysis for the + last five minutes + pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ + type: string + to: + description: To is the time of end for the query. This field follows + RFC3339 time format + format: date-time + type: string + type: object + required: + - analysisDefinition + - timeframe + type: object + status: + description: AnalysisStatus stores the status of the overall analysis + returns also pass or warnings + properties: + pass: + description: Pass returns whether the SLO is satisfied + type: boolean + raw: + description: Raw contains the raw result of the SLO computation + type: string + state: + description: State describes the current state of the Analysis (Pending/Progressing/Completed) + type: string + storedValues: + additionalProperties: + description: ProviderResult stores reference of already collected + provider query associated to its objective template + properties: + errMsg: + description: ErrMsg stores any possible error at retrieval time + type: string + objectiveReference: + description: Objective store reference to corresponding objective + template + properties: + name: + description: Name defines the name of the referenced object + type: string + namespace: + description: Namespace defines the namespace of the referenced + object + type: string + required: + - name + type: object + query: + description: Query represents the executed query + type: string + value: + description: Value is the value the provider returned + type: string + type: object + description: StoredValues contains all analysis values that have already + been retrieved successfully + type: object + timeframe: + description: Timeframe describes the time frame which is evaluated + by the Analysis + properties: + from: + description: From is the time of start for the query. This field + follows RFC3339 time format + format: date-time + type: string + recent: + description: Recent describes a recent timeframe using a duration + string. E.g. Setting this to '5m' provides an Analysis for the + last five minutes + pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$ + type: string + to: + description: To is the time of end for the query. This field follows + RFC3339 time format + format: date-time + type: string + type: object + warning: + description: Warning returns whether the analysis returned a warning + type: boolean + required: + - state + - timeframe + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: keptn/charts/metricsOperator/templates/analysisdefinition-crd.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: analysisdefinitions.metrics.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + cert-manager.io/inject-ca-from: 'helmtests/klt-certs' + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: metrics.keptn.sh + keptn.sh/inject-cert: "true" + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +spec: + group: metrics.keptn.sh + names: + kind: AnalysisDefinition + listKind: AnalysisDefinitionList + plural: analysisdefinitions + singular: analysisdefinition + scope: Namespaced + versions: + - name: v1alpha3 + schema: + openAPIV3Schema: + description: AnalysisDefinition is the Schema for the analysisdefinitions + APIs + 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: AnalysisDefinitionSpec defines the desired state of AnalysisDefinition + properties: + objectives: + description: Objectives defines a list of objectives to evaluate for + an analysis + items: + description: Objective defines an objective for analysis + properties: + analysisValueTemplateRef: + description: AnalysisValueTemplateRef refers to the appropriate + AnalysisValueTemplate + properties: + name: + description: Name defines the name of the referenced object + type: string + namespace: + description: Namespace defines the namespace of the referenced + object + type: string + required: + - name + type: object + keyObjective: + default: false + description: KeyObjective defines whether the whole analysis + fails when this objective's target is not met + type: boolean + target: + description: Target defines failure or warning criteria + properties: + failure: + description: Failure defines limits up to which an analysis + fails + properties: + equalTo: + description: EqualTo represents '==' operator + properties: + fixedValue: + anyOf: + - type: integer + - type: string + description: FixedValue defines the value for comparison + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - fixedValue + type: object + greaterThan: + description: GreaterThan represents '>' operator + properties: + fixedValue: + anyOf: + - type: integer + - type: string + description: FixedValue defines the value for comparison + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - fixedValue + type: object + greaterThanOrEqual: + description: GreaterThanOrEqual represents '>=' operator + properties: + fixedValue: + anyOf: + - type: integer + - type: string + description: FixedValue defines the value for comparison + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - fixedValue + type: object + inRange: + description: InRange represents operator checking the + value is inclusively in the defined range, e.g. 2 + <= x <= 5 + properties: + highBound: + anyOf: + - type: integer + - type: string + description: HighBound defines the higher bound + of the range + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + lowBound: + anyOf: + - type: integer + - type: string + description: LowBound defines the lower bound of + the range + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - highBound + - lowBound + type: object + lessThan: + description: LessThan represents '<' operator + properties: + fixedValue: + anyOf: + - type: integer + - type: string + description: FixedValue defines the value for comparison + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - fixedValue + type: object + lessThanOrEqual: + description: LessThanOrEqual represents '<=' operator + properties: + fixedValue: + anyOf: + - type: integer + - type: string + description: FixedValue defines the value for comparison + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - fixedValue + type: object + notInRange: + description: NotInRange represents operator checking + the value is exclusively out of the defined range, + e.g. x < 2 AND x > 5 + properties: + highBound: + anyOf: + - type: integer + - type: string + description: HighBound defines the higher bound + of the range + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + lowBound: + anyOf: + - type: integer + - type: string + description: LowBound defines the lower bound of + the range + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - highBound + - lowBound + type: object + type: object + warning: + description: Warning defines limits where the result does + not pass or fail + properties: + equalTo: + description: EqualTo represents '==' operator + properties: + fixedValue: + anyOf: + - type: integer + - type: string + description: FixedValue defines the value for comparison + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - fixedValue + type: object + greaterThan: + description: GreaterThan represents '>' operator + properties: + fixedValue: + anyOf: + - type: integer + - type: string + description: FixedValue defines the value for comparison + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - fixedValue + type: object + greaterThanOrEqual: + description: GreaterThanOrEqual represents '>=' operator + properties: + fixedValue: + anyOf: + - type: integer + - type: string + description: FixedValue defines the value for comparison + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - fixedValue + type: object + inRange: + description: InRange represents operator checking the + value is inclusively in the defined range, e.g. 2 + <= x <= 5 + properties: + highBound: + anyOf: + - type: integer + - type: string + description: HighBound defines the higher bound + of the range + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + lowBound: + anyOf: + - type: integer + - type: string + description: LowBound defines the lower bound of + the range + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - highBound + - lowBound + type: object + lessThan: + description: LessThan represents '<' operator + properties: + fixedValue: + anyOf: + - type: integer + - type: string + description: FixedValue defines the value for comparison + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - fixedValue + type: object + lessThanOrEqual: + description: LessThanOrEqual represents '<=' operator + properties: + fixedValue: + anyOf: + - type: integer + - type: string + description: FixedValue defines the value for comparison + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - fixedValue + type: object + notInRange: + description: NotInRange represents operator checking + the value is exclusively out of the defined range, + e.g. x < 2 AND x > 5 + properties: + highBound: + anyOf: + - type: integer + - type: string + description: HighBound defines the higher bound + of the range + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + lowBound: + anyOf: + - type: integer + - type: string + description: LowBound defines the lower bound of + the range + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - highBound + - lowBound + type: object + type: object + type: object + weight: + default: 1 + description: Weight can be used to emphasize the importance + of one Objective over the others + type: integer + required: + - analysisValueTemplateRef + type: object + type: array + totalScore: + description: TotalScore defines the required score for an analysis + to be successful + properties: + passPercentage: + description: PassPercentage defines the threshold to reach for + an analysis to pass + maximum: 100 + minimum: 0 + type: integer + warningPercentage: + description: WarningPercentage defines the threshold to reach + for an analysis to pass with a 'warning' status + maximum: 100 + minimum: 0 + type: integer + required: + - passPercentage + - warningPercentage + type: object + required: + - totalScore + type: object + status: + description: unused field + type: string + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: keptn/charts/metricsOperator/templates/analysisvaluetemplate-crd.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: analysisvaluetemplates.metrics.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + cert-manager.io/inject-ca-from: 'helmtests/klt-certs' + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: metrics.keptn.sh + keptn.sh/inject-cert: "true" + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +spec: + group: metrics.keptn.sh + names: + kind: AnalysisValueTemplate + listKind: AnalysisValueTemplateList + plural: analysisvaluetemplates + singular: analysisvaluetemplate + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.provider.name + name: Provider + type: string + name: v1alpha3 + schema: + openAPIV3Schema: + description: AnalysisValueTemplate is the Schema for the analysisvaluetemplates + 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 contains the specification for the AnalysisValueTemplate + properties: + provider: + description: Provider refers to the KeptnMetricsProvider which should + be used to retrieve the data + properties: + name: + description: Name defines the name of the referenced object + type: string + namespace: + description: Namespace defines the namespace of the referenced + object + type: string + required: + - name + type: object + query: + description: Query represents the query to be run. It can include + placeholders that are defined using the go template syntax. More + info on go templating - https://pkg.go.dev/text/template + type: string + required: + - provider + - query + type: object + status: + description: unused field + type: string + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: keptn/charts/metricsOperator/templates/keptnmetric-crd.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnmetrics.metrics.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + cert-manager.io/inject-ca-from: 'helmtests/klt-certs' + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: metrics.keptn.sh + keptn.sh/inject-cert: "true" + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: 'metrics-webhook-service' + namespace: 'helmtests' + 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 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 + storedResults: + description: StoredResults indicates the upper limit of how many + past results should be stored in the status of a KeptnMetric + maximum: 255 + type: integer + 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 + intervalResults: + description: IntervalResults contain a slice of all the interval results + items: + 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 + range: + description: Range represents the time range for which this + data was queried + properties: + aggregation: + description: 'Aggregation defines 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 + storedResults: + description: StoredResults indicates the upper limit of + how many past results should be stored in the status of + a KeptnMetric + maximum: 255 + type: integer + type: object + value: + description: Value represents the resulting value + type: string + required: + - lastUpdated + - range + - value + type: object + type: array + 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 + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: keptn/charts/metricsOperator/templates/keptnmetricsprovider-crd.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnmetricsproviders.metrics.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + cert-manager.io/inject-ca-from: 'helmtests/klt-certs' + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + crdGroup: metrics.keptn.sh + keptn.sh/inject-cert: "true" + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +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: {} +--- +# Source: keptn/charts/certManager/templates/certificate-operator-rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: certificate-operator-role + namespace: "helmtests" + labels: + helm.sh/chart: cert-manager-0.1.0 + app.kubernetes.io/name: cert-manager + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v1.1.0" + app.kubernetes.io/managed-by: Helm +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 +--- +# Source: keptn/charts/lifecycleOperator/templates/keptn-scheduler-rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: keptn-scheduler + namespace: "helmtests" + labels: + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +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 +--- +# Source: keptn/charts/lifecycleOperator/templates/lifecycle-operator-rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: lifecycle-operator-role + namespace: "helmtests" + labels: + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +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 @@ -5833,16 +7061,16 @@ rules: verbs: - get --- -# Source: keptn-lifecycle-operator/templates/server-resources-rbac.yaml +# Source: keptn/charts/lifecycleOperator/templates/server-resources-rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: release-name-keptn-lifecycle-operator-server-resources + name: keptn-test-lifecycleOperator-server-resources namespace: "helmtests" labels: - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm rules: @@ -5853,16 +7081,170 @@ rules: verbs: - '*' --- -# Source: keptn-lifecycle-operator/templates/keptn-scheduler-rbac.yaml +# Source: keptn/charts/metricsOperator/templates/metrics-operator-rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: metrics-operator-role + namespace: "helmtests" + labels: + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +rules: + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - secrets + verbs: + - get + - apiGroups: + - metrics.keptn.sh + resources: + - analyses + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - metrics.keptn.sh + resources: + - analyses/finalizers + verbs: + - update + - apiGroups: + - metrics.keptn.sh + resources: + - analyses/status + verbs: + - get + - patch + - update + - apiGroups: + - metrics.keptn.sh + resources: + - analysisdefinitions + verbs: + - get + - list + - watch + - apiGroups: + - metrics.keptn.sh + resources: + - analysisvaluetemplates + verbs: + - get + - list + - watch + - 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 +--- +# Source: keptn/charts/metricsOperator/templates/metrics-operator-server-resources-rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: metrics-operator-server-resources + namespace: "helmtests" + labels: + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - custom.metrics.k8s.io + resources: + - '*' + verbs: + - get + - list + - watch +--- +# Source: keptn/charts/certManager/templates/certificate-operator-rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: certificate-operator-rolebinding + namespace: "helmtests" + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: certificate-operator + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + helm.sh/chart: cert-manager-0.1.0 + app.kubernetes.io/name: cert-manager + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v1.1.0" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: 'certificate-operator-role' +subjects: +- kind: ServiceAccount + name: 'certificate-operator' + namespace: 'helmtests' +--- +# Source: keptn/charts/lifecycleOperator/templates/keptn-scheduler-rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: keptn-scheduler namespace: "helmtests" labels: - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm roleRef: @@ -5874,16 +7256,16 @@ subjects: name: 'keptn-scheduler' namespace: 'helmtests' --- -# Source: keptn-lifecycle-operator/templates/lifecycle-operator-rbac.yaml +# Source: keptn/charts/lifecycleOperator/templates/lifecycle-operator-rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: lifecycle-operator-rolebinding namespace: "helmtests" labels: - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm roleRef: @@ -5895,7 +7277,102 @@ subjects: name: 'lifecycle-operator' namespace: 'helmtests' --- -# Source: keptn-lifecycle-operator/templates/leader-election-rbac.yaml +# Source: keptn/charts/metricsOperator/templates/metrics-operator-hpa-controller-rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: metrics-operator-hpa-controller + namespace: "helmtests" + labels: + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: 'metrics-operator-server-resources' +subjects: +- kind: ServiceAccount + name: horizontal-pod-autoscaler + namespace: 'helmtests' +--- +# Source: keptn/charts/metricsOperator/templates/metrics-operator-rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: metrics-operator-rolebinding + namespace: "helmtests" + labels: + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: 'metrics-operator-role' +subjects: + - kind: ServiceAccount + name: 'metrics-operator' + namespace: 'helmtests' +--- +# Source: keptn/charts/metricsOperator/templates/system-auth-delegator-rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: system-auth-delegator + namespace: "helmtests" + labels: + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:auth-delegator +subjects: +- kind: ServiceAccount + name: 'metrics-operator' + namespace: 'helmtests' +--- +# Source: keptn/charts/certManager/templates/certificate-operator-rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: certificate-operator-role + namespace: "helmtests" + labels: + helm.sh/chart: cert-manager-0.1.0 + app.kubernetes.io/name: cert-manager + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v1.1.0" + app.kubernetes.io/managed-by: Helm +rules: +- apiGroups: + - "" + resources: + - secrets + verbs: + - create + - list + - watch +- apiGroups: + - "" + resourceNames: + - klt-certs + resources: + - secrets + verbs: + - get + - patch + - update +--- +# Source: keptn/charts/lifecycleOperator/templates/leader-election-rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -5905,9 +7382,9 @@ metadata: app.kubernetes.io/component: rbac app.kubernetes.io/created-by: certificate-operator app.kubernetes.io/part-of: keptn-lifecycle-toolkit - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm rules: @@ -5943,16 +7420,61 @@ rules: - create - patch --- -# Source: keptn-lifecycle-operator/templates/lifecycle-operator-leader-election-rbac.yaml +# Source: keptn/charts/lifecycleOperator/templates/lifecycle-operator-leader-election-rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: lifecycle-operator-leader-election-role namespace: "helmtests" labels: - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +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 +--- +# Source: keptn/charts/metricsOperator/templates/metrics-operator-leader-election-rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: metrics-operator-leader-election-role + namespace: "helmtests" + labels: + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm rules: @@ -5988,16 +7510,64 @@ rules: - create - patch --- -# Source: keptn-lifecycle-operator/templates/extension-apiserver-authentication-reader-rbac.yaml +# Source: keptn/charts/certManager/templates/certificate-operator-leader-election-rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: certificate-operator-leader-election-rolebinding + namespace: "helmtests" + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: certificate-operator + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + helm.sh/chart: cert-manager-0.1.0 + app.kubernetes.io/name: cert-manager + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v1.1.0" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: 'leader-election-role' +subjects: +- kind: ServiceAccount + name: 'certificate-operator' + namespace: 'helmtests' +--- +# Source: keptn/charts/certManager/templates/certificate-operator-role-binding-rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: certificate-operator-role-binding + namespace: "helmtests" + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: certificate-operator + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + helm.sh/chart: cert-manager-0.1.0 + app.kubernetes.io/name: cert-manager + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v1.1.0" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: 'certificate-operator-role' +subjects: +- kind: ServiceAccount + name: 'certificate-operator' + namespace: 'helmtests' +--- +# Source: keptn/charts/lifecycleOperator/templates/extension-apiserver-authentication-reader-rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: extension-apiserver-authentication-reader namespace: "helmtests" labels: - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm roleRef: @@ -6009,16 +7579,16 @@ subjects: name: 'keptn-scheduler' namespace: 'helmtests' --- -# Source: keptn-lifecycle-operator/templates/lifecycle-operator-leader-election-rbac.yaml +# Source: keptn/charts/lifecycleOperator/templates/lifecycle-operator-leader-election-rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: lifecycle-operator-leader-election-rolebinding namespace: "helmtests" labels: - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm roleRef: @@ -6030,16 +7600,16 @@ subjects: name: 'lifecycle-operator' namespace: 'helmtests' --- -# Source: keptn-lifecycle-operator/templates/lifecycle-operator-rbac.yaml +# Source: keptn/charts/lifecycleOperator/templates/lifecycle-operator-rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: lifecycle-operator-rolebinding namespace: "helmtests" labels: - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm roleRef: @@ -6051,7 +7621,49 @@ subjects: name: 'lifecycle-operator' namespace: 'helmtests' --- -# Source: keptn-lifecycle-operator/templates/lifecycle-operator-metrics-service.yaml +# Source: keptn/charts/metricsOperator/templates/metrics-operator-leader-election-rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: metrics-operator-leader-election-rolebinding + namespace: "helmtests" + labels: + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: 'metrics-operator-leader-election-role' +subjects: +- kind: ServiceAccount + name: 'metrics-operator' + namespace: 'helmtests' +--- +# Source: keptn/charts/metricsOperator/templates/metrics-operator-rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: metrics-operator-rolebinding + namespace: "helmtests" + labels: + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: 'metrics-operator-role' +subjects: + - kind: ServiceAccount + name: 'metrics-operator' + namespace: 'helmtests' +--- +# Source: keptn/charts/lifecycleOperator/templates/lifecycle-operator-metrics-service.yaml apiVersion: v1 kind: Service metadata: @@ -6059,47 +7671,187 @@ metadata: namespace: "helmtests" labels: control-plane: lifecycle-operator - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm spec: type: ClusterIP selector: control-plane: lifecycle-operator - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test ports: - name: metrics port: 2222 protocol: TCP targetPort: metrics --- -# Source: keptn-lifecycle-operator/templates/lifecycle-webhook-service.yaml +# Source: keptn/charts/lifecycleOperator/templates/lifecycle-webhook-service.yaml apiVersion: v1 kind: Service metadata: name: lifecycle-webhook-service namespace: "helmtests" labels: - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm spec: type: ClusterIP selector: control-plane: lifecycle-operator - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test + ports: + - port: 443 + protocol: TCP + targetPort: 9443 +--- +# Source: keptn/charts/metricsOperator/templates/metrics-operator-service.yaml +apiVersion: v1 +kind: Service +metadata: + name: metrics-operator-service + namespace: "helmtests" + labels: + control-plane: metrics-operator + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + control-plane: metrics-operator + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + ports: + - name: https + port: 8443 + protocol: TCP + targetPort: https + - name: custom-metrics + port: 443 + targetPort: custom-metrics + - name: metrics + port: 9999 + protocol: TCP + targetPort: metrics +--- +# Source: keptn/charts/metricsOperator/templates/metrics-webhook-service.yaml +apiVersion: v1 +kind: Service +metadata: + name: metrics-webhook-service + namespace: "helmtests" + labels: + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + selector: + control-plane: metrics-operator + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test ports: - port: 443 protocol: TCP targetPort: 9443 --- -# Source: keptn-lifecycle-operator/templates/deployment.yaml +# Source: keptn/charts/certManager/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: certificate-operator + namespace: "helmtests" + labels: + app.kubernetes.io/component: keptn-cert-manager + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + control-plane: certificate-operator + helm.sh/chart: cert-manager-0.1.0 + app.kubernetes.io/name: cert-manager + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v1.1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + control-plane: certificate-operator + app.kubernetes.io/name: cert-manager + app.kubernetes.io/instance: keptn-test + template: + metadata: + labels: + control-plane: certificate-operator + app.kubernetes.io/name: cert-manager + app.kubernetes.io/instance: keptn-test + annotations: + kubectl.kubernetes.io/default-container: certificate-operator + spec: + containers: + - args: + - --leader-elect + command: + - /manager + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: LABEL_SELECTOR_KEY + value: "keptn.sh/inject-cert" + - name: LABEL_SELECTOR_VALUE + value: "true" + - name: KUBERNETES_CLUSTER_DOMAIN + value: cluster.local + image: ghcr.io/keptn/certificate-operator:v1.1.0 + imagePullPolicy: Always + name: certificate-operator + resources: + limits: + cpu: 25m + memory: 64Mi + requests: + cpu: 5m + memory: 16Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsGroup: 65532 + runAsUser: 65532 + seccompProfile: + type: RuntimeDefault + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + imagePullSecrets: [] + securityContext: + runAsNonRoot: true + serviceAccountName: certificate-operator + terminationGracePeriodSeconds: 10 +--- +# Source: keptn/charts/lifecycleOperator/templates/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: @@ -6109,9 +7861,9 @@ metadata: app.kubernetes.io/part-of: keptn-lifecycle-toolkit control-plane: lifecycle-operator keptn.sh/inject-cert: "true" - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm spec: @@ -6119,14 +7871,14 @@ spec: selector: matchLabels: control-plane: lifecycle-operator - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test template: metadata: labels: control-plane: lifecycle-operator - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test annotations: kubectl.kubernetes.io/default-container: lifecycle-operator metrics.dynatrace.com/port: "2222" @@ -6230,7 +7982,7 @@ spec: - emptyDir: {} name: adapter-certs-dir --- -# Source: keptn-lifecycle-operator/templates/deployment.yaml +# Source: keptn/charts/lifecycleOperator/templates/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: @@ -6238,9 +7990,9 @@ metadata: namespace: "helmtests" labels: component: scheduler - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm spec: @@ -6248,14 +8000,14 @@ spec: selector: matchLabels: component: scheduler - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test template: metadata: labels: component: scheduler - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test spec: containers: - command: @@ -6309,7 +8061,169 @@ spec: name: scheduler-config name: scheduler-config --- -# Source: keptn-lifecycle-operator/templates/lifecycle-mutating-webhook-configuration.yaml +# Source: keptn/charts/metricsOperator/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: metrics-operator + namespace: "helmtests" + labels: + app.kubernetes.io/part-of: keptn-lifecycle-toolkit + app.kubernetes.io/component: metrics-operator + control-plane: metrics-operator + keptn.sh/inject-cert: "true" + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + control-plane: metrics-operator + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + template: + metadata: + labels: + control-plane: metrics-operator + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + annotations: + kubectl.kubernetes.io/default-container: metrics-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: EXPOSE_KEPTN_METRICS + value: "true" + - name: ENABLE_ANALYSIS + value: "false" + - name: METRICS_CONTROLLER_LOG_LEVEL + value: "0" + - name: ANALYSIS_CONTROLLER_LOG_LEVEL + value: "0" + - name: KUBERNETES_CLUSTER_DOMAIN + value: cluster.local + image: ghcr.io/keptn/metrics-operator:v0.8.2 + name: metrics-operator + ports: + - containerPort: 9443 + name: webhook-server + protocol: TCP + - containerPort: 9999 + name: metrics + protocol: TCP + - containerPort: 6443 + name: custom-metrics + protocol: TCP + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 10m + 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 + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + imagePullSecrets: [] + securityContext: + runAsNonRoot: true + serviceAccountName: metrics-operator + terminationGracePeriodSeconds: 10 + volumes: + - emptyDir: {} + name: certs-dir + - emptyDir: {} + name: adapter-certs-dir +--- +# Source: keptn/charts/metricsOperator/templates/v1beta1.custom.metrics.k8s.io.yaml +apiVersion: apiregistration.k8s.io/v1 +kind: APIService +metadata: + name: v1beta1.custom.metrics.k8s.io + namespace: "helmtests" + labels: + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +spec: + group: custom.metrics.k8s.io + groupPriorityMinimum: 100 + insecureSkipTLSVerify: true + service: + name: 'metrics-operator-service' + namespace: 'helmtests' + version: v1beta1 + versionPriority: 100 +--- +# Source: keptn/charts/metricsOperator/templates/v1beta2.custom.metrics.k8s.io.yaml +apiVersion: apiregistration.k8s.io/v1 +kind: APIService +metadata: + name: v1beta2.custom.metrics.k8s.io + namespace: "helmtests" + labels: + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +spec: + group: custom.metrics.k8s.io + groupPriorityMinimum: 100 + insecureSkipTLSVerify: true + service: + name: 'metrics-operator-service' + namespace: 'helmtests' + version: v1beta2 + versionPriority: 200 +--- +# Source: keptn/charts/lifecycleOperator/templates/lifecycle-mutating-webhook-configuration.yaml apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: @@ -6319,9 +8233,9 @@ metadata: labels: keptn.sh/inject-cert: "true" app.kubernetes.io/part-of: "keptn-lifecycle-toolkit" - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm webhooks: @@ -6366,7 +8280,7 @@ webhooks: - pods sideEffects: None --- -# Source: keptn-lifecycle-operator/templates/lifecycle-validating-webhook-configuration.yaml +# Source: keptn/charts/lifecycleOperator/templates/lifecycle-validating-webhook-configuration.yaml apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: @@ -6375,9 +8289,9 @@ metadata: cert-manager.io/inject-ca-from: 'helmtests/klt-certs' labels: keptn.sh/inject-cert: "true" - helm.sh/chart: keptn-lifecycle-operator-0.2.6 - app.kubernetes.io/name: keptn-lifecycle-operator - app.kubernetes.io/instance: release-name + helm.sh/chart: lifecycle-operator-0.1.0 + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/instance: keptn-test app.kubernetes.io/version: "v0.8.2" app.kubernetes.io/managed-by: Helm webhooks: @@ -6401,3 +8315,79 @@ webhooks: resources: - keptntaskdefinitions sideEffects: None +--- +# Source: keptn/charts/metricsOperator/templates/metrics-validating-webhook-configuration.yaml +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + name: metrics-validating-webhook-configuration + annotations: + cert-manager.io/inject-ca-from: 'helmtests/klt-certs' + labels: + keptn.sh/inject-cert: "true" + helm.sh/chart: metrics-operator-0.1.0 + app.kubernetes.io/name: metrics-operator + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/version: "v0.8.2" + app.kubernetes.io/managed-by: Helm +webhooks: +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: 'metrics-webhook-service' + namespace: 'helmtests' + 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 +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: 'metrics-webhook-service' + namespace: 'helmtests' + path: /validate-metrics-keptn-sh-v1alpha3-analysis + failurePolicy: Fail + name: vanalysis.kb.io + rules: + - apiGroups: + - metrics.keptn.sh + apiVersions: + - v1alpha3 + operations: + - CREATE + - UPDATE + resources: + - analyses + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: 'metrics-webhook-service' + namespace: 'helmtests' + path: /validate-metrics-keptn-sh-v1alpha3-analysisdefinition + failurePolicy: Fail + name: vanalysisdefinition.kb.io + rules: + - apiGroups: + - metrics.keptn.sh + apiVersions: + - v1alpha3 + operations: + - CREATE + - UPDATE + resources: + - analysisdefinitions + sideEffects: None diff --git a/.github/scripts/.helm-tests/default/values.yaml b/.github/scripts/.helm-tests/default/values.yaml index 03dbd6f61f..237c8278fb 100644 --- a/.github/scripts/.helm-tests/default/values.yaml +++ b/.github/scripts/.helm-tests/default/values.yaml @@ -1,130 +1,6 @@ -imagePullSecrets: [] -kubernetesClusterDomain: cluster.local -lifecycleOperatorConfig: - controllerManagerConfigYaml: - health: - healthProbeBindAddress: :8081 - leaderElection: - leaderElect: true - resourceName: 6b866dd9.keptn.sh - metrics: - bindAddress: 127.0.0.1:8080 - webhook: - port: 9443 +certManager: + enabled: true lifecycleOperator: - manager: - containerSecurityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - privileged: false - runAsGroup: 65532 - runAsNonRoot: true - runAsUser: 65532 - seccompProfile: - type: RuntimeDefault - env: - functionRunnerImage: ghcr.io/keptn/deno-runtime:v1.0.1 - keptnAppControllerLogLevel: "0" - keptnAppCreationRequestControllerLogLevel: "0" - keptnAppVersionControllerLogLevel: "0" - keptnEvaluationControllerLogLevel: "0" - keptnTaskControllerLogLevel: "0" - keptnTaskDefinitionControllerLogLevel: "0" - keptnWorkloadControllerLogLevel: "0" - keptnWorkloadInstanceControllerLogLevel: "0" - optionsControllerLogLevel: "0" - otelCollectorUrl: otel-collector:4317 - pythonRunnerImage: ghcr.io/keptn/python-runtime:v1.0.0 - image: - repository: ghcr.io/keptn/lifecycle-operator - tag: v0.8.2 - imagePullPolicy: Always - livenessProbe: - httpGet: - path: /healthz - port: 8081 - initialDelaySeconds: 15 - periodSeconds: 20 - readinessProbe: - httpGet: - path: /readyz - port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - nodeSelector: {} - replicas: 1 - tolerations: [] - topologySpreadConstraints: [] -lifecycleOperatorMetricsService: - ports: - - name: metrics - port: 2222 - protocol: TCP - targetPort: metrics - type: ClusterIP -lifecycleWebhookService: - ports: - - port: 443 - protocol: TCP - targetPort: 9443 - type: ClusterIP -scheduler: - nodeSelector: {} - replicas: 1 - scheduler: - containerSecurityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - privileged: false - readOnlyRootFilesystem: true - runAsNonRoot: true - runAsUser: 65532 - seccompProfile: - type: RuntimeDefault - env: - otelCollectorUrl: otel-collector:4317 - image: - repository: ghcr.io/keptn/scheduler - tag: v0.8.2 - imagePullPolicy: Always - livenessProbe: - httpGet: - path: /healthz - port: 10259 - scheme: HTTPS - initialDelaySeconds: 15 - readinessProbe: - httpGet: - path: /healthz - port: 10259 - scheme: HTTPS - resources: - limits: - cpu: 300m - memory: 100Mi - requests: - cpu: 100m - memory: 20Mi - tolerations: [] - topologySpreadConstraints: [] -schedulerConfig: - schedulerConfigYaml: - leaderElection: - leaderElect: false - profiles: - - plugins: - permit: - enabled: - - name: KLCPermit - schedulerName: keptn-scheduler + enabled: true +metricsOperator: + enabled: true diff --git a/.github/scripts/generate-helm-docs.sh b/.github/scripts/generate-helm-docs.sh index 0ec739f398..06e93957dc 100755 --- a/.github/scripts/generate-helm-docs.sh +++ b/.github/scripts/generate-helm-docs.sh @@ -24,6 +24,9 @@ else echo "Readme Generator is already installed, continuing..." fi +echo "Generating Keptn readme now..." +readme-generator --values=./chart/values.yaml --readme=./chart/README.md + echo "Generating lifecycle operator readme now..." cat ./lifecycle-operator/chart/values.yaml ./lifecycle-operator/chart/doc.yaml > ./lifecycle-operator/chart/rendered.yaml readme-generator --values=./lifecycle-operator/chart/rendered.yaml --readme=./lifecycle-operator/chart/README.md diff --git a/.github/scripts/helm-test.sh b/.github/scripts/helm-test.sh index ff9d719867..7cd686c72d 100755 --- a/.github/scripts/helm-test.sh +++ b/.github/scripts/helm-test.sh @@ -12,11 +12,14 @@ echo "running Helm tests" successful=0 failures="" + cd ./chart + helm dependency build + cd .. + for test in $tests do echo "Testing $test" - ## TODO: test also other helm charts (metrics-operator, certificate-operator) - helm template --namespace helmtests -f $test/values.yaml ./lifecycle-operator/chart > $test/helm_tests_output.yaml + helm template keptn-test --namespace helmtests -f $test/values.yaml ./chart > $test/helm_tests_output.yaml if [ $? -ne 0 ] then echo "Error: helm template failed for test in $test" diff --git a/chart/.gitignore b/chart/.gitignore new file mode 100644 index 0000000000..948259a7b6 --- /dev/null +++ b/chart/.gitignore @@ -0,0 +1 @@ +charts/*.tgz diff --git a/chart/.helmignore b/chart/.helmignore new file mode 100644 index 0000000000..0e8a0eb36f --- /dev/null +++ b/chart/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/chart/Chart.lock b/chart/Chart.lock new file mode 100644 index 0000000000..1c41ffe3de --- /dev/null +++ b/chart/Chart.lock @@ -0,0 +1,12 @@ +dependencies: +- name: keptn-cert-manager + repository: file://../klt-cert-manager/chart + version: 0.1.0 +- name: keptn-lifecycle-operator + repository: file://../lifecycle-operator/chart + version: 0.1.0 +- name: keptn-metrics-operator + repository: file://../metrics-operator/chart + version: 0.1.0 +digest: sha256:2cefa8b80f1065789f8e16bdc0d781053885025d3dcfab28c5ae99d3821ae66a +generated: "2023-10-04T13:22:46.806236+02:00" diff --git a/chart/Chart.yaml b/chart/Chart.yaml new file mode 100644 index 0000000000..3404ab2923 --- /dev/null +++ b/chart/Chart.yaml @@ -0,0 +1,71 @@ +apiVersion: v2 +name: keptn +description: A Helm chart for Keptn Lifecycle Toolkit, a set of tools to enable cloud-native application lifecycle management +icon: "https://raw.githubusercontent.com/cncf/artwork/master/projects/keptn/icon/color/keptn-icon-color.svg" +home: https://keptn.sh +sources: + - "https://github.com/keptn/lifecycle-toolkit" +keywords: + - cloud-native + - lifecycle + - lifecycle-management + - application-lifecycle + - application-lifecycle-management + - orchestration + - keptn + - operator + - pre-deployment + - post-deployment + - metrics + - analysis + - evaluation + - certificate +annotations: + artifacthub.io/links: | + - name: support + url: https://github.com/keptn/lifecycle-toolkit/issues/new + - name: community + url: https://slack.keptn.sh/ + artifacthub.io/license: "Apache-2.0" + artifacthub.io/operator: "true" + artifacthub.io/operatorCapabilities: "Full Lifecycle" + +kubeVersion: ">= 1.24.0-0" +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.2.7 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "v0.8.2" # x-release-please-version + +dependencies: + - name: keptn-cert-manager + version: 0.1.0 + alias: certManager + condition: certManager.enabled + repository: "file://../klt-cert-manager/chart" + - name: keptn-lifecycle-operator + version: 0.1.0 + alias: lifecycleOperator + condition: lifecycleOperator.enabled + repository: "file://../lifecycle-operator/chart" + - name: keptn-metrics-operator + version: 0.1.0 + alias: metricsOperator + condition: metricsOperator.enabled + repository: "file://../metrics-operator/chart" +# TODO: change repository links to released ones once the charts get their first release diff --git a/chart/README.md b/chart/README.md new file mode 100644 index 0000000000..6d3b4edc24 --- /dev/null +++ b/chart/README.md @@ -0,0 +1,16 @@ +# Keptn Helm Chart + +Keptn provides a “cloud-native” approach for managing the application release lifecycle +metrics, observability, health checks, with pre- and post-deployment evaluations and tasks. + + + +## Parameters + +### Keptn + +| Name | Description | Value | +| --------------------------- | ------------------------------------------------------ | ------ | +| `certManager.enabled` | Enable this value to install Keptn Certificate Manager | `true` | +| `lifecycleOperator.enabled` | Enable this value to install Keptn Lifecycle Operator | `true` | +| `metricsOperator.enabled` | Enable this value to install Keptn Metrics Operator | `true` | diff --git a/chart/charts/.gitkeep b/chart/charts/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl new file mode 100644 index 0000000000..0432fd349b --- /dev/null +++ b/chart/templates/_helpers.tpl @@ -0,0 +1,75 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "keptn.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "keptn.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "keptn.chart" -}} +{{- printf "%s-%s" (kebabcase .Chart.Name) .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "keptn.labels" -}} +helm.sh/chart: {{ include "keptn.chart" . }} +{{ include "keptn.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "keptn.selectorLabels" -}} +app.kubernetes.io/name: {{ kebabcase (include "keptn.name" .) }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "keptn.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "keptn.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +Renders a value that contains template. +Usage: +{{ include "tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }} +*/}} +{{- define "tplvalues.render" -}} + {{- if typeIs "string" .value }} + {{- tpl .value .context }} + {{- else }} + {{- tpl (.value | toYaml) .context }} + {{- end }} +{{- end -}} diff --git a/chart/values.yaml b/chart/values.yaml new file mode 100644 index 0000000000..cd45ebfb1c --- /dev/null +++ b/chart/values.yaml @@ -0,0 +1,10 @@ +## @section Keptn +certManager: + ## @param certManager.enabled Enable this value to install Keptn Certificate Manager + enabled: true +lifecycleOperator: + ## @param lifecycleOperator.enabled Enable this value to install Keptn Lifecycle Operator + enabled: true +metricsOperator: + ## @param metricsOperator.enabled Enable this value to install Keptn Metrics Operator + enabled: true diff --git a/docs/content/en/docs/architecture/components/scheduler/_index.md b/docs/content/en/docs/architecture/components/scheduler/_index.md index 73a36ac887..6d696704a7 100644 --- a/docs/content/en/docs/architecture/components/scheduler/_index.md +++ b/docs/content/en/docs/architecture/components/scheduler/_index.md @@ -15,7 +15,7 @@ and orchestrate the deployment process. If the Keptn helm chart value `schedulingGatesEnabled` is set to `true`, and Keptn is running on a Kubernetes version greater than 1.26, Keptn does not install a scheduler plugin. Instead, it uses -the [Pod Scheduling Readiness K8s API](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-scheduling-readiness) +the [Pod Scheduling Readiness K8s API](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-scheduling-readiness) to gate Pods until the required deployment checks pass. ## Keptn Scheduling Gates for K8s 1.27 and above diff --git a/docs/content/en/docs/install/install.md b/docs/content/en/docs/install/install.md index 366c75a3f3..7b343e9f4a 100644 --- a/docs/content/en/docs/install/install.md +++ b/docs/content/en/docs/install/install.md @@ -75,7 +75,7 @@ rather than the full Toolkit or if you need to change the size of the installation. To modify configuration options, download a copy of the -[helm/chart/values.yaml](https://github.com/keptn/lifecycle-toolkit/blob/main/helm/chart/values.yaml) +[chart/values.yaml](https://github.com/keptn/lifecycle-toolkit/blob/main/chart/values.yaml) file, modify some values, and use the modified file to install Keptn: 1. Download the `values.yaml` file: @@ -104,7 +104,7 @@ For more information,see * The [Helm Get Values](https://helm.sh/docs/helm/helm_get_values/)) document -* The [helm-charts](https://github.com/keptn/lifecycle-toolkit/blob/main/helm/chart/README.md) page +* The [helm-charts](https://github.com/keptn/lifecycle-toolkit/blob/main/chart/README.md) page contains the full list of available values. ## Use manifests diff --git a/klt-cert-manager/chart/templates/_helpers.tpl b/klt-cert-manager/chart/templates/_helpers.tpl index b93ee65b60..f095329ba0 100644 --- a/klt-cert-manager/chart/templates/_helpers.tpl +++ b/klt-cert-manager/chart/templates/_helpers.tpl @@ -1,7 +1,7 @@ {{/* Expand the name of the chart. */}} -{{- define "cert-manager.name" -}} +{{- define "chart.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} @@ -10,7 +10,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "cert-manager.fullname" -}} +{{- define "chart.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "cert-manager.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- define "chart.chart" -}} +{{- printf "%s-%s" (kebabcase .Chart.Name) .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Common labels */}} -{{- define "cert-manager.labels" -}} -helm.sh/chart: {{ include "cert-manager.chart" . }} -{{ include "cert-manager.selectorLabels" . }} +{{- define "chart.labels" -}} +helm.sh/chart: {{ include "chart.chart" . }} +{{ include "chart.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "cert-manager.selectorLabels" -}} -app.kubernetes.io/name: {{ include "cert-manager.name" . }} +{{- define "chart.selectorLabels" -}} +app.kubernetes.io/name: {{ kebabcase (include "chart.name" .) }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{/* Create the name of the service account to use */}} -{{- define "cert-manager.serviceAccountName" -}} +{{- define "chart.serviceAccountName" -}} {{- if .Values.serviceAccount.create }} -{{- default (include "cert-manager.fullname" .) .Values.serviceAccount.name }} +{{- default (include "chart.fullname" .) .Values.serviceAccount.name }} {{- else }} {{- default "default" .Values.serviceAccount.name }} {{- end }} diff --git a/klt-cert-manager/chart/templates/certificate-operator-leader-election-rbac.yaml b/klt-cert-manager/chart/templates/certificate-operator-leader-election-rbac.yaml index 7853f796d5..a66fa6a4be 100644 --- a/klt-cert-manager/chart/templates/certificate-operator-leader-election-rbac.yaml +++ b/klt-cert-manager/chart/templates/certificate-operator-leader-election-rbac.yaml @@ -7,7 +7,7 @@ metadata: app.kubernetes.io/component: rbac app.kubernetes.io/created-by: certificate-operator app.kubernetes.io/part-of: keptn-lifecycle-toolkit - {{- include "cert-manager.labels" . | nindent 4 }} + {{- include "chart.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role diff --git a/klt-cert-manager/chart/templates/certificate-operator-rbac.yaml b/klt-cert-manager/chart/templates/certificate-operator-rbac.yaml index 15bf13bf14..d23ca3445b 100644 --- a/klt-cert-manager/chart/templates/certificate-operator-rbac.yaml +++ b/klt-cert-manager/chart/templates/certificate-operator-rbac.yaml @@ -4,7 +4,7 @@ metadata: name: certificate-operator-role namespace: {{ .Release.Namespace | quote }} labels: - {{- include "cert-manager.labels" . | nindent 4 }} + {{- include "chart.labels" . | nindent 4 }} rules: - apiGroups: - "" @@ -31,7 +31,7 @@ metadata: name: certificate-operator-role namespace: {{ .Release.Namespace | quote }} labels: - {{- include "cert-manager.labels" . | nindent 4 }} + {{- include "chart.labels" . | nindent 4 }} rules: - apiGroups: - admissionregistration.k8s.io @@ -81,7 +81,7 @@ metadata: app.kubernetes.io/component: rbac app.kubernetes.io/created-by: certificate-operator app.kubernetes.io/part-of: keptn-lifecycle-toolkit - {{- include "cert-manager.labels" . | nindent 4 }} + {{- include "chart.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole diff --git a/klt-cert-manager/chart/templates/certificate-operator-role-binding-rbac.yaml b/klt-cert-manager/chart/templates/certificate-operator-role-binding-rbac.yaml index fd9d6cb32f..2c055bccca 100644 --- a/klt-cert-manager/chart/templates/certificate-operator-role-binding-rbac.yaml +++ b/klt-cert-manager/chart/templates/certificate-operator-role-binding-rbac.yaml @@ -7,7 +7,7 @@ metadata: app.kubernetes.io/component: rbac app.kubernetes.io/created-by: certificate-operator app.kubernetes.io/part-of: keptn-lifecycle-toolkit - {{- include "cert-manager.labels" . | nindent 4 }} + {{- include "chart.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role diff --git a/klt-cert-manager/chart/templates/deployment.yaml b/klt-cert-manager/chart/templates/deployment.yaml index 693f12f9f6..14111e1fb3 100644 --- a/klt-cert-manager/chart/templates/deployment.yaml +++ b/klt-cert-manager/chart/templates/deployment.yaml @@ -8,18 +8,18 @@ metadata: app.kubernetes.io/component: keptn-cert-manager app.kubernetes.io/part-of: keptn-lifecycle-toolkit control-plane: certificate-operator - {{- include "cert-manager.labels" . | nindent 4 }} + {{- include "chart.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicas }} selector: matchLabels: control-plane: certificate-operator - {{- include "cert-manager.selectorLabels" . | nindent 6 }} + {{- include "chart.selectorLabels" . | nindent 6 }} template: metadata: labels: control-plane: certificate-operator - {{- include "cert-manager.selectorLabels" . | nindent 8 }} + {{- include "chart.selectorLabels" . | nindent 8 }} annotations: kubectl.kubernetes.io/default-container: certificate-operator spec: @@ -43,13 +43,12 @@ spec: | default .Chart.AppVersion }} imagePullPolicy: {{ .Values.imagePullPolicy }} name: certificate-operator - resources: {{- toYaml .Values.resources | nindent 10 - }} + resources: {{- toYaml .Values.resources | nindent 12 }} securityContext: allowPrivilegeEscalation: {{ .Values.containerSecurityContext.allowPrivilegeEscalation }} capabilities: {{- include "tplvalues.render" (dict "value" .Values.containerSecurityContext.capabilities - "context" $) | nindent 12 }} + "context" $) | nindent 14 }} readOnlyRootFilesystem: {{ .Values.containerSecurityContext.readOnlyRootFilesystem }} runAsGroup: {{ .Values.containerSecurityContext.runAsGroup @@ -57,9 +56,9 @@ spec: runAsUser: {{ .Values.containerSecurityContext.runAsUser }} seccompProfile: {{- include "tplvalues.render" (dict "value" .Values.containerSecurityContext.seccompProfile - "context" $) | nindent 12 }} + "context" $) | nindent 14 }} {{- if .Values.livenessProbe }} - livenessProbe: {{- include "tplvalues.render" (dict "value" .Values.livenessProbe "context" $) | nindent 10 }} + livenessProbe: {{- include "tplvalues.render" (dict "value" .Values.livenessProbe "context" $) | nindent 12 }} {{- else }} livenessProbe: httpGet: @@ -69,7 +68,7 @@ spec: periodSeconds: 20 {{- end }} {{- if .Values.readinessProbe }} - readinessProbe: {{- include "tplvalues.render" (dict "value" .Values.readinessProbe "context" $) | nindent 10 }} + readinessProbe: {{- include "tplvalues.render" (dict "value" .Values.readinessProbe "context" $) | nindent 12 }} {{- else }} readinessProbe: httpGet: diff --git a/klt-cert-manager/chart/templates/service-account.yaml b/klt-cert-manager/chart/templates/service-account.yaml index b59f0a672a..2f7bcc6205 100644 --- a/klt-cert-manager/chart/templates/service-account.yaml +++ b/klt-cert-manager/chart/templates/service-account.yaml @@ -4,8 +4,6 @@ metadata: name: 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 "cert-manager.labels" . | nindent 4 }} + {{- include "chart.labels" . | nindent 4 }} diff --git a/lifecycle-operator/chart/Chart.yaml b/lifecycle-operator/chart/Chart.yaml index 30a87afe19..89bdcae120 100644 --- a/lifecycle-operator/chart/Chart.yaml +++ b/lifecycle-operator/chart/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: keptn-lifecycle-operator -description: A Helm chart for Keptn Lifecycle Toolkit, a set of tools to enable cloud-native application lifecycle management +description: A Helm chart for Keptn Lifecycle Operator, a subproject of Keptn icon: "https://raw.githubusercontent.com/cncf/artwork/master/projects/keptn/icon/color/keptn-icon-color.svg" home: https://keptn.sh sources: @@ -40,7 +40,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.6 +version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/lifecycle-operator/chart/templates/_helpers.tpl b/lifecycle-operator/chart/templates/_helpers.tpl index be11c00d99..0c4080e9ca 100644 --- a/lifecycle-operator/chart/templates/_helpers.tpl +++ b/lifecycle-operator/chart/templates/_helpers.tpl @@ -27,7 +27,7 @@ If release name contains chart name it will be used as a full name. Create chart name and version as used by the chart label. */}} {{- define "chart.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- printf "%s-%s" (kebabcase .Chart.Name) .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* @@ -46,7 +46,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} Selector labels */}} {{- define "chart.selectorLabels" -}} -app.kubernetes.io/name: {{ include "chart.name" . }} +app.kubernetes.io/name: {{ kebabcase (include "chart.name" .) }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} diff --git a/lifecycle-operator/chart/templates/deployment.yaml b/lifecycle-operator/chart/templates/deployment.yaml index 72895b44be..69659e2f93 100644 --- a/lifecycle-operator/chart/templates/deployment.yaml +++ b/lifecycle-operator/chart/templates/deployment.yaml @@ -157,14 +157,14 @@ spec: name: certs-dir - emptyDir: {} name: adapter-certs-dir -{{- if .Values.topologySpreadConstraints }} - topologySpreadConstraints: {{- include "tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" $) | nindent 8 }} +{{- if .Values.lifecycleOperator.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "tplvalues.render" (dict "value" .Values.lifecycleOperator.topologySpreadConstraints "context" $) | nindent 8 }} {{- end }} -{{- if .Values.nodeSelector }} - nodeSelector: {{- include "tplvalues.render" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }} +{{- if .Values.lifecycleOperator.nodeSelector }} + nodeSelector: {{- include "tplvalues.render" ( dict "value" .Values.lifecycleOperator.nodeSelector "context" $) | nindent 8 }} {{- end }} -{{- if .Values.tolerations }} - tolerations: {{- include "tplvalues.render" (dict "value" .Values.tolerations "context" .) | nindent 8 }} +{{- if .Values.lifecycleOperator.tolerations }} + tolerations: {{- include "tplvalues.render" (dict "value" .Values.lifecycleOperator.tolerations "context" .) | nindent 8 }} {{- end }} {{- if or (le .Capabilities.KubeVersion.Minor "26") (not .Values.schedulingGatesEnabled) }} @@ -246,13 +246,13 @@ spec: - configMap: name: scheduler-config name: scheduler-config -{{- if .Values.topologySpreadConstraints }} - topologySpreadConstraints: {{- include "tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" $) | nindent 8 }} +{{- if .Values.scheduler.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "tplvalues.render" (dict "value" .Values.scheduler.topologySpreadConstraints "context" $) | nindent 8 }} {{- end }} -{{- if .Values.nodeSelector }} - nodeSelector: {{- include "tplvalues.render" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }} +{{- if .Values.scheduler.nodeSelector }} + nodeSelector: {{- include "tplvalues.render" ( dict "value" .Values.scheduler.nodeSelector "context" $) | nindent 8 }} {{- end }} -{{- if .Values.tolerations }} - tolerations: {{- include "tplvalues.render" (dict "value" .Values.tolerations "context" .) | nindent 8 }} +{{- if .Values.scheduler.tolerations }} + tolerations: {{- include "tplvalues.render" (dict "value" .Values.scheduler.tolerations "context" .) | nindent 8 }} {{- end }} {{- end }} diff --git a/metrics-operator/chart/Chart.yaml b/metrics-operator/chart/Chart.yaml index 4fa4238bcf..30ef723381 100644 --- a/metrics-operator/chart/Chart.yaml +++ b/metrics-operator/chart/Chart.yaml @@ -34,7 +34,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.6 +version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/metrics-operator/chart/templates/_helpers.tpl b/metrics-operator/chart/templates/_helpers.tpl index be11c00d99..f095329ba0 100644 --- a/metrics-operator/chart/templates/_helpers.tpl +++ b/metrics-operator/chart/templates/_helpers.tpl @@ -27,7 +27,7 @@ If release name contains chart name it will be used as a full name. Create chart name and version as used by the chart label. */}} {{- define "chart.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- printf "%s-%s" (kebabcase .Chart.Name) .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* @@ -46,7 +46,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} Selector labels */}} {{- define "chart.selectorLabels" -}} -app.kubernetes.io/name: {{ include "chart.name" . }} +app.kubernetes.io/name: {{ kebabcase (include "chart.name" .) }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} @@ -73,4 +73,3 @@ Usage: {{- tpl (.value | toYaml) .context }} {{- end }} {{- end -}} - diff --git a/metrics-operator/chart/templates/deployment.yaml b/metrics-operator/chart/templates/deployment.yaml index 183d5a382e..be4c09ecc4 100644 --- a/metrics-operator/chart/templates/deployment.yaml +++ b/metrics-operator/chart/templates/deployment.yaml @@ -10,7 +10,7 @@ metadata: keptn.sh/inject-cert: "true" {{- include "chart.labels" . | nindent 4 }} spec: - replicas: {{ .Values.config.replicas }} + replicas: {{ .Values.replicas }} selector: matchLabels: control-plane: metrics-operator