Skip to content

Commit

Permalink
fix: make kubectl image configurable (#900)
Browse files Browse the repository at this point in the history
  • Loading branch information
khauser authored Jan 31, 2025
1 parent 4a0ab9b commit 285f1c8
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 24 deletions.
3 changes: 2 additions & 1 deletion charts/iom/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 26 additions & 11 deletions charts/iom/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
=============
Expand Down Expand Up @@ -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 <docs/ParametersIOM.rst>`_.

Expand Down Expand Up @@ -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.
Expand All @@ -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 <docs/ParametersIOM.rst>`_.

Expand All @@ -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.

Expand Down Expand Up @@ -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 <namespace> and <release-name> with actual values
NAMESPACE=<namespace>
RELEASE_NAME=<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
-----------------------
Expand Down Expand Up @@ -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.

-----------------
Expand All @@ -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
==========================================

Expand Down
14 changes: 7 additions & 7 deletions charts/iom/templates/patch-downtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
11 changes: 6 additions & 5 deletions charts/iom/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

replicaCount: 2
downtime: true
kubectlImageRepository: "bitnami/kubectl:1.32.1"

image:
repository: docker.tools.intershop.com/iom/intershophub/iom
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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:
Expand All @@ -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.
Expand Down

0 comments on commit 285f1c8

Please sign in to comment.