Skip to content

Commit

Permalink
Merge pull request #85 from stfc/wait_for_sidecar
Browse files Browse the repository at this point in the history
Rabbit consumers - wait for sidecar
  • Loading branch information
meoflynn authored Jul 6, 2023
2 parents 93d58a4 + 3c02443 commit 992a920
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 27 deletions.
3 changes: 1 addition & 2 deletions charts/rabbit-consumer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ 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: 1.4.4
version: 1.5.0

# 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
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v2.3.4"

71 changes: 46 additions & 25 deletions charts/rabbit-consumer/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,37 @@ spec:
app: rabbit-consumer
spec:
containers:
- name: consumer

image: "{{ .Values.consumer.image.repository }}:{{ default .Chart.AppVersion .Values.consumer.image.tag }}"
imagePullPolicy: {{ .Values.consumer.image.pullPolicy }}

envFrom:
- configMapRef:
name: {{ .Release.Name }}-consumer-env
- configMapRef:
name: {{ .Release.Name }}-kerberos-env
- secretRef:
name: {{ .Values.consumer.rabbitmq.secretRef }}
- secretRef:
name: {{ .Values.consumer.openstack.secretRef }}

volumeMounts:
- name: shared
mountPath: /shared
- name: kerberos-conf-files
mountPath: /etc/krb5.conf
subPath: krb5.conf
- name: trusted-certs
mountPath: /etc/grid-security/certificates

- name: kerberos
image: "{{ .Values.kerberosSidecar.image.repository }}:{{ .Values.kerberosSidecar.image.tag }}"
command: ["/bin/sh", "-c", "/etc/entrypoints.d/sidecar-entrypoint.sh"]
imagePullPolicy: Always

envFrom:
- configMapRef:
name: {{ .Release.Name }}-kerberos-env
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "while [ ! -f /shared/krb5cc ]; do sleep 1; done"]

startupProbe:
exec:
command:
- /bin/sh
- -c
- klist -s
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 3

livenessProbe:
exec:
command:
- /bin/sh
- -c
- klist -s
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 3

volumeMounts:
- name: entrypoints
Expand All @@ -66,6 +65,28 @@ spec:
mountPath: /etc/krb5.keytab
subPath: krb5.keytab
readOnly: true

- name: consumer
image: "{{ .Values.consumer.image.repository }}:{{ default .Chart.AppVersion .Values.consumer.image.tag }}"
imagePullPolicy: {{ .Values.consumer.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ .Release.Name }}-consumer-env
- configMapRef:
name: {{ .Release.Name }}-kerberos-env
- secretRef:
name: {{ .Values.consumer.rabbitmq.secretRef }}
- secretRef:
name: {{ .Values.consumer.openstack.secretRef }}

volumeMounts:
- name: shared
mountPath: /shared
- name: kerberos-conf-files
mountPath: /etc/krb5.conf
subPath: krb5.conf
- name: trusted-certs
mountPath: /etc/grid-security/certificates

hostAliases:
# Logon 04
Expand Down

0 comments on commit 992a920

Please sign in to comment.