From ea57d92e47de07b313c380d40607c7326d6a6fdb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=B6ran=20P=C3=B6hner?=
 <10630407+groundhog2k@users.noreply.github.com>
Date: Sat, 22 Jan 2022 08:30:25 +0100
Subject: [PATCH] Services refuse to chart due to bug in new startupProbe
 (#822)

---
 charts/commento/Chart.yaml                      | 2 +-
 charts/commento/README.md                       | 2 +-
 charts/commento/templates/deployment.yaml       | 6 +++++-
 charts/elasticsearch/Chart.yaml                 | 4 ++--
 charts/elasticsearch/README.md                  | 2 +-
 charts/elasticsearch/RELEASENOTES.md            | 1 +
 charts/elasticsearch/templates/statefulset.yaml | 6 +++++-
 charts/ghost/Chart.yaml                         | 2 +-
 charts/ghost/README.md                          | 2 +-
 charts/ghost/RELEASENOTES.md                    | 1 +
 charts/ghost/templates/deployment.yaml          | 6 +++++-
 charts/graylog/Chart.yaml                       | 2 +-
 charts/graylog/README.md                        | 2 +-
 charts/graylog/RELEASENOTES.md                  | 1 +
 charts/graylog/templates/statefulset.yaml       | 6 +++++-
 charts/rabbitmq/Chart.yaml                      | 4 ++--
 charts/rabbitmq/README.md                       | 2 +-
 charts/rabbitmq/RELEASENOTES.md                 | 1 +
 charts/rabbitmq/templates/statefulset.yaml      | 7 +++++--
 19 files changed, 41 insertions(+), 18 deletions(-)

diff --git a/charts/commento/Chart.yaml b/charts/commento/Chart.yaml
index 88079029..0227b489 100644
--- a/charts/commento/Chart.yaml
+++ b/charts/commento/Chart.yaml
@@ -7,7 +7,7 @@ type: application
 maintainers:
   - name: groundhog2k
 
-version: 0.1.21
+version: 0.1.22
 
 appVersion: "v1.8.0"
 
diff --git a/charts/commento/README.md b/charts/commento/README.md
index d7312ca7..00c2325d 100644
--- a/charts/commento/README.md
+++ b/charts/commento/README.md
@@ -1,6 +1,6 @@
 # Commento
 
-![Version: 0.1.21](https://img.shields.io/badge/Version-0.1.21-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.8.0](https://img.shields.io/badge/AppVersion-v1.8.0-informational?style=flat-square)
+![Version: 0.1.22](https://img.shields.io/badge/Version-0.1.22-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.8.0](https://img.shields.io/badge/AppVersion-v1.8.0-informational?style=flat-square)
 
 ## Changelog
 
diff --git a/charts/commento/templates/deployment.yaml b/charts/commento/templates/deployment.yaml
index f70e0d15..ff8d0eb9 100644
--- a/charts/commento/templates/deployment.yaml
+++ b/charts/commento/templates/deployment.yaml
@@ -53,8 +53,12 @@ spec:
           {{- else }}
           {{- if .Values.startupProbe.enabled }}
           startupProbe:
-            tcpSocket:
+            httpGet:
+              path: /
               port: http
+              httpHeaders:
+                - name: Host
+                  value: localhost:{{ .Values.containerPort  }}
           {{- with .Values.startupProbe }}
             initialDelaySeconds: {{ .initialDelaySeconds }}
             timeoutSeconds: {{ .timeoutSeconds }}
diff --git a/charts/elasticsearch/Chart.yaml b/charts/elasticsearch/Chart.yaml
index 82ef0780..7be2f969 100644
--- a/charts/elasticsearch/Chart.yaml
+++ b/charts/elasticsearch/Chart.yaml
@@ -7,6 +7,6 @@ type: application
 maintainers:
   - name: groundhog2k
 
-version: 0.6.5
+version: 0.0.5
 
-appVersion: 7.16.3
+appVersion: 6.8.23
diff --git a/charts/elasticsearch/README.md b/charts/elasticsearch/README.md
index cf19ecc3..0f9fba1c 100644
--- a/charts/elasticsearch/README.md
+++ b/charts/elasticsearch/README.md
@@ -1,6 +1,6 @@
 # Elasticsearch
 
-![Version: 0.6.5](https://img.shields.io/badge/Version-0.6.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 7.16.3](https://img.shields.io/badge/AppVersion-7.16.3-informational?style=flat-square)
+![Version: 0.0.5](https://img.shields.io/badge/Version-0.0.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 6.8.23](https://img.shields.io/badge/AppVersion-6.8.23-informational?style=flat-square)
 
 ## Changelog
 
diff --git a/charts/elasticsearch/RELEASENOTES.md b/charts/elasticsearch/RELEASENOTES.md
index fb78b0c6..16f602d1 100644
--- a/charts/elasticsearch/RELEASENOTES.md
+++ b/charts/elasticsearch/RELEASENOTES.md
@@ -3,6 +3,7 @@
 | Chart version | App version | Change description |
 | :------------ | :---------- | :----------------- |
 | 0.0.4 | 6.8.23 | Fixed ingress API detection<br>Implemented startupProbe support |
+| 0.0.5 | 6.8.23 | Fixed startupProbe |
 | 0.1.105 | 7.10.2 | Fixed ingress API detection<br>Implemented startupProbe support |
 | 0.6.5 | 7.16.3 | Fixed ingress API detection<br>Implemented startupProbe support |
 | | | |
diff --git a/charts/elasticsearch/templates/statefulset.yaml b/charts/elasticsearch/templates/statefulset.yaml
index b13dbc40..ff341755 100644
--- a/charts/elasticsearch/templates/statefulset.yaml
+++ b/charts/elasticsearch/templates/statefulset.yaml
@@ -76,8 +76,12 @@ spec:
           {{- else }}
           {{- if .Values.startupProbe.enabled }}
           startupProbe:
-            tcpSocket:
+            httpGet:
+              path: /
               port: http
+              httpHeaders:
+                - name: Host
+                  value: localhost:9200
           {{- with .Values.startupProbe }}
             initialDelaySeconds: {{ .initialDelaySeconds }}
             timeoutSeconds: {{ .timeoutSeconds }}
diff --git a/charts/ghost/Chart.yaml b/charts/ghost/Chart.yaml
index 89d8f9dd..13e42123 100644
--- a/charts/ghost/Chart.yaml
+++ b/charts/ghost/Chart.yaml
@@ -7,7 +7,7 @@ type: application
 maintainers:
   - name: groundhog2k
 
-version: 0.33.5
+version: 0.33.6
 
 appVersion: "4.32.3"
 
diff --git a/charts/ghost/README.md b/charts/ghost/README.md
index c1890052..86edd313 100644
--- a/charts/ghost/README.md
+++ b/charts/ghost/README.md
@@ -1,6 +1,6 @@
 # Ghost
 
-![Version: 0.33.5](https://img.shields.io/badge/Version-0.33.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.32.3](https://img.shields.io/badge/AppVersion-4.32.3-informational?style=flat-square)
+![Version: 0.33.6](https://img.shields.io/badge/Version-0.33.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.32.3](https://img.shields.io/badge/AppVersion-4.32.3-informational?style=flat-square)
 
 ## Changelog
 
diff --git a/charts/ghost/RELEASENOTES.md b/charts/ghost/RELEASENOTES.md
index f4b0c8fb..7000a90e 100644
--- a/charts/ghost/RELEASENOTES.md
+++ b/charts/ghost/RELEASENOTES.md
@@ -4,4 +4,5 @@
 | :------------ | :---------- | :----------------- |
 | 0.33.4 | 4.32.2 | Fixed ingress API detection<br>Implemented startupProbe support |
 | 0.33.5 | 4.32.3 | Upgraded to Ghost 4.32.3 |
+| 0.33.6 | 4.32.3 | Fixed startupProbe |
 | | | |
diff --git a/charts/ghost/templates/deployment.yaml b/charts/ghost/templates/deployment.yaml
index 899c8ab9..9cf6f694 100644
--- a/charts/ghost/templates/deployment.yaml
+++ b/charts/ghost/templates/deployment.yaml
@@ -102,8 +102,12 @@ spec:
           {{- else }}
           {{- if .Values.startupProbe.enabled }}
           startupProbe:
-            tcpSocket:
+            httpGet:
+              path: /
               port: http
+              httpHeaders:
+                - name: Host
+                  value: localhost:2368
           {{- with .Values.startupProbe }}
             initialDelaySeconds: {{ .initialDelaySeconds }}
             timeoutSeconds: {{ .timeoutSeconds }}
diff --git a/charts/graylog/Chart.yaml b/charts/graylog/Chart.yaml
index 7780f030..a875aada 100644
--- a/charts/graylog/Chart.yaml
+++ b/charts/graylog/Chart.yaml
@@ -7,7 +7,7 @@ type: application
 maintainers:
   - name: groundhog2k
 
-version: 0.3.8
+version: 0.3.9
 
 appVersion: "4.2.5-jre11"
 
diff --git a/charts/graylog/README.md b/charts/graylog/README.md
index ab9ec370..73a1809c 100644
--- a/charts/graylog/README.md
+++ b/charts/graylog/README.md
@@ -1,6 +1,6 @@
 # Graylog
 
-![Version: 0.3.8](https://img.shields.io/badge/Version-0.3.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.2.5](https://img.shields.io/badge/AppVersion-4.2.5-informational?style=flat-square)
+![Version: 0.3.9](https://img.shields.io/badge/Version-0.3.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.2.5](https://img.shields.io/badge/AppVersion-4.2.5-informational?style=flat-square)
 
 ## Changelog
 
diff --git a/charts/graylog/RELEASENOTES.md b/charts/graylog/RELEASENOTES.md
index 8f2c5af8..e8dd93fc 100644
--- a/charts/graylog/RELEASENOTES.md
+++ b/charts/graylog/RELEASENOTES.md
@@ -3,4 +3,5 @@
 | Chart version | App version | Change description |
 | :------------ | :---------- | :----------------- |
 | 0.3.8 | 4.2.5-jre11 | Fixed ingress API detection<br>Implemented startupProbe support |
+| 0.3.9 | 4.2.5-jre11 | Fixed startupProbe |
 | | | |
diff --git a/charts/graylog/templates/statefulset.yaml b/charts/graylog/templates/statefulset.yaml
index 00aa126a..cb5c55df 100644
--- a/charts/graylog/templates/statefulset.yaml
+++ b/charts/graylog/templates/statefulset.yaml
@@ -101,8 +101,12 @@ spec:
           {{- else }}
           {{- if .Values.startupProbe.enabled }}
           startupProbe:
-            tcpSocket:
+            httpGet:
+              path: /api/system/lbstatus
               port: http
+              httpHeaders:
+                - name: Host
+                  value: localhost:9000
           {{- with .Values.startupProbe }}
             initialDelaySeconds: {{ .initialDelaySeconds }}
             timeoutSeconds: {{ .timeoutSeconds }}
diff --git a/charts/rabbitmq/Chart.yaml b/charts/rabbitmq/Chart.yaml
index 2e078f72..36c8db1d 100644
--- a/charts/rabbitmq/Chart.yaml
+++ b/charts/rabbitmq/Chart.yaml
@@ -7,6 +7,6 @@ type: application
 maintainers:
   - name: groundhog2k
 
-version: 0.4.8
+version: 0.3.14
 
-appVersion: "3.9.13"
+appVersion: "3.8.27"
diff --git a/charts/rabbitmq/README.md b/charts/rabbitmq/README.md
index 154c3e63..6a00db00 100644
--- a/charts/rabbitmq/README.md
+++ b/charts/rabbitmq/README.md
@@ -1,6 +1,6 @@
 # RabbitMQ
 
-![Version: 0.4.8](https://img.shields.io/badge/Version-0.4.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.9.13](https://img.shields.io/badge/AppVersion-3.9.13-informational?style=flat-square)
+![Version: 0.3.14](https://img.shields.io/badge/Version-0.3.14-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.8.27](https://img.shields.io/badge/AppVersion-3.8.27-informational?style=flat-square)
 
 ## Changelog
 
diff --git a/charts/rabbitmq/RELEASENOTES.md b/charts/rabbitmq/RELEASENOTES.md
index e634317e..a98bdc4d 100644
--- a/charts/rabbitmq/RELEASENOTES.md
+++ b/charts/rabbitmq/RELEASENOTES.md
@@ -3,5 +3,6 @@
 | Chart version | App version | Change description |
 | :------------ | :---------- | :----------------- |
 | 0.3.13 | 3.8.27 | Fixed ingress API detection<br>Implemented startupProbe support |
+| 0.3.14 | 3.8.27 | Fixed startupProbe |
 | 0.4.8 | 3.9.13 | Upgraded to RabbitMQ 3.9.13<br>Fixed ingress API detection<br>Implemented startupProbe support |
 | | | |
diff --git a/charts/rabbitmq/templates/statefulset.yaml b/charts/rabbitmq/templates/statefulset.yaml
index 0ab83a63..ae6559f0 100644
--- a/charts/rabbitmq/templates/statefulset.yaml
+++ b/charts/rabbitmq/templates/statefulset.yaml
@@ -99,8 +99,11 @@ spec:
           {{- else }}
           {{- if .Values.startupProbe.enabled }}
           startupProbe:
-            tcpSocket:
-              port: http
+            exec:
+              command:
+                - /bin/bash
+                - -ec
+                - rabbitmq-diagnostics -q check_running
           {{- with .Values.startupProbe }}
             initialDelaySeconds: {{ .initialDelaySeconds }}
             timeoutSeconds: {{ .timeoutSeconds }}
-- 
GitLab