```
Some checks failed
Build Helm Chart / helm-package (push) Failing after 30s

Rename artemis-broker to artemis-broker-primary

This commit renames and refactors the Helm chart for the
artemis-broker. The original files in the artemis-broker
directory are renamed and moved to artemis-broker-primary.
The purpose of this change is to enable a clear
distinction between the primary broker configuration and any
backup or alternative configurations.

Additionally, the configuration has been updated to support
enhancements in TLS setup, metrics services, and users,
allowing for a more robust and flexible deployment.
This change introduces new templates and scripts needed
for managing various aspects of the broker's functions,
including improved user authentication and logging. No
breaking changes were introduced, but users must update
their references to the chart paths as they now point to
the new directory structure.
```
This commit is contained in:
2025-03-18 08:30:01 +01:00
parent 568b4d1422
commit b2d45ee0c4
60 changed files with 2002 additions and 0 deletions

View File

@ -0,0 +1,132 @@
{{- define "drainer.pod" -}}
alpha.image.policy.openshift.io/resolve-names: "*"
statefulsets.kubernetes.io/drainer-pod-template: |
{
"metadata": {
"labels": {
"app": "{{ .Values.application.name }}-amq-drainer"
}
},
"spec": {
"serviceAccount": "{{ tpl .Values.templates.service_account .}}",
"serviceAccountName": "{{ tpl .Values.templates.service_account .}}",
"terminationGracePeriodSeconds": 5,
"containers": [
{
"env": [
{
"name": "APPLICATION_NAME",
"value": "{{ .Values.application.name }}"
},
{
"name": "HEADLESS_ENDPOINT",
"value": "{{ tpl .Values.templates.service . }}"
},
{
"name": "PING_SVC_NAME",
"value": "{{ tpl .Values.ping_service.name . }}"
},
{
"name": "AMQ_EXTRA_ARGS",
"value": "--no-autotune"
},
{
"name": "AMQ_USER",
"valueFrom": {
"secretKeyRef": {
"name": "{{ tpl .Values.templates.app_secret . }}",
"key": "AMQ_USER"
}
}
},
{
"name": "AMQ_PASSWORD",
"valueFrom": {
"secretKeyRef": {
"name": "{{ tpl .Values.templates.app_secret . }}",
"key": "AMQ_PASSWORD"
}
}
},
{
"name": "AMQ_ROLE",
"value": "{{ .Values.admin.role }}"
},
{
"name": "AMQ_NAME",
"value": "{{ .Values.parameters.amq_broker_name }}"
},
{
"name": "AMQ_TRANSPORTS",
"value": "{{ .Values.parameters.amq_protocols }}"
},
{
"name": "AMQ_GLOBAL_MAX_SIZE",
"value": "{{ .Values.parameters.amq_global_max_size }}"
},
{
"name": "AMQ_ALLOW_ANONYMOUS",
"value": "{{ .Values.parameters.allow_anonymous }}"
},
{
"name": "AMQ_DATA_DIR",
"value": "{{ .Values.parameters.amq_data_dir }}"
},
{
"name": "AMQ_DATA_DIR_LOGGING",
"value": "{{ .Values.parameters.amq_data_dir_logging }}"
},
{
"name": "AMQ_CLUSTERED",
"value": "{{ .Values.parameters.amq_clustered }}"
},
{
"name": "AMQ_REPLICAS",
"value": "{{ .Values.application.replicas }}"
},
{
"name": "AMQ_CLUSTER_USER",
"valueFrom": {
"secretKeyRef": {
"name": "{{ tpl .Values.templates.app_secret .}}",
"key": "AMQ_CLUSTER_USER"
}
}
},
{
"name": "AMQ_CLUSTER_PASSWORD",
"valueFrom": {
"secretKeyRef": {
"name": "{{ tpl .Values.templates.app_secret .}}",
"key": "AMQ_CLUSTER_PASSWORD"
}
}
},
{
"name": "POD_NAMESPACE",
"valueFrom": {
"fieldRef": {
"fieldPath": "metadata.namespace"
}
}
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
"value": "{{ .Values.ping_service.jgroups.bind_port }}"
}
],
"image": "{{ tpl .Values.templates.broker_image .}}",
"name": "{{ .Values.application.name }}-amq-drainer-pod",
"command": ["/bin/sh", "-c", "echo \"Starting the drainer\" ; /opt/amq/bin/drain.sh; echo \"Drain completed! Exit code $?\""],
"volumeMounts": [
{
"name": "{{ tpl .Values.templates.pvc_name . }}",
"mountPath": "{{ .Values.parameters.amq_data_dir }}"
}
]
}
]
}
}
{{- end -}}

View File

@ -0,0 +1,183 @@
{{- define "amq.pod" -}}
{{- if eq .Values.platform "kubernetes" -}}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 2 -}}
{{- end }}
imagePullSecrets:
- name: {{ .Values.application.pullSecretName }}
{{- end }}
containers:
- env:
{{- if .Values.clustered }}
- name: APPLICATION_NAME
value: "{{ .Values.application.name }}"
- name: PING_SVC_NAME
value: "{{ tpl .Values.ping_service.name . }}"
- name: AMQ_CLUSTERED
value: "{{ .Values.clustered }}"
- name: AMQ_REPLICAS
value: "{{ .Values.application.replicas }}"
- name: AMQ_CLUSTER_USER
valueFrom:
secretKeyRef:
name: {{ tpl .Values.templates.app_secret . }}
key: AMQ_CLUSTER_USER
- name: AMQ_CLUSTER_PASSWORD
valueFrom:
secretKeyRef:
name: {{ tpl .Values.templates.app_secret . }}
key: AMQ_CLUSTER_PASSWORD
- name: OPENSHIFT_DNS_PING_SERVICE_PORT
value: "{{ .Values.ping_service.jgroups.bind_port }}"
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- end }}
- name: AMQ_USER
valueFrom:
secretKeyRef:
name: {{ tpl .Values.templates.app_secret . }}
key: AMQ_USER
- name: AMQ_PASSWORD
valueFrom:
secretKeyRef:
name: {{ tpl .Values.templates.app_secret . }}
key: AMQ_PASSWORD
- name: AMQ_ROLE
value: "{{ .Values.admin.role }}"
- name: AMQ_NAME
value: "{{ .Values.parameters.amq_broker_name }}"
- name: AMQ_TRANSPORTS
value: "{{ .Values.parameters.amq_protocols }}"
{{- if .Values.parameters.tls_enabled }}
- name: AB_JOLOKIA_HTTPS
value: "{{ .Values.parameters.jolokia_passthrough }}"
- name: AMQ_KEYSTORE_TRUSTSTORE_DIR
value: {{ .Values.tls.secret_mount_path }}
- name: AMQ_TRUSTSTORE
value: {{ .Values.tls.truststore }}
- name: AMQ_TRUSTSTORE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ tpl .Values.templates.app_certificates . }}
key: AMQ_TRUSTSTORE_PASSWORD
- name: AMQ_KEYSTORE
value: {{ .Values.tls.keystore }}
- name: AMQ_KEYSTORE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ tpl .Values.templates.app_certificates . }}
key: AMQ_KEYSTORE_PASSWORD
- name: AMQ_SSL_PROVIDER
value: {{ tpl .Values.parameters.ssl_provider . }}
{{- end }}
- name: AMQ_GLOBAL_MAX_SIZE
value: "{{ .Values.parameters.amq_global_max_size }}"
- name: AMQ_REQUIRE_LOGIN
value: "{{ .Values.parameters.amq_require_login }}"
{{- if .Values.application.persistent }}
- name: AMQ_DATA_DIR
value: "{{ .Values.parameters.amq_data_dir }}"
{{- end }}
- name: AMQ_EXTRA_ARGS
value: {{ if .Values.parameters.amq_extra_args }} "{{ .Values.parameters.amq_extra_args }}" {{ else }} "" {{ end }}
- name: AMQ_ANYCAST_PREFIX
value: {{ if .Values.parameters.amq_anycast_prefix }} "{{ .Values.parameters.amq_anycast_prefix }}" {{ else }} "jms.queue." {{ end }}
- name: AMQ_MULTICAST_PREFIX
value: {{ if .Values.parameters.amq_multicast_prefix }} "{{ .Values.parameters.amq_multicast_prefix }}" {{ else }} "jms.topic." {{ end }}
- name: AMQ_ENABLE_METRICS_PLUGIN
value: {{ .Values.metrics.enabled | quote }}
- name: AMQ_JOURNAL_TYPE
value: "{{ .Values.parameters.amq_journal_type }}"
image: {{ tpl .Values.templates.broker_image . }}
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 4 -}}
{{- end }}
imagePullPolicy: {{ .Values.application.pullPolicy }}
readinessProbe:
exec:
command:
- "/bin/bash"
- "-c"
- "/opt/amq/bin/readinessProbe.sh"
name: {{ tpl .Values.templates.deployment . }}
ports:
{{- range .Values.service.acceptors }}
- containerPort: {{ .port }}
name: {{ .name }}
protocol: {{ .protocol }}
{{- end }}
{{- range .Values.service.console }}
- containerPort: {{ .port }}
name: {{ .name }}
protocol: {{ .protocol }}
{{- end }}
volumeMounts:
{{- if .Values.application.persistent }}
- name: {{ tpl .Values.templates.pvc_name . }}
mountPath: {{ .Values.parameters.amq_data_dir }}
{{- end }}
- name: broker-config-script-custom
mountPath: /opt/amq/bin/configure_custom_config.sh
subPath: configure_custom_config.sh
readOnly: true
- name: broker-config-script-custom
mountPath: /opt/amq/bin/launch.sh
subPath: launch.sh
readOnly: true
{{- if .Values.clustered }}
- name: broker-config-script-custom
mountPath: /opt/amq/bin/drain.sh
subPath: drain.sh
readOnly: true
{{- end }}
- name: broker-config-volume
mountPath: "/opt/amq/conf"
readOnly: true
{{- if .Values.parameters.tls_enabled }}
- mountPath: {{ .Values.tls.secret_mount_path }}
name: broker-secret-volume
readOnly: true
{{- end }}
terminationGracePeriodSeconds: 60
volumes:
{{- if .Values.parameters.tls_enabled }}
- name: broker-secret-volume
secret:
secretName: {{ tpl .Values.templates.app_certificates . }}
{{- end }}
- name: broker-config-script-custom
configMap:
name: {{ tpl .Values.templates.override_cm . }}
items:
- key: configure_custom_config.sh
path: configure_custom_config.sh
- key: launch.sh
path: launch.sh
{{- if .Values.clustered }}
- key: drain.sh
path: drain.sh
{{- end }}
defaultMode: 0550
- name: broker-config-volume
projected:
sources:
- configMap:
name: {{ tpl .Values.templates.config_cm . }}
{{- range .Values.security.secrets }}
- secret:
name: {{ . }}
{{- end }}
{{- if and (eq .Values.kind "Deployment") (.Values.application.persistent) }}
- name: {{ tpl .Values.templates.pvc_name . }}
persistentVolumeClaim:
{{- if eq .Values.ha_ap.mode "primary" }}
claimName: {{ tpl .Values.templates.pvc_name . }}
{{- else }}
claimName: {{ .Values.ha_ap.connector.static.ref }}-persistent-volume
{{- end }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,14 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ tpl .Values.templates.override_cm . }}
data:
{{- (.Files.Glob "scripts-override/**.sh").AsConfig | nindent 2 }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ tpl .Values.templates.config_cm . }}
data:
{{ tpl (.Files.Glob "conf/**").AsConfig . | nindent 2 }}

View File

@ -0,0 +1,35 @@
{{- if eq .Values.kind "Deployment" }}
{{- if and .Values.clustered (not .Values.cluster.ha_ap_mode) }}
{{- fail ".Values.kind is set to Deployment but this is unsupported in a clustered environment. Use a StatefulSet" }}
{{- else }}
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
application: {{ .Values.application.name }}
name: {{ tpl .Values.templates.deployment . }}
{{- if .Values.clustered }}
annotations:
{{- include "drainer.pod" . | nindent 6 }}
{{- end }}
spec:
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
application: {{ .Values.application.name }}
strategy:
type: Recreate
template:
metadata:
# trigger deployments on config map changes
annotations:
configmap/checksum: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
labels:
application: {{ .Values.application.name }}
deployment: {{ tpl .Values.templates.deployment . }}
name: {{ tpl .Values.templates.deployment . }}
spec:
{{- include "amq.pod" . | nindent 6 }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,64 @@
{{- if eq .Values.platform "kubernetes" }}
{{- $route_name := tpl .Values.templates.route . }}
{{- $svc_name := tpl .Values.templates.service . }}
{{- if .Values.parameters.tls_enabled }}
{{- if not .Values.clustered }}
{{- if .Values.ingress.passthrough.enabled }}
{{- range .Values.service.acceptors }}
{{- $nm := toString .name }}
{{- if eq $nm $.Values.ingress.passthrough.service }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "{{ $route_name }}-passthrough"
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
ingressClassName: {{ $.Values.ingress.className }}
rules:
- host: "{{ $route_name }}-passthrough.{{ $.Values.ingress.domain }}"
http:
paths:
- path: "{{ $.Values.ingress.passthrough.path }}"
pathType: Prefix
backend:
service:
name: {{ $svc_name }}
port:
number: {{ .port }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.ingress.console.enabled }}
{{- range .Values.service.console }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "{{ $route_name }}-console"
spec:
{{- if $.Values.ingress.console.tls }}
tls:
- hosts:
- "{{ $route_name }}-console.{{ $.Values.ingress.domain }}"
secretName: {{ $.Values.ingress.console.tlsSecretName }}
{{- end }}
rules:
- host: "{{ $route_name }}-console.{{ $.Values.ingress.domain }}"
http:
paths:
- path: "{{ $.Values.ingress.console.path }}"
pathType: Prefix
backend:
service:
name: {{ $svc_name }}
port:
number: {{ .port }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,26 @@
{{- if .Values.nodeport.enabled }}
{{- $np_svc := .Values.nodeport }}
{{- range .Values.service.acceptors }}
{{- if eq .name $np_svc.service }}
---
apiVersion: v1
kind: Service
metadata:
labels:
application: {{ $.Values.application.name }}
name: {{ $.Values.application.name }}-nodeport-svc
spec:
ports:
- name: {{ quote .name }}
port: {{ .port }}
protocol: {{ quote .protocol }}
targetPort: {{ .port }}
nodePort: {{ $np_svc.port }}
publishNotReadyAddresses: true
selector:
application: {{ $.Values.application.name }}
sessionAffinity: None
type: NodePort
{{- end }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,13 @@
{{- if and (eq .Values.kind "Deployment") (eq .Values.ha_ap.mode "primary") (.Values.application.persistent) }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ tpl .Values.templates.pvc_name . }}
spec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: {{ .Values.application.volume_capacity }}
storageClassName: "{{ .Values.application.storageclass }}"
{{- end }}

View File

@ -0,0 +1,56 @@
{{- if .Values.clustered }}
{{- $service_account := tpl .Values.templates.service_account . }}
{{- $role := tpl .Values.templates.k8s_role . }}
{{- $rolebinding := tpl .Values.templates.k8s_rolebinding . }}
{{- with $app := .Values.application.name }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ $service_account }}
labels:
app: {{ $app }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ $role }}
labels:
app: {{ $app }}
rules:
- apiGroups:
- ""
resources:
- endpoints
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ $rolebinding }}
labels:
app: {{ $app }}
subjects:
- kind: ServiceAccount
name: {{ $service_account }}
roleRef:
kind: Role
name: {{ $role }}
apiGroup: rbac.authorization.k8s.io
{{- end }}
{{- end }}

View File

@ -0,0 +1,65 @@
{{- if eq .Values.platform "openshift" }}
{{- $svc_name := tpl .Values.templates.service . }}
{{- $app_name := tpl .Values.application.name . }}
{{- $route_name := tpl .Values.templates.route . }}
{{- $jolokia_ssl := and (.Values.parameters.tls_enabled) (.Values.parameters.jolokia_passthrough) }}
{{- range .Values.service.console }}
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
labels:
application: {{ $app_name }}
name: {{ $route_name }}-console
spec:
{{- if $.Values.parameters.append_ns }}
host: {{ $route_name }}.{{ $.Release.Namespace }}.{{ $.Values.parameters.openshift_appdomain }}
{{- else }}
host: {{ $route_name }}.{{ $.Values.parameters.openshift_appdomain }}
{{- end }}
to:
kind: Service
name: {{ $svc_name }}
port:
targetPort: {{ .port }}
tls:
{{- if $jolokia_ssl }}
termination: passthrough
{{- else }}
termination: edge
{{- end }}
insecureEdgeTerminationPolicy: Redirect
wildcardPolicy: None
{{- end }}
{{- if not .Values.clustered }}
{{- if .Values.passthrough_route.enabled }}
{{- range .Values.service.acceptors }}
{{- $nm := toString .name }}
{{- if eq $nm $.Values.passthrough_route.service }}
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
labels:
application: {{ $app_name }}
name: {{ $route_name }}-passthrough
spec:
{{- if $.Values.parameters.append_ns }}
host: {{ $.Values.passthrough_route.hostname }}.{{ $.Release.Namespace }}.{{ $.Values.parameters.openshift_appdomain }}
{{- else }}
host: {{ $.Values.passthrough_route.hostname }}.{{ $.Values.parameters.openshift_appdomain }}
{{- end }}
to:
kind: Service
name: {{ $svc_name }}
port:
targetPort: {{ .port }}
tls:
termination: passthrough
insecureEdgeTerminationPolicy: Redirect
wildcardPolicy: None
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,42 @@
{{- if .Values.security.createSecret }}
apiVersion: v1
kind: Secret
metadata:
name: {{ tpl .Values.templates.app_secret .}}
type: Opaque
data:
AMQ_USER: {{ b64enc .Values.admin.user }}
AMQ_PASSWORD: {{ b64enc .Values.admin.password }}
{{- if .Values.clustered }}
AMQ_CLUSTER_USER: {{ b64enc .Values.admin.cluster_user }}
AMQ_CLUSTER_PASSWORD: {{ b64enc .Values.admin.cluster_password }}
{{- end }}
{{- end }}
{{- if .Values.parameters.tls_enabled }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ tpl .Values.templates.app_certificates . }}
type: Opaque
data:
AMQ_KEYSTORE_PASSWORD: {{ b64enc .Values.tls.keystore_password }}
AMQ_TRUSTSTORE_PASSWORD: {{ b64enc .Values.tls.truststore_password }}
{{- range tuple .Values.tls.keystore .Values.tls.truststore }}
{{ . }}: |-
{{ ( printf "%s%s" "tls/" . | $.Files.Get ) | b64enc }}
{{- end }}
{{- end }}
{{- if and (eq .Values.platform "kubernetes") (.Values.ingress.console.tls) }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.ingress.console.tlsSecretName }}
data:
tls.crt: |-
{{ ( printf "%s%s" "tls/" .Values.ingress.console.cert | $.Files.Get) | b64enc }}
tls.key: |-
{{ ( printf "%s%s" "tls/" .Values.ingress.console.key | $.Files.Get) | b64enc }}
type: kubernetes.io/tls
{{- end }}

View File

@ -0,0 +1,16 @@
{{- if .Values.metrics.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ .Values.application.name }}-monitor
labels:
prometheus: prometheus-app
spec:
selector:
matchLabels:
application: {{ .Values.application.name }}
endpoints:
- targetPort: {{ .Values.metrics.servicemonitor.port }}
path: /metrics/
interval: {{ .Values.metrics.servicemonitor.interval }}
{{- end }}

View File

@ -0,0 +1,57 @@
{{- $application_name := .Values.application.name }}
{{- $svc_name := tpl .Values.templates.service . }}
{{- $dc_name := tpl .Values.templates.deployment . }}
---
apiVersion: v1
kind: Service
metadata:
annotations:
{{- if eq .Values.kind "StatefulSet" }}
description: The broker's headless, non load balanced service
{{- else }}
description: AMQ Broker Service
{{- end }}
labels:
application: {{ $application_name }}
app: {{ $application_name }}
name: {{ $svc_name }}
spec:
{{- if eq .Values.kind "StatefulSet" }}
clusterIP: None
{{- end }}
type: ClusterIP
publishNotReadyAddresses: true
ports:
{{- range .Values.service.acceptors }}
- port: {{ .port }}
name: {{ .name }}
protocol: {{ .protocol }}
targetPort: {{ .port }}
{{- end }}
{{- range .Values.service.console }}
- port: {{ .port }}
name: {{ .name }}
protocol: {{ .protocol }}
targetPort: {{ .port }}
{{- end }}
selector:
deployment: {{ $dc_name }}
{{- if .Values.clustered }}
---
apiVersion: v1
kind: Service
metadata:
annotations:
description: The JGroups ping port for clustering.
service.alpha.kubernetes.io/tolerate-unready-endpoints: 'true'
labels:
application: {{ $application_name }}
name: {{ tpl .Values.ping_service.name . }}
spec:
clusterIP: None
ports:
- targetPort: {{ .Values.ping_service.port }}
port: {{ .Values.ping_service.port }}
selector:
deployment: {{ $dc_name }}
{{- end }}

View File

@ -0,0 +1,50 @@
{{- if eq .Values.kind "StatefulSet" }}
{{- $svc_name := tpl .Values.templates.service . }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
application: {{ .Values.application.name }}
name: {{ tpl .Values.templates.deployment . }}
{{- if .Values.clustered }}
annotations:
{{- include "drainer.pod" . | nindent 6 }}
{{- end }}
spec:
revisionHistoryLimit: 2
selector:
matchLabels:
application: {{ .Values.application.name }}
{{- if .Values.clustered }}
podManagementPolicy: OrderedReady
replicas: {{ .Values.application.replicas }}
{{- else }}
replicas: 1
{{- end }}
serviceName: {{ $svc_name }}
template:
metadata:
# trigger deployments on config map changes
annotations:
configmap/checksum: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
labels:
application: {{ .Values.application.name }}
deployment: {{ tpl .Values.templates.deployment . }}
app: {{ .Values.application.name }}
name: {{ tpl .Values.templates.deployment . }}
spec:
{{- include "amq.pod" . | nindent 6 }}
{{- if .Values.application.persistent }}
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ tpl .Values.templates.pvc_name . }}
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: {{ .Values.application.volume_capacity }}
storageClassName: "{{ .Values.application.storageclass }}"
{{- end }}
{{- end }}