Skip to content

Commit

Permalink
fix: helm charts image registry, image pull policy and install action (
Browse files Browse the repository at this point in the history
…#2361)

Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com>
Co-authored-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
  • Loading branch information
RealAnna and mowies committed Oct 30, 2023
1 parent 59c494b commit 76ed884
Show file tree
Hide file tree
Showing 17 changed files with 109 additions and 79 deletions.
26 changes: 7 additions & 19 deletions .github/actions/deploy-klt-on-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,36 +82,24 @@ runs:
cd - # Return to the previous directory
done
cd ./chart
cd .github/actions/deploy-klt-on-cluster
touch tmp-values.yaml
if [ "${{ inputs.allowed-namespaces }}" == "allowed_ns_on" ]; then
echo "lifecycleOperator:" >> tmp-values.yaml
echo " allowedNamespaces: [allowed-ns-test]" >> tmp-values.yaml
echo " allowedNamespaces: [allowed-ns-test]" >> values.yaml
fi
if [ "${{ inputs.scheduling-gates }}" == "gates_on" ]; then
if [ "${{ inputs.allowed-namespaces }}" == "allowed_ns_off" ]; then
echo "lifecycleOperator:" >> tmp-values.yaml
fi
echo " schedulingGatesEnabled: true" >> tmp-values.yaml
echo " schedulingGatesEnabled: true" >> values.yaml
fi
echo "installing with values.yaml file:"
cat values.yaml
helm install -n keptn-lifecycle-toolkit-system --create-namespace keptn ./ \
--values tmp-values.yaml \
--set lifecycleOperator.scheduler.imagePullPolicy=Never \
helm install -n keptn-lifecycle-toolkit-system --create-namespace keptn ../../../chart \
--values ./values.yaml \
--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
16 changes: 16 additions & 0 deletions .github/actions/deploy-klt-on-cluster/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
global:
imageRegistry: "localhost:5000"

certManager:
imagePullPolicy: Never

metricsOperator:
imagePullPolicy: Never
env:
enableKeptnAnalysis: "true"

lifecycleOperator:
lifecycleOperator:
imagePullPolicy: Never
scheduler:
imagePullPolicy: Never
2 changes: 1 addition & 1 deletion .github/scripts/.helm-tests/certificates-only/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ spec:
value: "true"
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: testreg/ghcr.io/keptn/certificate-operator:v1.2.0
image: testreg/keptn/certificate-operator:v1.2.0
imagePullPolicy: Always
name: certificate-operator
resources:
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/.helm-tests/default/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8473,6 +8473,7 @@ spec:
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: ghcr.io/keptn/metrics-operator:v0.8.2
imagePullPolicy: Always
name: metrics-operator
ports:
- containerPort: 9443
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/.helm-tests/lifecycle-only/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6617,7 +6617,7 @@ spec:
value: "otel-collector:4317"
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: testreg/ghcr.io/keptn/scheduler:v0.8.2
image: testreg/keptn/scheduler:v0.8.2
imagePullPolicy: Always
name: scheduler
resources:
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/.helm-tests/lifecycle-with-certs/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6782,7 +6782,7 @@ spec:
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: ghcr.io/keptn/lifecycle-operator:v0.8.2
imagePullPolicy: Always
imagePullPolicy: Never
name: lifecycle-operator
ports:
- containerPort: 9443
Expand Down Expand Up @@ -6874,7 +6874,7 @@ spec:
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: ghcr.io/keptn/scheduler:v0.8.2
imagePullPolicy: Always
imagePullPolicy: Never
name: scheduler
resources:
limits:
Expand Down
4 changes: 4 additions & 0 deletions .github/scripts/.helm-tests/lifecycle-with-certs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@ certManager:
enabled: true
lifecycleOperator:
enabled: true
lifecycleOperator:
imagePullPolicy: Never
scheduler:
imagePullPolicy: Never
metricsOperator:
enabled: false
1 change: 1 addition & 0 deletions .github/scripts/.helm-tests/metrics-only/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1556,6 +1556,7 @@ spec:
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: ghcr.io/keptn/metrics-operator:v0.8.2
imagePullPolicy: Always
name: metrics-operator
ports:
- containerPort: 9443
Expand Down
5 changes: 3 additions & 2 deletions .github/scripts/.helm-tests/metrics-with-certs/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,7 @@ spec:
value: "true"
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: ghcr.io/keptn/certificate-operator:v1.2.0
image: testreg/keptn/certificate-operator:v1.2.0
imagePullPolicy: Always
name: certificate-operator
resources:
Expand Down Expand Up @@ -1811,7 +1811,8 @@ spec:
value: "0"
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: ghcr.io/keptn/metrics-operator:v0.8.2
image: testreg/keptn/metrics-operator:v0.8.2
imagePullPolicy: Never
name: metrics-operator
ports:
- containerPort: 9443
Expand Down
4 changes: 4 additions & 0 deletions .github/scripts/.helm-tests/metrics-with-certs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ lifecycleOperator:
enabled: false
metricsOperator:
enabled: true
imagePullPolicy: Never

global:
imageRegistry: "testreg"
23 changes: 12 additions & 11 deletions klt-cert-manager/chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ resource.

### Keptn Certificate Operator controller

| Name | Description | Value |
| -------------------------- | ------------------------------------------------------------------------- | ------------------------------------ |
| `containerSecurityContext` | Sets security context for the cert manager | |
| `env.labelSelectorKey` | specify the label selector to find resources to generate certificates for | `keptn.sh/inject-cert` |
| `env.labelSelectorValue` | specify the value for the label selector | `true` |
| `image.repository` | specify repo for manager image | `ghcr.io/keptn/certificate-operator` |
| `image.tag` | select tag for manager container | `v1.2.0` |
| `imagePullPolicy` | select image pull policy for manager container | `Always` |
| `livenessProbe` | custom RBAC proxy liveness probe | |
| `readinessProbe` | custom manager readiness probe | |
| `resources` | custom limits and requests for manager container | |
| Name | Description | Value |
| -------------------------- | ------------------------------------------------------------------------- | ---------------------------- |
| `containerSecurityContext` | Sets security context for the cert manager | |
| `env.labelSelectorKey` | specify the label selector to find resources to generate certificates for | `keptn.sh/inject-cert` |
| `env.labelSelectorValue` | specify the value for the label selector | `true` |
| `image.registry` | specify the container registry for the certificate-operator image | `ghcr.io` |
| `image.repository` | specify repo for manager image | `keptn/certificate-operator` |
| `image.tag` | select tag for manager container | `v1.2.0` |
| `imagePullPolicy` | select image pull policy for manager container | `Always` |
| `livenessProbe` | custom RBAC proxy liveness probe | |
| `readinessProbe` | custom manager readiness probe | |
| `resources` | custom limits and requests for manager container | |
4 changes: 3 additions & 1 deletion klt-cert-manager/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ env:
## @param env.labelSelectorValue specify the value for the label selector
labelSelectorValue: "true"
image:
## @param image.registry specify the container registry for the certificate-operator image
registry: ghcr.io
## @param image.repository specify repo for manager image
repository: ghcr.io/keptn/certificate-operator
repository: keptn/certificate-operator
## @param image.tag select tag for manager container
tag: v1.2.0 # x-release-please-version
## @param imagePullPolicy select image pull policy for manager container
Expand Down
38 changes: 20 additions & 18 deletions lifecycle-operator/chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ and application health checks
| `lifecycleOperator.env.optionsControllerLogLevel` | sets the log level of Keptn Options Controller | `0` |
| `lifecycleOperator.env.otelCollectorUrl` | Sets the URL for the open telemetry collector | `otel-collector:4317` |
| `lifecycleOperator.env.pythonRunnerImage` | specify image for python task runtime | `ghcr.io/keptn/python-runtime:v1.0.0` |
| `lifecycleOperator.image.repository` | specify registry for manager image | `ghcr.io/keptn/lifecycle-operator` |
| `lifecycleOperator.image.registry` | specify the container registry for the lifecycle-operator image | `ghcr.io` |
| `lifecycleOperator.image.repository` | specify registry for manager image | `keptn/lifecycle-operator` |
| `lifecycleOperator.image.tag` | select tag for manager image | `v0.8.2` |
| `lifecycleOperator.imagePullPolicy` | specify pull policy for manager image | `Always` |
| `lifecycleOperator.livenessProbe` | custom livenessprobe for manager container | |
Expand All @@ -77,20 +78,21 @@ and application health checks

### Keptn Scheduler

| Name | Description | Value |
| ------------------------------------------------------------ | -------------------------------------------------------------- | ------------------------- |
| `scheduler.nodeSelector` | adds node selectors for scheduler | `{}` |
| `scheduler.replicas` | modifies replicas | `1` |
| `scheduler.containerSecurityContext` | Sets security context | |
| `scheduler.env.otelCollectorUrl` | sets url for open telemetry collector | `otel-collector:4317` |
| `scheduler.image.repository` | set image repository for scheduler | `ghcr.io/keptn/scheduler` |
| `scheduler.image.tag` | set image tag for scheduler | `v0.8.2` |
| `scheduler.imagePullPolicy` | set image pull policy for scheduler | `Always` |
| `scheduler.livenessProbe` | customizable liveness probe for the scheduler | |
| `scheduler.readinessProbe` | customizable readiness probe for the scheduler | |
| `scheduler.resources` | sets cpu and memory resurces/limits for scheduler | |
| `scheduler.topologySpreadConstraints` | add topology constraints for scheduler | `[]` |
| `schedulerConfig.profiles[0].schedulerName` | changes scheduler name | `keptn-scheduler` |
| `schedulerConfig.leaderElection.leaderElect` | enables leader election for multiple replicas of the scheduler | `false` |
| `schedulerConfig.profiles[0].plugins.permit.enabled[0].name` | enables permit plugin | `KLCPermit` |
| `scheduler.tolerations` | adds tolerations for scheduler | `[]` |
| Name | Description | Value |
| ------------------------------------------------------------ | -------------------------------------------------------------- | --------------------- |
| `scheduler.nodeSelector` | adds node selectors for scheduler | `{}` |
| `scheduler.replicas` | modifies replicas | `1` |
| `scheduler.containerSecurityContext` | Sets security context | |
| `scheduler.env.otelCollectorUrl` | sets url for open telemetry collector | `otel-collector:4317` |
| `scheduler.image.registry` | specify the container registry for the scheduler image | `ghcr.io` |
| `scheduler.image.repository` | set image repository for scheduler | `keptn/scheduler` |
| `scheduler.image.tag` | set image tag for scheduler | `v0.8.2` |
| `scheduler.imagePullPolicy` | set image pull policy for scheduler | `Always` |
| `scheduler.livenessProbe` | customizable liveness probe for the scheduler | |
| `scheduler.readinessProbe` | customizable readiness probe for the scheduler | |
| `scheduler.resources` | sets cpu and memory resurces/limits for scheduler | |
| `scheduler.topologySpreadConstraints` | add topology constraints for scheduler | `[]` |
| `schedulerConfig.profiles[0].schedulerName` | changes scheduler name | `keptn-scheduler` |
| `schedulerConfig.leaderElection.leaderElect` | enables leader election for multiple replicas of the scheduler | `false` |
| `schedulerConfig.profiles[0].plugins.permit.enabled[0].name` | enables permit plugin | `KLCPermit` |
| `scheduler.tolerations` | adds tolerations for scheduler | `[]` |
8 changes: 6 additions & 2 deletions lifecycle-operator/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ lifecycleOperator:
## @param lifecycleOperator.env.pythonRunnerImage specify image for python task runtime
pythonRunnerImage: ghcr.io/keptn/python-runtime:v1.0.0
image:
## @param lifecycleOperator.image.registry specify the container registry for the lifecycle-operator image
registry: ghcr.io
## @param lifecycleOperator.image.repository specify registry for manager image
repository: ghcr.io/keptn/lifecycle-operator
repository: keptn/lifecycle-operator
## @param lifecycleOperator.image.tag select tag for manager image
tag: v0.8.2 # x-release-please-version
## @param lifecycleOperator.imagePullPolicy specify pull policy for manager image
Expand Down Expand Up @@ -203,8 +205,10 @@ scheduler:
## @param scheduler.env.otelCollectorUrl sets url for open telemetry collector
otelCollectorUrl: otel-collector:4317
image:
## @param scheduler.image.registry specify the container registry for the scheduler image
registry: ghcr.io
## @param scheduler.image.repository set image repository for scheduler
repository: ghcr.io/keptn/scheduler
repository: keptn/scheduler
## @param scheduler.image.tag set image tag for scheduler
tag: v0.8.2 # x-release-please-version
## @param scheduler.imagePullPolicy set image pull policy for scheduler
Expand Down
Loading

0 comments on commit 76ed884

Please sign in to comment.