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

feat: add global value for imagePullPolicy #2807

Merged
merged 11 commits into from
Feb 20, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ spec:
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: testreg/keptn/certificate-operator:v0.0.0
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
name: certificate-operator
resources:
limits:
Expand Down
8 changes: 4 additions & 4 deletions .github/scripts/.helm-tests/default/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11368,7 +11368,7 @@ spec:
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: ghcr.io/keptn/certificate-operator:v0.0.0
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
name: certificate-operator
resources:
limits:
Expand Down Expand Up @@ -11485,7 +11485,7 @@ spec:
- name: CERT_MANAGER_ENABLED
value: "true"
image: ghcr.io/keptn/lifecycle-operator:v0.0.0
imagePullPolicy: Always
imagePullPolicy: Never
name: lifecycle-operator
ports:
- containerPort: 9443
Expand Down Expand Up @@ -11567,7 +11567,7 @@ spec:
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: ghcr.io/keptn/scheduler:v0.0.0
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
name: scheduler
resources:
limits:
Expand Down Expand Up @@ -11672,7 +11672,7 @@ spec:
- name: CERT_MANAGER_ENABLED
value: "true"
image: ghcr.io/keptn/metrics-operator:v0.0.0
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
name: metrics-operator
ports:
- containerPort: 9443
Expand Down
2 changes: 2 additions & 0 deletions .github/scripts/.helm-tests/default/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ lifecycleOperator:
lifecycleOperator:
image:
tag: v0.0.0
imagePullPolicy: Never
scheduler:
image:
tag: v0.0.0
Expand All @@ -17,5 +18,6 @@ metricsOperator:
global:
commonLabels:
app.kubernetes.io/version: vmyversion
imagePullPolicy: IfNotPresent
caInjectionAnnotations:
cert-manager.io/inject-ca-from: helmtests/keptn-certs
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 @@ -8976,7 +8976,7 @@ spec:
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: testreg/keptn/scheduler:v0.0.0
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
name: scheduler
resources:
limits:
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/.helm-tests/lifecycle-only/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ lifecycleOperator:
image:
repository: myrep
tag: v0.0.1
imagePullPolicy: Always
scheduler:
image:
tag: v0.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9090,7 +9090,7 @@ spec:
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: ghcr.io/keptn/certificate-operator:v0.0.0
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
name: certificate-operator
resources:
limits:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ certManager:
lifecycleOperator:
enabled: true
lifecycleOperator:
imagePullPolicy: Never
image:
tag: v0.0.0
imagePullPolicy: Never
scheduler:
imagePullPolicy: Never
image:
tag: v0.0.0
imagePullPolicy: Never
metricsOperator:
enabled: false

Expand All @@ -20,5 +20,6 @@ global:
app.kubernetes.io/version: vmyversion
commonAnnotations:
test/jj: test
imagePullPolicy: IfNotPresent
caInjectionAnnotations:
cert-manager.io/inject-ca-from: helmtests/keptn-certs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metricsOperator:
enabled: true
image:
tag: v0.0.0
imagePullPolicy: Always
customMetricsAPIService:
enabled: "false"

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 @@ -2397,7 +2397,7 @@ spec:
- name: CERT_MANAGER_ENABLED
value: "false"
image: ghcr.io/keptn/metrics-operator:v0.0.0
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
name: metrics-operator
ports:
- containerPort: 9443
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2553,7 +2553,7 @@ spec:
- name: KUBERNETES_CLUSTER_DOMAIN
value: cluster.local
image: ghcr.io/keptn/certificate-operator:v0.0.0
imagePullPolicy: Always
imagePullPolicy: Never
name: certificate-operator
resources:
limits:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ metricsOperator:
enabled: true
image:
tag: v0.0.0
imagePullPolicy: Never

global:
certManagerEnabled: true
commonLabels:
app.kubernetes.io/version: vmyversion
imagePullPolicy: Never
caInjectionAnnotations:
cert-manager.io/inject-ca-from: helmtests/keptn-certs
1 change: 1 addition & 0 deletions chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ metrics, observability, health checks, with pre- and post-deployment evaluations
| `global.certManagerEnabled` | Enable this value to install Keptn Certificate Manager | `true` |
| `global.imageRegistry` | Global Docker image registry | `""` |
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
| `global.imagePullPolicy` | Policy for pulling Docker images. Options: Always, IfNotPresent, Never | `""` |
| `global.commonLabels` | Common labels to add to all Keptn resources. Evaluated as a template | `{}` |
| `global.commonAnnotations` | Common annotations to add to all Keptn resources. Evaluated as a template | `{}` |
| `global.caInjectionAnnotations` | CA injection annotations for cert-manager.io configuration | `{}` |
2 changes: 2 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ global:
## - myRegistryKeySecretName
##
imagePullSecrets: []
## @param global.imagePullPolicy Policy for pulling Docker images. Options: Always, IfNotPresent, Never
imagePullPolicy: ""
## @param global.commonLabels Common labels to add to all Keptn resources. Evaluated as a template
commonLabels: {}
## @param global.commonAnnotations Common annotations to add to all Keptn resources. Evaluated as a template
Expand Down
3 changes: 2 additions & 1 deletion keptn-cert-manager/chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ resource.
| Name | Description | Value |
| ------------------------------- | ------------------------------------------------------------------------- | ----- |
| `global.imageRegistry` | Global container image registry | `""` |
| `global.imagePullPolicy` | select global image pull policy | `""` |
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
| `global.commonLabels` | Common labels to add to all Keptn resources. Evaluated as a template | `{}` |
| `global.commonAnnotations` | Common annotations to add to all Keptn resources. Evaluated as a template | `{}` |
Expand Down Expand Up @@ -38,7 +39,7 @@ resource.
| `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 | `v2.0.0` |
| `imagePullPolicy` | select image pull policy for manager container | `Always` |
| `image.imagePullPolicy` | specify pull policy for the manager image. This overrides global values | `""` |
| `livenessProbe` | custom RBAC proxy liveness probe | |
| `readinessProbe` | custom manager readiness probe | |
| `resources` | custom limits and requests for manager container | |
2 changes: 1 addition & 1 deletion keptn-cert-manager/chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
- name: KUBERNETES_CLUSTER_DOMAIN
value: {{ .Values.kubernetesClusterDomain }}
image: {{- include "common.images.image" ( dict "imageRoot" .Values.image "global" .Values.global ) | indent 1}}
imagePullPolicy: {{ .Values.imagePullPolicy }}
imagePullPolicy: {{ .Values.image.imagePullPolicy | default (.Values.global.imagePullPolicy | default "IfNotPresent") }}
name: certificate-operator
resources: {{- toYaml .Values.resources | nindent 12 }}
securityContext:
Expand Down
8 changes: 4 additions & 4 deletions keptn-cert-manager/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
global:
## @param global.imageRegistry Global container image registry
imageRegistry: ""

## @param global.imagePullPolicy select global image pull policy
imagePullPolicy: ""
## @param global.imagePullSecrets Global Docker registry secret names as an array
## E.g.
## imagePullSecrets:
Expand Down Expand Up @@ -69,9 +70,8 @@ image:
repository: keptn/certificate-operator
## @param image.tag select tag for manager container
tag: v2.0.0 # x-release-please-version
## @param imagePullPolicy select image pull policy for manager container
imagePullPolicy: Always

## @param image.imagePullPolicy specify pull policy for the manager image. This overrides global values
imagePullPolicy: ""
## @extra livenessProbe custom RBAC proxy liveness probe
## @skip livenessProbe.httpGet.path
## @skip livenessProbe.httpGet.port
Expand Down
41 changes: 21 additions & 20 deletions lifecycle-operator/chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and application health checks
| `global.certManagerEnabled` | Enable this value to install Keptn Certificate Manager | `true` |
| `global.imageRegistry` | Global container image registry | `""` |
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
| `global.imagePullPolicy` | select global image pull policy | `""` |
| `global.commonLabels` | Common labels to add to all Keptn resources. Evaluated as a template | `{}` |
| `global.commonAnnotations` | Common annotations to add to all Keptn resources. Evaluated as a template | `{}` |
| `global.caInjectionAnnotations` | CA injection annotations for cert-manager.io configuration | `{}` |
Expand Down Expand Up @@ -57,8 +58,8 @@ and application health checks
| `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.9.0` |
| `lifecycleOperator.imagePullPolicy` | specify pull policy for manager image | `Always` |
| `lifecycleOperator.livenessProbe` | custom livenessprobe for manager container | |
| `lifecycleOperator.image.imagePullPolicy` | specify pull policy for the manager image. This overrides global values | `""` |
| `lifecycleOperator.livenessProbe` | custom liveness probe for manager container | |
| `lifecycleOperator.readinessProbe` | custom readinessprobe for manager container | |
| `lifecycleOperator.resources` | specify limits and requests for manager container | |
| `lifecycleOperator.nodeSelector` | add custom nodes selector to lifecycle operator | `{}` |
Expand All @@ -81,21 +82,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.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.9.0` |
| `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 resources/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.9.0` |
| `scheduler.image.imagePullPolicy` | specify pull policy for the manager image. This overrides global values | `""` |
| `scheduler.livenessProbe` | customizable liveness probe for the scheduler | |
| `scheduler.readinessProbe` | customizable readiness probe for the scheduler | |
| `scheduler.resources` | sets cpu and memory resources/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 | `[]` |
4 changes: 2 additions & 2 deletions lifecycle-operator/chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ spec:
- name: CERT_MANAGER_ENABLED
value: {{ .Values.global.certManagerEnabled | quote }}
image: {{ include "common.images.image" ( dict "imageRoot" .Values.lifecycleOperator.image "global" .Values.global ) }}
imagePullPolicy: {{ .Values.lifecycleOperator.imagePullPolicy }}
imagePullPolicy: {{ .Values.lifecycleOperator.image.imagePullPolicy | default (.Values.global.imagePullPolicy | default "IfNotPresent") }}
name: lifecycle-operator
ports:
- containerPort: 9443
Expand Down Expand Up @@ -203,7 +203,7 @@ spec:
- name: KUBERNETES_CLUSTER_DOMAIN
value: {{ .Values.kubernetesClusterDomain }}
image: {{ include "common.images.image" ( dict "imageRoot" .Values.scheduler.image "global" .Values.global ) }}
imagePullPolicy: {{ .Values.scheduler.imagePullPolicy }}
imagePullPolicy: {{.Values.scheduler.image.imagePullPolicy | default (.Values.global.imagePullPolicy | default "IfNotPresent") }}
name: scheduler
resources: {{- toYaml .Values.scheduler.resources | nindent 10 }}
securityContext:
Expand Down
Loading
Loading