change name to include server
This commit is contained in:
10
charts/ibm-mqadvanced-server-dev/templates/NOTES.txt
Normal file
10
charts/ibm-mqadvanced-server-dev/templates/NOTES.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
MQ can be accessed via port 1414 on the following DNS name from within your cluster:
|
||||
{{ template "fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
|
||||
|
||||
To get your admin password run:
|
||||
|
||||
MQ_ADMIN_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.adminPassword}" | base64 --decode; echo)
|
||||
|
||||
If you set an app password, you can retrieve it by running the following:
|
||||
|
||||
MQ_APP_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.appPassword}" | base64 --decode; echo)
|
||||
29
charts/ibm-mqadvanced-server-dev/templates/_helpers.tpl
Normal file
29
charts/ibm-mqadvanced-server-dev/templates/_helpers.tpl
Normal file
@@ -0,0 +1,29 @@
|
||||
# © 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.
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 24 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 24 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
34
charts/ibm-mqadvanced-server-dev/templates/secret-dev.yaml
Normal file
34
charts/ibm-mqadvanced-server-dev/templates/secret-dev.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
# © 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: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
type: Opaque
|
||||
data:
|
||||
{{ if .Values.queueManager.dev.adminPassword }}
|
||||
adminPassword: {{ .Values.queueManager.dev.adminPassword | b64enc | quote }}
|
||||
{{ else }}
|
||||
adminPassword: {{ randAlphaNum 10 | b64enc | quote }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Values.queueManager.dev.appPassword }}
|
||||
appPassword: {{ .Values.queueManager.dev.appPassword | b64enc | quote }}
|
||||
{{ end }}
|
||||
32
charts/ibm-mqadvanced-server-dev/templates/service.yaml
Normal file
32
charts/ibm-mqadvanced-server-dev/templates/service.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
# © 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: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: 1414
|
||||
name: {{ .Values.service.name }}-server
|
||||
- port: 9443
|
||||
name: {{ .Values.service.name }}-web
|
||||
selector:
|
||||
app: {{ template "fullname" . }}
|
||||
93
charts/ibm-mqadvanced-server-dev/templates/stateful-set.yaml
Normal file
93
charts/ibm-mqadvanced-server-dev/templates/stateful-set.yaml
Normal file
@@ -0,0 +1,93 @@
|
||||
# © 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 "-" "" }}
|
||||
#- name: MQ_DISABLE_WEB_CONSOLE
|
||||
# value: "true"
|
||||
- name: MQ_ADMIN_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "fullname" . }}
|
||||
key: adminPassword
|
||||
{{- if .Values.queueManager.dev.appPassword }}
|
||||
- name: MQ_APP_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "fullname" . }}
|
||||
key: appPassword
|
||||
{{- end }}
|
||||
{{- if .Values.data.persistence.enabled }}
|
||||
volumeMounts:
|
||||
- mountPath: "/mnt/mqm"
|
||||
name: {{ template "fullname" . }}-{{ .Values.data.name }}
|
||||
{{- end }}
|
||||
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 }}
|
||||
40
charts/ibm-mqadvanced-server-dev/templates/test.yaml
Normal file
40
charts/ibm-mqadvanced-server-dev/templates/test.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
# © 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: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{.Release.Name}}-test"
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
annotations:
|
||||
"helm.sh/hook": test-success
|
||||
spec:
|
||||
containers:
|
||||
- name: {{.Release.Name}}-test
|
||||
image: alpine:latest
|
||||
env:
|
||||
# Host name for the service running an MQ queue manager
|
||||
- name: MQ_HOST
|
||||
value: {{ template "fullname" . }}
|
||||
# Time to try before giving up and failing the test (in seconds)
|
||||
- name: TIMEOUT
|
||||
value: "10"
|
||||
command: ["sh"]
|
||||
# Check that port 1414 is listening
|
||||
args: ["-xc", "nc -v -z -w$(TIMEOUT) $(MQ_HOST) 1414"]
|
||||
restartPolicy: Never
|
||||
Reference in New Issue
Block a user