From 9b9a8fbeaf22f9a59148e004cce86e0821377ab9 Mon Sep 17 00:00:00 2001 From: jbeemster Date: Fri, 29 Jul 2022 09:34:35 +0200 Subject: [PATCH] Make imagePullPolicy configurable in all charts (closes #43) --- charts/cron-job/Chart.yaml | 2 +- charts/cron-job/README.md | 1 + charts/cron-job/templates/deployment.yaml | 2 +- charts/cron-job/values.yaml | 2 ++ charts/service-deployment/Chart.yaml | 2 +- charts/service-deployment/README.md | 1 + charts/service-deployment/templates/deployment.yaml | 2 +- charts/service-deployment/values.yaml | 2 ++ charts/snowplow-iglu-server/Chart.yaml | 2 +- charts/snowplow-iglu-server/README.md | 1 + charts/snowplow-iglu-server/templates/iglu-deployment.yaml | 2 +- charts/snowplow-iglu-server/values.yaml | 2 ++ 12 files changed, 15 insertions(+), 6 deletions(-) diff --git a/charts/cron-job/Chart.yaml b/charts/cron-job/Chart.yaml index eecc5d7..cfca8f9 100644 --- a/charts/cron-job/Chart.yaml +++ b/charts/cron-job/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: cron-job description: A Helm Chart to deploy an arbitrary container as a cron job. -version: 0.4.2 +version: 0.4.3 icon: https://raw.githubusercontent.com/snowplow-devops/helm-charts/master/docs/logo/snowplow.png home: https://github.com/snowplow-devops/helm-charts sources: diff --git a/charts/cron-job/README.md b/charts/cron-job/README.md index a5d9c02..f565ef4 100644 --- a/charts/cron-job/README.md +++ b/charts/cron-job/README.md @@ -47,6 +47,7 @@ helm delete cron-job | image.repository | string | `"busybox"` | | | image.tag | string | `"latest"` | | | image.isRepositoryPublic | bool | `true` | Whether the repository is public | +| image.pullPolicy | string | `"IfNotPresent"` | The image pullPolicy to use | | config.command | list | `[]` | | | config.args | list | `[]` | | | config.env | object | `{}` | Map of environment variables to use within the job | diff --git a/charts/cron-job/templates/deployment.yaml b/charts/cron-job/templates/deployment.yaml index d476c76..895e288 100644 --- a/charts/cron-job/templates/deployment.yaml +++ b/charts/cron-job/templates/deployment.yaml @@ -46,7 +46,7 @@ spec: containers: - name: "{{ include "app.fullname" . }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: Always + imagePullPolicy: {{ default "IfNotPresent" .Values.image.pullPolicy }} {{- if .Values.config.command }} command: diff --git a/charts/cron-job/values.yaml b/charts/cron-job/values.yaml index 13419e6..f790b65 100644 --- a/charts/cron-job/values.yaml +++ b/charts/cron-job/values.yaml @@ -16,6 +16,8 @@ image: tag: "latest" # -- Whether the repository is public isRepositoryPublic: true + # -- The image pullPolicy to use + pullPolicy: "IfNotPresent" config: command: [] diff --git a/charts/service-deployment/Chart.yaml b/charts/service-deployment/Chart.yaml index 6302f34..382b59d 100644 --- a/charts/service-deployment/Chart.yaml +++ b/charts/service-deployment/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: service-deployment description: A Helm Chart to setup a generic deployment with optional service/hpa bindings -version: 0.1.2 +version: 0.1.3 icon: https://raw.githubusercontent.com/snowplow-devops/helm-charts/master/docs/logo/snowplow.png home: https://github.com/snowplow-devops/helm-charts sources: diff --git a/charts/service-deployment/README.md b/charts/service-deployment/README.md index 5788272..60cc6af 100644 --- a/charts/service-deployment/README.md +++ b/charts/service-deployment/README.md @@ -48,6 +48,7 @@ helm delete service-deployment | image.repository | string | `"nginx"` | | | image.tag | string | `"latest"` | | | image.isRepositoryPublic | bool | `true` | Whether the repository is public | +| image.pullPolicy | string | `"IfNotPresent"` | The image pullPolicy to use | | config.command | list | `[]` | | | config.args | list | `[]` | | | config.env | string | `nil` | Map of environment variables to use within the job | diff --git a/charts/service-deployment/templates/deployment.yaml b/charts/service-deployment/templates/deployment.yaml index 510349c..7457422 100644 --- a/charts/service-deployment/templates/deployment.yaml +++ b/charts/service-deployment/templates/deployment.yaml @@ -41,7 +41,7 @@ spec: containers: - name: "{{ include "app.fullname" . }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: Always + imagePullPolicy: {{ default "IfNotPresent" .Values.image.pullPolicy }} {{- if .Values.config.command }} command: diff --git a/charts/service-deployment/values.yaml b/charts/service-deployment/values.yaml index d7df2cc..456d878 100644 --- a/charts/service-deployment/values.yaml +++ b/charts/service-deployment/values.yaml @@ -10,6 +10,8 @@ image: tag: "latest" # -- Whether the repository is public isRepositoryPublic: true + # -- The image pullPolicy to use + pullPolicy: "IfNotPresent" config: command: [] diff --git a/charts/snowplow-iglu-server/Chart.yaml b/charts/snowplow-iglu-server/Chart.yaml index 6e616fc..72e6b7b 100644 --- a/charts/snowplow-iglu-server/Chart.yaml +++ b/charts/snowplow-iglu-server/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: snowplow-iglu-server description: A Helm Chart to deploy the Snowplow Iglu Server project -version: 0.1.5 +version: 0.1.6 appVersion: "0.8.5" icon: https://raw.githubusercontent.com/snowplow-devops/helm-charts/master/docs/logo/snowplow.png home: https://github.com/snowplow-devops/helm-charts diff --git a/charts/snowplow-iglu-server/README.md b/charts/snowplow-iglu-server/README.md index 1ff58fe..68a397d 100644 --- a/charts/snowplow-iglu-server/README.md +++ b/charts/snowplow-iglu-server/README.md @@ -139,6 +139,7 @@ You will need to fill these targeted fields: | service.image.repository | string | `"snowplow/iglu-server"` | | | service.image.tag | string | `"0.8.5"` | | | service.image.isRepositoryPublic | bool | `true` | Whether the repository is public | +| service.image.pullPolicy | string | `"IfNotPresent"` | The image pullPolicy to use | | service.minReplicas | int | `1` | | | service.maxReplicas | int | `4` | | | service.targetCPUUtilizationPercentage | int | `75` | | diff --git a/charts/snowplow-iglu-server/templates/iglu-deployment.yaml b/charts/snowplow-iglu-server/templates/iglu-deployment.yaml index dc49151..e0ee0c0 100644 --- a/charts/snowplow-iglu-server/templates/iglu-deployment.yaml +++ b/charts/snowplow-iglu-server/templates/iglu-deployment.yaml @@ -38,7 +38,7 @@ spec: containers: - name: {{ include "iglu.app.name" . }} image: {{ .Values.service.image.repository}}:{{ .Values.service.image.tag}} - imagePullPolicy: Always + imagePullPolicy: {{ default "IfNotPresent" .Values.service.image.pullPolicy }} args: - "-Dconfig.override_with_env_vars=true" diff --git a/charts/snowplow-iglu-server/values.yaml b/charts/snowplow-iglu-server/values.yaml index 0537ebe..07c3b7b 100644 --- a/charts/snowplow-iglu-server/values.yaml +++ b/charts/snowplow-iglu-server/values.yaml @@ -16,6 +16,8 @@ service: tag: "0.8.5" # -- Whether the repository is public isRepositoryPublic: true + # -- The image pullPolicy to use + pullPolicy: "IfNotPresent" minReplicas: 1 maxReplicas: 4 targetCPUUtilizationPercentage: 75