Files
mq-container/charts/mq-advancedserver/templates/stateful-set.yaml
2017-09-07 13:39:11 +01:00

98 lines
3.3 KiB
YAML

# © Copyright IBM Corporation 2017
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
serviceName: {{ .Values.service.name }}
replicas: 1
template:
metadata:
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
QM_IDENTIFIER: "{{ .Release.Name }}"
spec:
{{- if .Values.image.pullSecret }}
imagePullSecrets:
- name: {{ .Values.image.pullSecret }}
{{- end }}
containers:
- name: qmgr
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 1414
#- containerPort: 9443
env:
- name: LICENSE
value: {{ .Values.license }}
- name: MQ_QMGR_NAME
value: {{ .Values.queuemanager.name | default .Release.Name | replace "-" "" }}
{{- if .Values.data.persistence.enabled }}
volumeMounts:
- mountPath: "/mnt/mqm"
name: {{ template "fullname" . }}-{{ .Values.data.name }}
{{- end }}
# Set liveness probe to determine if the queue manager is running
livenessProbe:
exec:
command:
- chkmqhealthy
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 1
# Set readiness probe to determine if the MQ listener is running
readinessProbe:
exec:
command:
- chkmqready
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 1
resources:
limits:
{{ toYaml .Values.resources.limits | indent 14 }}
requests:
{{ toYaml .Values.resources.requests | indent 14 }}
volumeClaimTemplates:
{{- if .Values.data.persistence.enabled }}
- metadata:
name: {{ template "fullname" . }}-{{ .Values.data.name }}
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
{{- if .Values.data.persistence.storageClassName }}
storageClassName: {{ .Values.data.persistence.storageClassName | quote }}
{{- end }}
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: {{ .Values.data.persistence.size | quote }}
{{- end }}