|
43 | 43 | {{- end }} |
44 | 44 | # Sidecar container for generating .htpasswd with st2 username & password pair and sharing produced file with the main st2auth container |
45 | 45 | initContainers: |
| 46 | + - name: wait-for-db |
| 47 | + image: busybox:1.28 |
| 48 | + command: |
| 49 | + - 'sh' |
| 50 | + - '-c' |
| 51 | + - > |
| 52 | + until nc -z -w 2 {{ .Release.Name }}-mongodb-headless 27017 && echo mongodb ok; |
| 53 | + do sleep 2; |
| 54 | + done |
| 55 | + - name: wait-for-queue |
| 56 | + image: busybox:1.28 |
| 57 | + command: |
| 58 | + - 'sh' |
| 59 | + - '-c' |
| 60 | + - > |
| 61 | + until nc -z -w 2 {{ .Release.Name }}-rabbitmq 5672 && echo rabbitmq ok; |
| 62 | + do sleep 2; |
| 63 | + done |
46 | 64 | - name: generate-htpasswd |
47 | 65 | image: "{{ template "imageRepository" . }}/st2auth{{ template "enterpriseSuffix" . }}:{{ .Chart.AppVersion }}" |
48 | 66 | imagePullPolicy: {{ .Values.image.pullPolicy }} |
@@ -158,8 +176,26 @@ spec: |
158 | 176 | {{- if .Values.image.pullSecret }} |
159 | 177 | - name: {{ .Values.image.pullSecret }} |
160 | 178 | {{- end }} |
161 | | - {{- if .Values.st2.packs.image.repository }} |
162 | 179 | initContainers: |
| 180 | + - name: wait-for-db |
| 181 | + image: busybox:1.28 |
| 182 | + command: |
| 183 | + - 'sh' |
| 184 | + - '-c' |
| 185 | + - > |
| 186 | + until nc -z -w 2 {{ .Release.Name }}-mongodb-headless 27017 && echo mongodb ok; |
| 187 | + do sleep 2; |
| 188 | + done |
| 189 | + - name: wait-for-queue |
| 190 | + image: busybox:1.28 |
| 191 | + command: |
| 192 | + - 'sh' |
| 193 | + - '-c' |
| 194 | + - > |
| 195 | + until nc -z -w 2 {{ .Release.Name }}-rabbitmq 5672 && echo rabbitmq ok; |
| 196 | + do sleep 2; |
| 197 | + done |
| 198 | + {{- if .Values.st2.packs.image.repository }} |
163 | 199 | # Merge packs and virtualenvs from st2api with those from the st2.packs image |
164 | 200 | # Custom packs |
165 | 201 | - name: st2-custom-packs |
@@ -302,6 +338,25 @@ spec: |
302 | 338 | {{- if .Values.image.pullSecret }} |
303 | 339 | - name: {{ .Values.image.pullSecret }} |
304 | 340 | {{- end }} |
| 341 | + initContainers: |
| 342 | + - name: wait-for-db |
| 343 | + image: busybox:1.28 |
| 344 | + command: |
| 345 | + - 'sh' |
| 346 | + - '-c' |
| 347 | + - > |
| 348 | + until nc -z -w 2 {{ .Release.Name }}-mongodb-headless 27017 && echo mongodb ok; |
| 349 | + do sleep 2; |
| 350 | + done |
| 351 | + - name: wait-for-queue |
| 352 | + image: busybox:1.28 |
| 353 | + command: |
| 354 | + - 'sh' |
| 355 | + - '-c' |
| 356 | + - > |
| 357 | + until nc -z -w 2 {{ .Release.Name }}-rabbitmq 5672 && echo rabbitmq ok; |
| 358 | + do sleep 2; |
| 359 | + done |
305 | 360 | containers: |
306 | 361 | - name: st2stream{{ template "enterpriseSuffix" . }} |
307 | 362 | image: "{{ template "imageRepository" . }}/st2stream{{ template "enterpriseSuffix" . }}:{{ .Chart.AppVersion }}" |
@@ -487,6 +542,25 @@ spec: |
487 | 542 | {{- if .Values.image.pullSecret }} |
488 | 543 | - name: {{ .Values.image.pullSecret }} |
489 | 544 | {{- end }} |
| 545 | + initContainers: |
| 546 | + - name: wait-for-db |
| 547 | + image: busybox:1.28 |
| 548 | + command: |
| 549 | + - 'sh' |
| 550 | + - '-c' |
| 551 | + - > |
| 552 | + until nc -z -w 2 {{ .Release.Name }}-mongodb-headless 27017 && echo mongodb ok; |
| 553 | + do sleep 2; |
| 554 | + done |
| 555 | + - name: wait-for-queue |
| 556 | + image: busybox:1.28 |
| 557 | + command: |
| 558 | + - 'sh' |
| 559 | + - '-c' |
| 560 | + - > |
| 561 | + until nc -z -w 2 {{ .Release.Name }}-rabbitmq 5672 && echo rabbitmq ok; |
| 562 | + do sleep 2; |
| 563 | + done |
490 | 564 | containers: |
491 | 565 | - name: st2rulesengine{{ template "enterpriseSuffix" . }} |
492 | 566 | image: "{{ template "imageRepository" . }}/st2rulesengine{{ template "enterpriseSuffix" . }}:{{ .Chart.AppVersion }}" |
@@ -577,6 +651,25 @@ spec: |
577 | 651 | {{- if .Values.image.pullSecret }} |
578 | 652 | - name: {{ .Values.image.pullSecret }} |
579 | 653 | {{- end }} |
| 654 | + initContainers: |
| 655 | + - name: wait-for-db |
| 656 | + image: busybox:1.28 |
| 657 | + command: |
| 658 | + - 'sh' |
| 659 | + - '-c' |
| 660 | + - > |
| 661 | + until nc -z -w 2 {{ .Release.Name }}-mongodb-headless 27017 && echo mongodb ok; |
| 662 | + do sleep 2; |
| 663 | + done |
| 664 | + - name: wait-for-queue |
| 665 | + image: busybox:1.28 |
| 666 | + command: |
| 667 | + - 'sh' |
| 668 | + - '-c' |
| 669 | + - > |
| 670 | + until nc -z -w 2 {{ .Release.Name }}-rabbitmq 5672 && echo rabbitmq ok; |
| 671 | + do sleep 2; |
| 672 | + done |
580 | 673 | containers: |
581 | 674 | - name: st2timersengine{{ template "enterpriseSuffix" . }} |
582 | 675 | image: "{{ template "imageRepository" . }}/st2timersengine{{ template "enterpriseSuffix" . }}:{{ .Chart.AppVersion }}" |
@@ -659,6 +752,25 @@ spec: |
659 | 752 | {{- if .Values.image.pullSecret }} |
660 | 753 | - name: {{ .Values.image.pullSecret }} |
661 | 754 | {{- end }} |
| 755 | + initContainers: |
| 756 | + - name: wait-for-db |
| 757 | + image: busybox:1.28 |
| 758 | + command: |
| 759 | + - 'sh' |
| 760 | + - '-c' |
| 761 | + - > |
| 762 | + until nc -z -w 2 {{ .Release.Name }}-mongodb-headless 27017 && echo mongodb ok; |
| 763 | + do sleep 2; |
| 764 | + done |
| 765 | + - name: wait-for-queue |
| 766 | + image: busybox:1.28 |
| 767 | + command: |
| 768 | + - 'sh' |
| 769 | + - '-c' |
| 770 | + - > |
| 771 | + until nc -z -w 2 {{ .Release.Name }}-rabbitmq 5672 && echo rabbitmq ok; |
| 772 | + do sleep 2; |
| 773 | + done |
662 | 774 | containers: |
663 | 775 | - name: st2workflowengine{{ template "enterpriseSuffix" . }} |
664 | 776 | image: "{{ template "imageRepository" . }}/st2workflowengine{{ template "enterpriseSuffix" . }}:{{ .Chart.AppVersion }}" |
@@ -753,6 +865,25 @@ spec: |
753 | 865 | {{- if .Values.image.pullSecret }} |
754 | 866 | - name: {{ .Values.image.pullSecret }} |
755 | 867 | {{- end }} |
| 868 | + initContainers: |
| 869 | + - name: wait-for-db |
| 870 | + image: busybox:1.28 |
| 871 | + command: |
| 872 | + - 'sh' |
| 873 | + - '-c' |
| 874 | + - > |
| 875 | + until nc -z -w 2 {{ .Release.Name }}-mongodb-headless 27017 && echo mongodb ok; |
| 876 | + do sleep 2; |
| 877 | + done |
| 878 | + - name: wait-for-queue |
| 879 | + image: busybox:1.28 |
| 880 | + command: |
| 881 | + - 'sh' |
| 882 | + - '-c' |
| 883 | + - > |
| 884 | + until nc -z -w 2 {{ .Release.Name }}-rabbitmq 5672 && echo rabbitmq ok; |
| 885 | + do sleep 2; |
| 886 | + done |
756 | 887 | containers: |
757 | 888 | - name: st2scheduler{{ template "enterpriseSuffix" . }} |
758 | 889 | image: "{{ template "imageRepository" . }}/st2scheduler{{ template "enterpriseSuffix" . }}:{{ .Chart.AppVersion }}" |
@@ -847,6 +978,25 @@ spec: |
847 | 978 | {{- if .Values.image.pullSecret }} |
848 | 979 | - name: {{ .Values.image.pullSecret }} |
849 | 980 | {{- end }} |
| 981 | + initContainers: |
| 982 | + - name: wait-for-db |
| 983 | + image: busybox:1.28 |
| 984 | + command: |
| 985 | + - 'sh' |
| 986 | + - '-c' |
| 987 | + - > |
| 988 | + until nc -z -w 2 {{ .Release.Name }}-mongodb-headless 27017 && echo mongodb ok; |
| 989 | + do sleep 2; |
| 990 | + done |
| 991 | + - name: wait-for-queue |
| 992 | + image: busybox:1.28 |
| 993 | + command: |
| 994 | + - 'sh' |
| 995 | + - '-c' |
| 996 | + - > |
| 997 | + until nc -z -w 2 {{ .Release.Name }}-rabbitmq 5672 && echo rabbitmq ok; |
| 998 | + do sleep 2; |
| 999 | + done |
850 | 1000 | containers: |
851 | 1001 | - name: st2notifier{{ template "enterpriseSuffix" . }} |
852 | 1002 | image: "{{ template "imageRepository" . }}/st2notifier{{ template "enterpriseSuffix" . }}:{{ .Chart.AppVersion }}" |
@@ -939,8 +1089,26 @@ spec: |
939 | 1089 | {{- if $.Values.image.pullSecret }} |
940 | 1090 | - name: {{ $.Values.image.pullSecret }} |
941 | 1091 | {{- end }} |
942 | | - {{- if $.Values.st2.packs.image.repository }} |
943 | 1092 | initContainers: |
| 1093 | + - name: wait-for-db |
| 1094 | + image: busybox:1.28 |
| 1095 | + command: |
| 1096 | + - 'sh' |
| 1097 | + - '-c' |
| 1098 | + - > |
| 1099 | + until nc -z -w 2 {{ $.Release.Name }}-mongodb-headless 27017 && echo mongodb ok; |
| 1100 | + do sleep 2; |
| 1101 | + done |
| 1102 | + - name: wait-for-queue |
| 1103 | + image: busybox:1.28 |
| 1104 | + command: |
| 1105 | + - 'sh' |
| 1106 | + - '-c' |
| 1107 | + - > |
| 1108 | + until nc -z -w 2 {{ $.Release.Name }}-rabbitmq 5672 && echo rabbitmq ok; |
| 1109 | + do sleep 2; |
| 1110 | + done |
| 1111 | + {{- if $.Values.st2.packs.image.repository }} |
944 | 1112 | # Merge packs and virtualenvs from st2sensorcontainer with those from the st2.packs image |
945 | 1113 | # Custom packs |
946 | 1114 | - name: st2-custom-packs |
@@ -1108,8 +1276,26 @@ spec: |
1108 | 1276 | {{- if .Values.image.pullSecret }} |
1109 | 1277 | - name: {{ .Values.image.pullSecret }} |
1110 | 1278 | {{- end }} |
1111 | | - {{- if .Values.st2.packs.image.repository }} |
1112 | 1279 | initContainers: |
| 1280 | + - name: wait-for-db |
| 1281 | + image: busybox:1.28 |
| 1282 | + command: |
| 1283 | + - 'sh' |
| 1284 | + - '-c' |
| 1285 | + - > |
| 1286 | + until nc -z -w 2 {{ .Release.Name }}-mongodb-headless 27017 && echo mongodb ok; |
| 1287 | + do sleep 2; |
| 1288 | + done |
| 1289 | + - name: wait-for-queue |
| 1290 | + image: busybox:1.28 |
| 1291 | + command: |
| 1292 | + - 'sh' |
| 1293 | + - '-c' |
| 1294 | + - > |
| 1295 | + until nc -z -w 2 {{ .Release.Name }}-rabbitmq 5672 && echo rabbitmq ok; |
| 1296 | + do sleep 2; |
| 1297 | + done |
| 1298 | + {{- if .Values.st2.packs.image.repository }} |
1113 | 1299 | # Merge packs and virtualenvs from st2actionrunner with those from the st2.packs image |
1114 | 1300 | # Custom packs |
1115 | 1301 | - name: st2-custom-packs |
@@ -1259,6 +1445,25 @@ spec: |
1259 | 1445 | {{- if .Values.image.pullSecret }} |
1260 | 1446 | - name: {{ .Values.image.pullSecret }} |
1261 | 1447 | {{- end }} |
| 1448 | + initContainers: |
| 1449 | + - name: wait-for-db |
| 1450 | + image: busybox:1.28 |
| 1451 | + command: |
| 1452 | + - 'sh' |
| 1453 | + - '-c' |
| 1454 | + - > |
| 1455 | + until nc -z -w 2 {{ .Release.Name }}-mongodb-headless 27017 && echo mongodb ok; |
| 1456 | + do sleep 2; |
| 1457 | + done |
| 1458 | + - name: wait-for-queue |
| 1459 | + image: busybox:1.28 |
| 1460 | + command: |
| 1461 | + - 'sh' |
| 1462 | + - '-c' |
| 1463 | + - > |
| 1464 | + until nc -z -w 2 {{ .Release.Name }}-rabbitmq 5672 && echo rabbitmq ok; |
| 1465 | + do sleep 2; |
| 1466 | + done |
1262 | 1467 | containers: |
1263 | 1468 | - name: st2garbagecollector{{ template "enterpriseSuffix" . }} |
1264 | 1469 | image: "{{ template "imageRepository" . }}/st2garbagecollector{{ template "enterpriseSuffix" . }}:{{ .Chart.AppVersion }}" |
@@ -1349,6 +1554,24 @@ spec: |
1349 | 1554 | - name: {{ .Values.image.pullSecret }} |
1350 | 1555 | {{- end }} |
1351 | 1556 | initContainers: |
| 1557 | + - name: wait-for-db |
| 1558 | + image: busybox:1.28 |
| 1559 | + command: |
| 1560 | + - 'sh' |
| 1561 | + - '-c' |
| 1562 | + - > |
| 1563 | + until nc -z -w 2 {{ .Release.Name }}-mongodb-headless 27017 && echo mongodb ok; |
| 1564 | + do sleep 2; |
| 1565 | + done |
| 1566 | + - name: wait-for-queue |
| 1567 | + image: busybox:1.28 |
| 1568 | + command: |
| 1569 | + - 'sh' |
| 1570 | + - '-c' |
| 1571 | + - > |
| 1572 | + until nc -z -w 2 {{ .Release.Name }}-rabbitmq 5672 && echo rabbitmq ok; |
| 1573 | + do sleep 2; |
| 1574 | + done |
1352 | 1575 | {{- if .Values.st2.packs.image.repository }} |
1353 | 1576 | # Merge packs and virtualenvs from st2actionrunner with those from the st2.packs image |
1354 | 1577 | # Custom packs |
|
0 commit comments