diff --git a/charts/image-resizer/Chart.yaml b/charts/image-resizer/Chart.yaml index 106375b..56b2fd2 100644 --- a/charts/image-resizer/Chart.yaml +++ b/charts/image-resizer/Chart.yaml @@ -15,13 +15,13 @@ 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.8 +version: 0.3.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 # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "v2.1.1" +appVersion: "v2.2.0" home: https://github.com/citizensadvice/helm-charts maintainers: diff --git a/charts/image-resizer/templates/configmap.yaml b/charts/image-resizer/templates/configmap.yaml new file mode 100644 index 0000000..f6e064c --- /dev/null +++ b/charts/image-resizer/templates/configmap.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "image-resizer.fullname" . }} + labels: + {{- include "image-resizer.labels" . | nindent 4 }} +data: +{{ toYaml .Values.env | indent 2 }} diff --git a/charts/image-resizer/templates/deployment.yaml b/charts/image-resizer/templates/deployment.yaml index 77c60b1..3df5383 100644 --- a/charts/image-resizer/templates/deployment.yaml +++ b/charts/image-resizer/templates/deployment.yaml @@ -56,6 +56,13 @@ spec: scheme: HTTP resources: {{- toYaml .Values.resources | nindent 12 }} + envFrom: + - configMapRef: + name: {{ include "image-resizer.fullname" . }} + {{- if .Values.externalSecrets.enabled }} + - secretRef: + name: {{ include "image-resizer.fullname" . }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/image-resizer/templates/externalsecrets.yaml b/charts/image-resizer/templates/externalsecrets.yaml new file mode 100644 index 0000000..0ab1c5a --- /dev/null +++ b/charts/image-resizer/templates/externalsecrets.yaml @@ -0,0 +1,27 @@ +{{- if .Values.externalSecrets.enabled }} +{{- range $name, $entries := .Values.externalSecrets.stores }} +--- +apiVersion: external-secrets.io/v1alpha1 +kind: ExternalSecret +metadata: + name: {{ include "image-resizer.fullname" $ }} + labels: + {{- include "image-resizer.labels" $ | nindent 4 }} +spec: + refreshInterval: "15s" + secretStoreRef: + name: {{ $name }} + kind: SecretStore + target: + name: {{ include "image-resizer.fullname" $ }} + data: + {{- range $name, $keys := $entries }} + {{- range $source, $destination := $keys }} + - secretKey: {{ $destination }} + remoteRef: + key: {{ $name }} + property: {{ $source }} + {{- end }} + {{- end }} +{{- end }} +{{- end }} diff --git a/charts/image-resizer/values.yaml b/charts/image-resizer/values.yaml index a005853..026480b 100644 --- a/charts/image-resizer/values.yaml +++ b/charts/image-resizer/values.yaml @@ -4,11 +4,19 @@ replicaCount: 1 +# https://external-secrets.io/ is available in citizensadvice EKS clusters +# where you can use vault, aws-paramter-store and aws-secret-manager stores +# to retrieve external secrets into kubernetes secrets and load them into +# the container environment variables +externalSecrets: &external_secrets_config + enabled: false + stores: {} + +env: {} + image: repository: public.ecr.aws/citizensadvice/image-resizer pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: main imagePullSecrets: [] nameOverride: "" diff --git a/charts/postcoder-proxy/Chart.yaml b/charts/postcoder-proxy/Chart.yaml index 421e48c..b9ab1e3 100644 --- a/charts/postcoder-proxy/Chart.yaml +++ b/charts/postcoder-proxy/Chart.yaml @@ -15,13 +15,13 @@ 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.4.1 +version: 0.4.2 # 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: "v4.0.3" +appVersion: "v4.1.0" dependencies: - name: "redis" diff --git a/charts/postcoder-proxy/values.yaml b/charts/postcoder-proxy/values.yaml index 6bd1e7c..479b8fe 100644 --- a/charts/postcoder-proxy/values.yaml +++ b/charts/postcoder-proxy/values.yaml @@ -13,16 +13,12 @@ externalSecrets: &external_secrets_config stores: {} env: - APP_ENV: development - NEW_RELIC_AGENT_ENABLED: 'false' CACHE_TTL: '2592000' CACHE_URL: redis://redis-master:6379/1 image: repository: public.ecr.aws/citizensadvice/postcoder pullPolicy: IfNotPresent - # tag defaults to the chart app version - tag: main imagePullSecrets: [] nameOverride: ""