Skip to content

Commit 992a920

Browse files
authored
Merge pull request #85 from stfc/wait_for_sidecar
Rabbit consumers - wait for sidecar
2 parents 93d58a4 + 3c02443 commit 992a920

File tree

2 files changed

+47
-27
lines changed

2 files changed

+47
-27
lines changed

charts/rabbit-consumer/Chart.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ type: application
66
# This is the chart version. This version number should be incremented each time you make changes
77
# to the chart and its templates, including the app version.
88
# Versions are expected to follow Semantic Versioning (https://semver.org/)
9-
version: 1.4.4
9+
version: 1.5.0
1010

1111
# This is the version number of the application being deployed. This version number should be
1212
# incremented each time you make changes to the application. Versions are not expected to
1313
# follow Semantic Versioning. They should reflect the version the application is using.
1414
# It is recommended to use it with quotes.
1515
appVersion: "v2.3.4"
16-

charts/rabbit-consumer/templates/deployment.yaml

Lines changed: 46 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,37 @@ spec:
2020
app: rabbit-consumer
2121
spec:
2222
containers:
23-
- name: consumer
24-
25-
image: "{{ .Values.consumer.image.repository }}:{{ default .Chart.AppVersion .Values.consumer.image.tag }}"
26-
imagePullPolicy: {{ .Values.consumer.image.pullPolicy }}
27-
28-
envFrom:
29-
- configMapRef:
30-
name: {{ .Release.Name }}-consumer-env
31-
- configMapRef:
32-
name: {{ .Release.Name }}-kerberos-env
33-
- secretRef:
34-
name: {{ .Values.consumer.rabbitmq.secretRef }}
35-
- secretRef:
36-
name: {{ .Values.consumer.openstack.secretRef }}
37-
38-
volumeMounts:
39-
- name: shared
40-
mountPath: /shared
41-
- name: kerberos-conf-files
42-
mountPath: /etc/krb5.conf
43-
subPath: krb5.conf
44-
- name: trusted-certs
45-
mountPath: /etc/grid-security/certificates
46-
4723
- name: kerberos
4824
image: "{{ .Values.kerberosSidecar.image.repository }}:{{ .Values.kerberosSidecar.image.tag }}"
4925
command: ["/bin/sh", "-c", "/etc/entrypoints.d/sidecar-entrypoint.sh"]
5026
imagePullPolicy: Always
51-
5227
envFrom:
5328
- configMapRef:
5429
name: {{ .Release.Name }}-kerberos-env
30+
lifecycle:
31+
postStart:
32+
exec:
33+
command: ["/bin/sh", "-c", "while [ ! -f /shared/krb5cc ]; do sleep 1; done"]
34+
35+
startupProbe:
36+
exec:
37+
command:
38+
- /bin/sh
39+
- -c
40+
- klist -s
41+
initialDelaySeconds: 10
42+
periodSeconds: 10
43+
failureThreshold: 3
44+
45+
livenessProbe:
46+
exec:
47+
command:
48+
- /bin/sh
49+
- -c
50+
- klist -s
51+
initialDelaySeconds: 10
52+
periodSeconds: 10
53+
failureThreshold: 3
5554

5655
volumeMounts:
5756
- name: entrypoints
@@ -66,6 +65,28 @@ spec:
6665
mountPath: /etc/krb5.keytab
6766
subPath: krb5.keytab
6867
readOnly: true
68+
69+
- name: consumer
70+
image: "{{ .Values.consumer.image.repository }}:{{ default .Chart.AppVersion .Values.consumer.image.tag }}"
71+
imagePullPolicy: {{ .Values.consumer.image.pullPolicy }}
72+
envFrom:
73+
- configMapRef:
74+
name: {{ .Release.Name }}-consumer-env
75+
- configMapRef:
76+
name: {{ .Release.Name }}-kerberos-env
77+
- secretRef:
78+
name: {{ .Values.consumer.rabbitmq.secretRef }}
79+
- secretRef:
80+
name: {{ .Values.consumer.openstack.secretRef }}
81+
82+
volumeMounts:
83+
- name: shared
84+
mountPath: /shared
85+
- name: kerberos-conf-files
86+
mountPath: /etc/krb5.conf
87+
subPath: krb5.conf
88+
- name: trusted-certs
89+
mountPath: /etc/grid-security/certificates
6990

7091
hostAliases:
7192
# Logon 04

0 commit comments

Comments
 (0)