From bdd5d9442e07010fa6b95477ac9128532a8872f5 Mon Sep 17 00:00:00 2001 From: Tigran Muradyan Date: Fri, 29 Apr 2022 14:11:46 +0400 Subject: [PATCH] DMVP-129 have option to disable service/test-wget-pod --- charts/base/Chart.yaml | 4 ++-- charts/base/README.md | 12 ++++++------ charts/base/templates/service.yaml | 2 ++ charts/base/templates/tests/test-connection.yaml | 2 ++ charts/base/values.yaml | 1 + 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/charts/base/Chart.yaml b/charts/base/Chart.yaml index de59fbf..368d0db 100644 --- a/charts/base/Chart.yaml +++ b/charts/base/Chart.yaml @@ -15,10 +15,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: 0.1.24 +version: 0.1.25 # 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: "0.1.24" +appVersion: "0.1.25" diff --git a/charts/base/README.md b/charts/base/README.md index dbf4666..d513b9b 100644 --- a/charts/base/README.md +++ b/charts/base/README.md @@ -1,7 +1,7 @@ ``` dependencies: - name: base - version: 0.1.24 + version: 0.1.25 repository: https://dasmeta.github.io/helm ``` @@ -94,9 +94,9 @@ Here are 2 examples about this: **Alias is not specified, name, version and appVersion are not overridden by parent chart** In this case, labels will be like this:** -- `helm.sh/chart: base-0.1.24` +- `helm.sh/chart: base-0.1.25` - `app.kubernetes.io/name: base` -- `app.kubernetes.io/version: 0.1.24` +- `app.kubernetes.io/version: 0.1.25` Chart.yaml ``` @@ -109,7 +109,7 @@ appVersion: "0.1.0" dependencies: - name: base - version: 0.1.24 + version: 0.1.25 repository: https://dasmeta.github.io/helm ``` @@ -145,7 +145,7 @@ appVersion: "0.1.0" dependencies: - name: base - version: 0.1.24 + version: 0.1.25 repository: https://dasmeta.github.io/helm alias: my-app-base ``` @@ -173,7 +173,7 @@ appVersion: "0.1.0" dependencies: - name: base - version: 0.1.24 + version: 0.1.25 repository: https://dasmeta.github.io/helm ``` diff --git a/charts/base/templates/service.yaml b/charts/base/templates/service.yaml index 4bb0b3b..741a007 100644 --- a/charts/base/templates/service.yaml +++ b/charts/base/templates/service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.service.enabled -}} apiVersion: v1 kind: Service metadata: @@ -13,3 +14,4 @@ spec: name: {{ .Values.service.name }} selector: {{- include "base.selectorLabels" . | nindent 4 }} +{{- end }} diff --git a/charts/base/templates/tests/test-connection.yaml b/charts/base/templates/tests/test-connection.yaml index 67f30b8..fcaf6ba 100644 --- a/charts/base/templates/tests/test-connection.yaml +++ b/charts/base/templates/tests/test-connection.yaml @@ -1,3 +1,4 @@ +{{- if .Values.service.enabled -}} apiVersion: v1 kind: Pod metadata: @@ -13,3 +14,4 @@ spec: command: ['wget'] args: ['{{ include "base.fullname" . }}:{{ .Values.service.port }}'] restartPolicy: OnFailure +{{- end }} diff --git a/charts/base/values.yaml b/charts/base/values.yaml index b08dd0b..6b10bb9 100644 --- a/charts/base/values.yaml +++ b/charts/base/values.yaml @@ -37,6 +37,7 @@ securityContext: {} # runAsUser: 1000 service: + enabled: true name: http type: NodePort port: 80