Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: helm charts image registry, image pull policy and install action #2361

Merged
merged 20 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions .github/actions/deploy-klt-on-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,36 +82,30 @@ 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 "lifecycleOperator:" >> 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
echo "lifecycleOperator:" >> values.yaml
fi
echo " schedulingGatesEnabled: true" >> tmp-values.yaml
echo " schedulingGatesEnabled: true" >> values.yaml
fi
echo "installing with values.yaml file:"
cat values.yaml

cd ../../../chart
RealAnna marked this conversation as resolved.
Show resolved Hide resolved

helm install -n keptn-lifecycle-toolkit-system --create-namespace keptn ./ \
--values tmp-values.yaml \
--set lifecycleOperator.scheduler.imagePullPolicy=Never \
--values ../.github/actions/deploy-klt-on-cluster/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
RealAnna marked this conversation as resolved.
Show resolved Hide resolved

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

lifecycleOperator:
lifecycleOperator:
imagePullPolicy: Never
scheduler:
imagePullPolicy: Never
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
2 changes: 1 addition & 1 deletion .github/scripts/.helm-tests/default/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8472,7 +8472,7 @@ spec:
value: "0"
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: ghcr.io/keptn/metrics-operator:v0.8.2
image: keptn/metrics-operator:v0.8.2
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
2 changes: 1 addition & 1 deletion .github/scripts/.helm-tests/metrics-only/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ spec:
value: "0"
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: ghcr.io/keptn/metrics-operator:v0.8.2
image: keptn/metrics-operator:v0.8.2
name: metrics-operator
ports:
- containerPort: 9443
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,7 @@ spec:
value: "0"
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: ghcr.io/keptn/metrics-operator:v0.8.2
image: keptn/metrics-operator:v0.8.2
name: metrics-operator
ports:
- containerPort: 9443
Expand Down
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 repo for manager 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 repo for manager image
RealAnna marked this conversation as resolved.
Show resolved Hide resolved
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 repo for manager 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 repo for manager 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 repo for manager image
RealAnna marked this conversation as resolved.
Show resolved Hide resolved
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 repo for manager image
RealAnna marked this conversation as resolved.
Show resolved Hide resolved
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
Loading