From 4963e1448e733ce81c6a39667477975ee5bf7414 Mon Sep 17 00:00:00 2001 From: bingwei-hong-partior Date: Fri, 25 Nov 2022 08:38:49 +0000 Subject: [PATCH 1/5] fix helpers.tpl breaks due to mongodb not enabled Signed-off-by: bingwei-hong-partior --- charts/litmus/Chart.yaml | 2 +- charts/litmus/README.md | 2 +- charts/litmus/templates/_helpers.tpl | 10 +++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/charts/litmus/Chart.yaml b/charts/litmus/Chart.yaml index 01e79b12..da04856c 100644 --- a/charts/litmus/Chart.yaml +++ b/charts/litmus/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "2.14.0" description: A Helm chart to install ChaosCenter name: litmus -version: 2.15.1 +version: 2.15.2 kubeVersion: ">=1.16.0-0" home: https://litmuschaos.io sources: diff --git a/charts/litmus/README.md b/charts/litmus/README.md index 9ac5ca65..976aaab9 100644 --- a/charts/litmus/README.md +++ b/charts/litmus/README.md @@ -1,6 +1,6 @@ # litmus -![Version: 2.15.1](https://img.shields.io/badge/Version-2.15.1-informational?style=flat-square) ![AppVersion: 2.14.0](https://img.shields.io/badge/AppVersion-2.14.0-informational?style=flat-square) +![Version: 2.15.2](https://img.shields.io/badge/Version-2.15.2-informational?style=flat-square) ![AppVersion: 2.14.0](https://img.shields.io/badge/AppVersion-2.14.0-informational?style=flat-square) A Helm chart to install ChaosCenter diff --git a/charts/litmus/templates/_helpers.tpl b/charts/litmus/templates/_helpers.tpl index 66d9f60b..6b5e1899 100644 --- a/charts/litmus/templates/_helpers.tpl +++ b/charts/litmus/templates/_helpers.tpl @@ -79,9 +79,13 @@ Check for existing secret {{- end -}} {{- define "litmus-portal.mongodbServiceName" -}} - {{- if not (eq .Values.mongodb.architecture "replicaset") }} - {{- include "mongodb.fullname" .Subcharts.mongodb -}} + {{- if not .Values.mongodb.enabled }} + {{- .Values.adminConfig.DB_SERVER -}} {{ else }} - {{- include "mongodb.service.nameOverride" .Subcharts.mongodb -}} + {{- if not (eq .Values.mongodb.architecture "replicaset") }} + {{- include "mongodb.fullname" .Subcharts.mongodb -}} + {{ else }} + {{- include "mongodb.service.nameOverride" .Subcharts.mongodb -}} + {{- end -}} {{- end -}} {{- end -}} From 331378ea0a2ed8d80e8146691115af27685a4f61 Mon Sep 17 00:00:00 2001 From: bingwei-hong-partior Date: Fri, 25 Nov 2022 09:23:04 +0000 Subject: [PATCH 2/5] fix breaks when external mongodb is used Signed-off-by: bingwei-hong-partior --- charts/litmus/templates/auth-server-deployment.yaml | 4 ++++ charts/litmus/templates/server-deployment.yaml | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/charts/litmus/templates/auth-server-deployment.yaml b/charts/litmus/templates/auth-server-deployment.yaml index f6132d38..70b0bb77 100644 --- a/charts/litmus/templates/auth-server-deployment.yaml +++ b/charts/litmus/templates/auth-server-deployment.yaml @@ -42,7 +42,11 @@ spec: command: ["/bin/sh", "-c"] args: [ + {{- if .Values.mongodb.enabled }} "while [[ $(curl -sw '%{http_code}' http://{{ include "litmus-portal.mongodbServiceName" . }}:{{ .Values.mongodb.service.ports.mongodb }} -o /dev/null) -ne 200 ]]; do sleep 5; echo 'Waiting for the MongoDB to be ready...'; done; echo 'Connection with MongoDB established'", + {{- else }} + "while [[ $(curl -sw '%{http_code}' http://{{ include "litmus-portal.mongodbServiceName" . }}:{{ .Values.adminConfig.DB_PORT }} -o /dev/null) -ne 200 ]]; do sleep 5; echo 'Waiting for the MongoDB to be ready...'; done; echo 'Connection with MongoDB established'", + {{- end }} ] resources: {{- toYaml .Values.portal.server.waitForMongodb.resources | nindent 12 }} diff --git a/charts/litmus/templates/server-deployment.yaml b/charts/litmus/templates/server-deployment.yaml index 041d5eb9..3c165284 100644 --- a/charts/litmus/templates/server-deployment.yaml +++ b/charts/litmus/templates/server-deployment.yaml @@ -39,9 +39,13 @@ spec: image: {{ .Values.image.imageRegistryName }}/{{ .Values.portal.server.waitForMongodb.image.repository }}:{{ .Values.portal.server.waitForMongodb.image.tag }} imagePullPolicy: {{ .Values.portal.server.waitForMongodb.image.pullPolicy }} command: ["/bin/sh", "-c"] - args: + args: [ + {{- if .Values.mongodb.enabled }} "while [[ $(curl -sw '%{http_code}' http://{{ include "litmus-portal.mongodbServiceName" . }}:{{ .Values.mongodb.service.ports.mongodb }} -o /dev/null) -ne 200 ]]; do sleep 5; echo 'Waiting for the MongoDB to be ready...'; done; echo 'Connection with MongoDB established'", + {{- else }} + "while [[ $(curl -sw '%{http_code}' http://{{ include "litmus-portal.mongodbServiceName" . }}:{{ .Values.adminConfig.DB_PORT }} -o /dev/null) -ne 200 ]]; do sleep 5; echo 'Waiting for the MongoDB to be ready...'; done; echo 'Connection with MongoDB established'", + {{- end }} ] resources: {{- toYaml .Values.portal.server.waitForMongodb.resources | nindent 12 }} From 70bd0e570cef3c2c76158e34cf88d5112f054a21 Mon Sep 17 00:00:00 2001 From: bingwei-hong-partior Date: Mon, 28 Nov 2022 03:20:19 +0000 Subject: [PATCH 3/5] remove blank space accidentally added Signed-off-by: bingwei-hong-partior --- charts/litmus/templates/server-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/litmus/templates/server-deployment.yaml b/charts/litmus/templates/server-deployment.yaml index 3c165284..fe5a28ac 100644 --- a/charts/litmus/templates/server-deployment.yaml +++ b/charts/litmus/templates/server-deployment.yaml @@ -39,7 +39,7 @@ spec: image: {{ .Values.image.imageRegistryName }}/{{ .Values.portal.server.waitForMongodb.image.repository }}:{{ .Values.portal.server.waitForMongodb.image.tag }} imagePullPolicy: {{ .Values.portal.server.waitForMongodb.image.pullPolicy }} command: ["/bin/sh", "-c"] - args: + args: [ {{- if .Values.mongodb.enabled }} "while [[ $(curl -sw '%{http_code}' http://{{ include "litmus-portal.mongodbServiceName" . }}:{{ .Values.mongodb.service.ports.mongodb }} -o /dev/null) -ne 200 ]]; do sleep 5; echo 'Waiting for the MongoDB to be ready...'; done; echo 'Connection with MongoDB established'", From df0fd6aeef4d1dac363d1a66226b0b68bb736723 Mon Sep 17 00:00:00 2001 From: bingwei-hong-partior Date: Tue, 13 Dec 2022 02:46:00 +0000 Subject: [PATCH 4/5] bump chart version to latest Signed-off-by: bingwei-hong-partior --- charts/litmus/Chart.yaml | 2 +- charts/litmus/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/litmus/Chart.yaml b/charts/litmus/Chart.yaml index da04856c..74de28d6 100644 --- a/charts/litmus/Chart.yaml +++ b/charts/litmus/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "2.14.0" description: A Helm chart to install ChaosCenter name: litmus -version: 2.15.2 +version: 2.15.3 kubeVersion: ">=1.16.0-0" home: https://litmuschaos.io sources: diff --git a/charts/litmus/README.md b/charts/litmus/README.md index 976aaab9..c6554fab 100644 --- a/charts/litmus/README.md +++ b/charts/litmus/README.md @@ -1,6 +1,6 @@ # litmus -![Version: 2.15.2](https://img.shields.io/badge/Version-2.15.2-informational?style=flat-square) ![AppVersion: 2.14.0](https://img.shields.io/badge/AppVersion-2.14.0-informational?style=flat-square) +![Version: 2.15.3](https://img.shields.io/badge/Version-2.15.3-informational?style=flat-square) ![AppVersion: 2.14.0](https://img.shields.io/badge/AppVersion-2.14.0-informational?style=flat-square) A Helm chart to install ChaosCenter From 8274c338e1dbd2254696f2404594ed40ad9c478e Mon Sep 17 00:00:00 2001 From: Maria Kotlyarevskaya Date: Wed, 15 Feb 2023 19:27:42 +0100 Subject: [PATCH 5/5] fix readme Signed-off-by: Maria Kotlyarevskaya --- charts/litmus/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/litmus/README.md b/charts/litmus/README.md index 6c007c9e..b12b1964 100644 --- a/charts/litmus/README.md +++ b/charts/litmus/README.md @@ -1,6 +1,5 @@ # litmus - ![Version: 2.15.11](https://img.shields.io/badge/Version-2.15.11-informational?style=flat-square) ![AppVersion: 2.14.0](https://img.shields.io/badge/AppVersion-2.14.0-informational?style=flat-square) A Helm chart to install ChaosCenter