From 285f1c89aa40585046753af6ec1d4f0e823ae758 Mon Sep 17 00:00:00 2001 From: Karsten Ludwig Hauser Date: Fri, 31 Jan 2025 09:27:22 +0100 Subject: [PATCH] fix: make kubectl image configurable (#900) --- charts/iom/Chart.yaml | 3 +- charts/iom/README.rst | 37 +++++++++++++++++------- charts/iom/templates/patch-downtime.yaml | 14 ++++----- charts/iom/values.yaml | 11 +++---- 4 files changed, 41 insertions(+), 24 deletions(-) diff --git a/charts/iom/Chart.yaml b/charts/iom/Chart.yaml index 081c32db..2c44e4c5 100644 --- a/charts/iom/Chart.yaml +++ b/charts/iom/Chart.yaml @@ -15,7 +15,8 @@ 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: 3.1.0 + +version: 3.1.1 # 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 diff --git a/charts/iom/README.rst b/charts/iom/README.rst index a43f906d..197c0325 100644 --- a/charts/iom/README.rst +++ b/charts/iom/README.rst @@ -68,6 +68,21 @@ up to version 3.14 of Helm. .. [4] Helm parameters *newRelic.\** do not work in this combination. .. [5] Helm parameter *oms.smtp.encryption* does not work in this combination. +============= +Version 3.1.1 +============= + +------------ +Bugfix +------------ + +Make patch job kubectl image configurable +========================================= + +The helm chart allows it to override the patch job kubectl image. + +Requires IOM version 5.1.0 or later. + ============= Version 3.1.0 ============= @@ -103,7 +118,7 @@ Added Support for *New Relic APM* ================================= Helm Charts 3.0 now support the use of *New Relic APM* (Application Performance Monitoring). *New -Relic APM* can be managed through new Helm parameters within the *newRelic* parameter group. +Relic APM* can be managed through new Helm parameters within the *newRelic* parameter group. For a detailed description of all new parameters, see `Helm parameters of IOM `_. @@ -168,12 +183,12 @@ following cases: 2. In very simple demo and test installations, the internal NGINX could also be used as Ingress controller. This made the setup easier, since the installation of a cluster-wide Ingress controller could be skipped. -If an installation is currently using the internal NGINX (*nginx.enabled* parameter is set to *true*), then measures must be taken +If an installation is currently using the internal NGINX (*nginx.enabled* parameter is set to *true*), then measures must be taken before using IOM Helm Charts 3.0.0. Depending on the use case that is causing the internal NGINX to be used, the steps will vary. 1. Session stickiness must be provided by the Ingress controller, otherwise IOM can not be operated. If an NGINX Ingress controller is used, the IOM Helm Charts already provide the required configuration settings. If any other Ingress - controller is used, you have to determine how to configure it in order to provide session stickiness. The appropriate + controller is used, you have to determine how to configure it in order to provide session stickiness. The appropriate configuration must then be applied to the Helm values. 2. Simple demo and test installations must now use a separately installed Ingress controller. Preferred is an NGINX Ingress controller, since the required configuration for session stickiness is already provided by IOM Helm Charts. @@ -196,7 +211,7 @@ Default value of *oms.jwtSecret* has changed ============================================ The default value of *oms.jwtSecret* is now empty, causing the usage of an automatically generated random secret. This means that if you -have not set *oms.jwtSecret* and *oms.jwtSecretKeyRef*, this automatically generated secret will be used instead. +have not set *oms.jwtSecret* and *oms.jwtSecretKeyRef*, this automatically generated secret will be used instead. See also `Helm parameters of IOM `_. @@ -219,11 +234,11 @@ Improved handling of persistent storage for the shared file system .. regular warnings are not rendered correctly in GitHub **Warning** - + If persistent storage for the shared file system has been configured via *persistence.hostPath*, upgrading the Helm release is not supported. In previous versions of IOM Helm Charts, the provisioning of a persistent storage method depended on the two parameters, *persistence.hostPath* -and *persistence.storageClass*. There was also a third parameter, *persistence.pvc*, but it has been removed. +and *persistence.storageClass*. There was also a third parameter, *persistence.pvc*, but it has been removed. There was a precedence defined for these parameters to select the provisioning method: if *persistence.hostPath* was set, *persistence.storageClass* was ignored. @@ -269,14 +284,14 @@ Only in case of *dynamic* provisioning, there is a single default annotation: The following code shows, how this could be done. .. code-block:: shell - + # replace and with actual values NAMESPACE= RELEASE_NAME= - + kubectl annotate pvc ${RELEASE_NAME}-iom meta.helm.sh/release-name=$RELEASE_NAME -n $NAMESPACE kubectl annotate pvc ${RELEASE_NAME}-iom meta.helm.sh/release-namespace=$NAMESPACE -n $NAMESPACE - + Examples for migrations ----------------------- @@ -356,7 +371,7 @@ Improved handling of persistent storage for PostgreSQL data .. regular warnings are not rendered correctly in GitHub **Warning** - + If persistent storage for PostgreSQL data is enabled, an upgrade of the Helm release is not supported. ----------------- @@ -372,7 +387,7 @@ will be removed in a future version of IOM Helm Charts. ------------- Removal Notes ------------- - + IOM prior version 4 is no longer supported ========================================== diff --git a/charts/iom/templates/patch-downtime.yaml b/charts/iom/templates/patch-downtime.yaml index 6610df90..a8caffa2 100644 --- a/charts/iom/templates/patch-downtime.yaml +++ b/charts/iom/templates/patch-downtime.yaml @@ -50,14 +50,14 @@ spec: serviceAccountName: {{ .Release.Name }}-iom-patch containers: - name: patch-replica-count - image: "bitnami/kubectl" - args: - - patch - - --type=merge - - sts - - {{ include "iom.fullname" . }} + image: {{ .Values.kubectlImageRepository }} + args: + - patch + - --type=merge + - sts + - {{ include "iom.fullname" . }} - -n - - {{ .Release.Namespace }} + - {{ .Release.Namespace }} - -p - '{"spec":{"replicas":{{ .Values.replicaCount }}}}' {{- end }} diff --git a/charts/iom/values.yaml b/charts/iom/values.yaml index 6e99d42c..116d449a 100644 --- a/charts/iom/values.yaml +++ b/charts/iom/values.yaml @@ -4,6 +4,7 @@ replicaCount: 2 downtime: true +kubectlImageRepository: "bitnami/kubectl:1.32.1" image: repository: docker.tools.intershop.com/iom/intershophub/iom @@ -217,7 +218,7 @@ newRelic: # Use an empty "config" parameter to set no configuration at all. # Default values are applied only, if NO "config" parameter is defined. #config: - + # Datadog APM related settings # Datadog APM is deprecated and will be removed in a future version of IOM Helm Charts. datadogApm: @@ -277,7 +278,7 @@ persistence: # Selects the subset of configuration parameters to be used. provisioning: dynamic storageSize: 1Gi - + dynamic: storageClass: azurefile # Annotations of persistent-volums-claim. @@ -296,7 +297,7 @@ persistence: storageClass: # Annotations of persistent-volums-claim. annotations: - + # To be used in simple, single node environments (e.g. demos) to persist data on local host. local: # Path in local filesystem to be used for persistent storage. @@ -417,7 +418,7 @@ postgres: # Use an empty "annotations" parameter to set no annotations at all. # Default values are applied only, if NO "annotations" parameter is set at all. #annotations: - + # If an already existing persistent-volume should be used, this can be done by # selecting static provisioning. static: @@ -427,7 +428,7 @@ postgres: storageClass: # Annotations of persistent-volums-claim. annotations: - + # To be used in simple, single node environments (e.g. demos) to persist data on local host. local: # Path in local filesystem to be used for persistent storage.