Skip to content

Commit 6e87aa9

Browse files
Merge pull request #60 from ibm-messaging/Release7.1
Updates for trust store and web console
2 parents 024f930 + dfc9037 commit 6e87aa9

File tree

4 files changed

+57
-9
lines changed

4 files changed

+57
-9
lines changed

charts/ibm-mq/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
apiVersion: v2
1515
name: ibm-mq
1616
description: IBM MQ queue manager
17-
version: 7.0.1
17+
version: 7.1.0
1818
type: application
1919
appVersion: 9.3.3.0
2020
kubeVersion: ">=1.18.0-0"

charts/ibm-mq/README.md

+30-8
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,6 @@ Alternatively, each parameter can be specified by using the `--set key=value[,ke
127127
| `resources.limits.memory` | Kubernetes memory limit for each Pod of the Queue Manager container | `0124Mi` |
128128
| `resources.requests.cpu` | Kubernetes CPU request for each Pod of the Queue Manager container | `100m` |
129129
| `resources.requests.memory` | Kubernetes memory request for each Pod of the Queue Manager container | `512Mi` |
130-
| `security.context.fsGroup` | A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- If unset, the Kubelet will not modify the ownership and permissions of any volume. | `nil` |
131-
| `security.context.seccompProfile.type` | Seccomp stands for secure computing mode and when enabled restricts the calls that can be made to the kernel. For more information, see https://kubernetes.io/docs/tutorials/security/seccomp/ | `nil` |
132-
| `security.context.supplementalGroups` | A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. | `nil` |
133-
| `security.initVolumeAsRoot` | This affects the securityContext used by the container which initializes the PersistentVolume. Set this to true if you are using a storage provider which requires you to be the root user to access newly provisioned volumes. Setting this to true affects which Security Context Constraints (SCC) object you can use, and the Queue Manager may fail to start if you are not authorized to use an SCC which allows the root user. Defaults to false. For more information, see https://docs.openshift.com/container-platform/latest/authentication/managing-security-context-constraints.html. | `false` |
134-
| `security.runAsUser` | Controls which user ID the containers are run with. | `nil` |
135130
| `queueManager.multiinstance.enable` | Whether to run in Multi-instance mode, with two Pods (one active and one passive Pods). | `false` |
136131
| `queueManager.name` | By default the Queue Manager will match the Helm release name. Use this field to change the Queue Manager name, for example if the Helm release name does not conform to the rules for naming a Queue Manager name (for example, a name longer than 48 characters). | Helm release name |
137132
| `queueManager.nativeha.enable` | Whether to run in Native HA mode, with three Pods (one active and two replica Pods). Native HA is available on x86, Linux on IBM Power and Linux on IBM Z. | `false` |
@@ -144,8 +139,14 @@ Alternatively, each parameter can be specified by using the `--set key=value[,ke
144139
| `queueManager.envVariables` | An array of YAML objects (name / value pairs) that detail the environment variables that should be associated with the Queue Manager container | `[]` |
145140
| `queueManager.terminationGracePeriodSeconds` | Optional duration in seconds the Pod needs to terminate gracefully. Value must be non-negative integer. The value zero indicates delete immediately. The target time in which ending the queue manager is attempted, escalating the phases of application disconnection. Essential queue manager maintenance tasks are interrupted and applications disconnected if necessary. Defaults to 30 seconds. | 30 |
146141
| `queueManager.updateStrategy` | Specify the update strategy for the StatefulSet. In the case of Native HA and Multi-instance this should always be onDelete, and therefore this parameter has no affect. For further details regarding Native HA and Multi-instance update process consult the [Updating Native HA and Multi-instance section](#Updating-the-Chart). In the case of a single instance queue manager the default is RollingUpdate. | `RollingUpdate` - single instance, `onDelete` - Native HA and Multi-instance |
142+
| `web.enable` | Whether or not to enable the web server. Default is empty string, which causes the default behaviour of the container. Set to `true` to enable the web console, and `false` to disable. | ``
147143
| `pki.keys` | An array of YAML objects that detail Kubernetes secrets containing TLS Certificates with private keys. For further details regarding how this is specified consult [Supplying certificates to be used for TLS](#Supplying-certificates-to-be-used-for-TLS) | `[]` |
148-
| `pki.trust` | An array of YAML objects that detail Kubernetes secrets containing TLS Certificates. For further details regarding how this is specified consult [Supplying certificates to be used for TLS](#Supplying-certificates-to-be-used-for-TLS) | `[]` |
144+
| `pki.trust` | An array of YAML objects that detail Kubernetes secrets or configMaps containing TLS Certificates. For further details regarding how this is specified consult [Supplying certificates using secrets to be used for TLS](#Supplying-certificates-to-be-used-for-TLS) and [Supplying certificates using a configMap](#Supplying-certificates-using-a-configMap) | `[]` |
145+
| `security.context.fsGroup` | A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- If unset, the Kubelet will not modify the ownership and permissions of any volume. | `nil` |
146+
| `security.context.seccompProfile.type` | Seccomp stands for secure computing mode and when enabled restricts the calls that can be made to the kernel. For more information, see https://kubernetes.io/docs/tutorials/security/seccomp/ | `nil` |
147+
| `security.context.supplementalGroups` | A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. | `nil` |
148+
| `security.initVolumeAsRoot` | This affects the securityContext used by the container which initializes the PersistentVolume. Set this to true if you are using a storage provider which requires you to be the root user to access newly provisioned volumes. Setting this to true affects which Security Context Constraints (SCC) object you can use, and the Queue Manager may fail to start if you are not authorized to use an SCC which allows the root user. Defaults to false. For more information, see https://docs.openshift.com/container-platform/latest/authentication/managing-security-context-constraints.html. | `false` |
149+
| `security.runAsUser` | Controls which user ID the containers are run with. | `nil` |
149150
| `livenessProbe.initialDelaySeconds` | Number of seconds after the container has started before the probe is initiated. Defaults to 90 seconds for SingleInstance. Defaults to 0 seconds for a Native HA and Multi-instance deployments. | `90` - single instance, `0` - Native HA and Multi-instance |
150151
| `livenessProbe.periodSeconds` | How often (in seconds) to perform the probe. | 10 |
151152
| `livenessProbe.timeoutSeconds` | Number of seconds after which the probe times out | 5 |
@@ -222,9 +223,9 @@ The [drainMQContainer](../../samples/genericresources/kubernetesupgrade/drainMQC
222223

223224
## Supplying certificates to be used for TLS
224225

225-
The `pki.trust` and `pki.keys` allow you to supply details of Kubernetes secrets that contain TLS certificates. By doing so the TLS certificates will be imported into the container at runtime and MQ will be configured to use them.
226+
The `pki.trust` and `pki.keys` allow you to supply details of Kubernetes secrets and configMaps that contain TLS certificates. Supplying certificates using configMaps is only permitted for `pki.trust`. By doing so the TLS certificates will be imported into the container at runtime and MQ will be configured to use them.
226227

227-
If you supply invalid configuration then the container will terminate with an appropriate termination message. The next 2 sections will detail the requirements for supplying each type of certificate.
228+
If you supply invalid configuration then the container will terminate with an appropriate termination message. The next 3 sections will detail the requirements for how this is specified.
228229

229230
### Supplying certificates which contain the public and private keys
230231

@@ -273,6 +274,27 @@ pki:
273274

274275
If you supply multiple YAML objects then all of the certificates specified will be added into the queue manager trust store.
275276

277+
## Supplying certificates using a configMap
278+
When supplying a Kubernetes configMap that contains a certificate file with only the public key you must ensure that the configMap contains files that have the extension `.crt`. For example: `ca.crt`.
279+
280+
The format of the YAML objects for `pki.trust` value is as follows:
281+
282+
```YAML
283+
pki:
284+
trust:
285+
- name: default
286+
configMap:
287+
configMapName: helmsecure
288+
items:
289+
- ca.crt
290+
```
291+
292+
`configMap.configMapName` must match the name of a Kubernetes configMap that contains the TLS certificates you wish to add.
293+
294+
`configMap.items` must list the TLS certificate files contained in `configMap.configMapName` you want to add.
295+
296+
If you supply multiple YAML objects then all of the certificates specified will be added into the queue manager trust store.
297+
276298
## Supplying custom mqsc using a ConfigMap
277299
Configuration of Queue Manager resources can be applied at Queue Manager creation and start time by providing mqsc ConfigMaps.
278300

charts/ibm-mq/templates/stateful-set.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,17 @@ spec:
155155
path: {{ . }}
156156
{{- end }}
157157
{{- end }}
158+
{{- if $source.configMap }}
159+
- name: trust{{- $index }}
160+
configMap:
161+
name: {{ $source.configMap.configMapName }}
162+
defaultMode: 420
163+
items:
164+
{{- range $source.configMap.items }}
165+
- key: {{ . }}
166+
path: {{ . }}
167+
{{- end }}
168+
{{- end }}
158169
{{- end }}
159170
{{- range $index, $source := .Values.pki.keys }}
160171
{{- if $source.secret }}
@@ -245,6 +256,18 @@ spec:
245256
- name: MQ_MULTI_INSTANCE
246257
value: "{{ .Values.queueManager.multiinstance.enable | default false }}"
247258
{{- end }}
259+
{{- /*
260+
The following IF statement for the MQ_ENABLE_EMBEDDED_WEB_SERVER may initially look confusing.
261+
Originally the helm chart did not set the environment variable. To protect backwards
262+
compatibility as much as possible we wanted to maintain this behaviour.
263+
The first condition checks it is set to a non-false value, excludes both unset and false.
264+
In our case we want to explicitly set if it is NOT unset, hence the reason for the complex IF
265+
statement.
266+
*/}}
267+
{{- if or .Values.web.enable (eq .Values.web.enable false)}}
268+
- name: MQ_ENABLE_EMBEDDED_WEB_SERVER
269+
value: "{{ .Values.web.enable | default false }}"
270+
{{- end }}
248271
{{- if .Values.queueManager.nativeha.enable }}
249272
- name: MQ_NATIVE_HA_INSTANCE_0_NAME
250273
value: {{ include "ibm-mq.pod0.name" . }}

charts/ibm-mq/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,6 @@ affinity:
187187
matchExpressions: []
188188

189189
tolerations: []
190+
191+
web:
192+
enabled:

0 commit comments

Comments
 (0)