From 3f626075a5b32b74ee867cb96714952d6b0f4ea1 Mon Sep 17 00:00:00 2001 From: Lindsay Codecademy Date: Mon, 8 Aug 2022 13:32:12 -0400 Subject: [PATCH 1/5] additional service ports Signed-off-by: Lindsay Codecademy --- charts/rails/Chart.yaml | 2 +- charts/rails/ci/custom.yaml | 2 ++ charts/rails/templates/deployment.yaml | 5 +++++ charts/rails/templates/service.yaml | 5 +++++ 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 charts/rails/ci/custom.yaml diff --git a/charts/rails/Chart.yaml b/charts/rails/Chart.yaml index 1cde76d..4f919e2 100644 --- a/charts/rails/Chart.yaml +++ b/charts/rails/Chart.yaml @@ -7,4 +7,4 @@ maintainers: - email: devops@codecademy.com # pragma: allowlist secret name: devops name: rails -version: 2.8.0 +version: 2.9.0 diff --git a/charts/rails/ci/custom.yaml b/charts/rails/ci/custom.yaml new file mode 100644 index 0000000..a8443fb --- /dev/null +++ b/charts/rails/ci/custom.yaml @@ -0,0 +1,2 @@ +service: + additionalPort: 4000 diff --git a/charts/rails/templates/deployment.yaml b/charts/rails/templates/deployment.yaml index 0aad12c..eb1828e 100644 --- a/charts/rails/templates/deployment.yaml +++ b/charts/rails/templates/deployment.yaml @@ -119,6 +119,11 @@ spec: - name: http containerPort: {{ .Values.service.port }} protocol: TCP + {{- if .Values.service.additionalPort }} + - name: extra + containerPort: {{ .Values.service.additionalPort }} + protocol: TCP + {{- end }} livenessProbe: {{ toYaml .Values.livenessProbe | indent 12 }} readinessProbe: diff --git a/charts/rails/templates/service.yaml b/charts/rails/templates/service.yaml index 868dd00..d87bac7 100644 --- a/charts/rails/templates/service.yaml +++ b/charts/rails/templates/service.yaml @@ -14,6 +14,11 @@ spec: targetPort: {{ .Values.service.port }} protocol: TCP name: http + {{- if .Values.service.additionalPort }} + - port: {{ .Values.service.additionalPort }} + targetPort: {{ .Values.service.additionalPort }} + name: extra + {{- end }} selector: app.kubernetes.io/name: {{ include "rails.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} From c842773f9ccfbb7735c1893c1f290ba3aa7f84fb Mon Sep 17 00:00:00 2001 From: Lindsay Codecademy Date: Tue, 16 Aug 2022 09:55:56 -0400 Subject: [PATCH 2/5] add annotations to pods Signed-off-by: Lindsay Codecademy --- charts/rails/ci/custom.yaml | 3 +++ charts/rails/templates/deployment.yaml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/charts/rails/ci/custom.yaml b/charts/rails/ci/custom.yaml index a8443fb..0746740 100644 --- a/charts/rails/ci/custom.yaml +++ b/charts/rails/ci/custom.yaml @@ -1,2 +1,5 @@ +annotations: + foo: bar + bar: baz service: additionalPort: 4000 diff --git a/charts/rails/templates/deployment.yaml b/charts/rails/templates/deployment.yaml index eb1828e..6fd3769 100644 --- a/charts/rails/templates/deployment.yaml +++ b/charts/rails/templates/deployment.yaml @@ -40,6 +40,10 @@ spec: tags.datadoghq.com/version: {{ .version | quote }} {{- end }} {{- end }} + {{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 8 }} + {{- end }} spec: {{- if .Values.serviceAccountName }} serviceAccountName: {{ .Values.serviceAccountName }} From 3d300ab0bffb9337d32690b9fcc52ee4c5ce05bb Mon Sep 17 00:00:00 2001 From: Lindsay Codecademy Date: Tue, 16 Aug 2022 10:54:30 -0400 Subject: [PATCH 3/5] version bump Signed-off-by: Lindsay Codecademy --- charts/rails/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/rails/Chart.yaml b/charts/rails/Chart.yaml index 4f919e2..0162d9f 100644 --- a/charts/rails/Chart.yaml +++ b/charts/rails/Chart.yaml @@ -7,4 +7,4 @@ maintainers: - email: devops@codecademy.com # pragma: allowlist secret name: devops name: rails -version: 2.9.0 +version: 2.9.2 From 19150abca79b7378b5138423aeec788349cdcb2f Mon Sep 17 00:00:00 2001 From: Lindsay Codecademy Date: Tue, 16 Aug 2022 11:06:19 -0400 Subject: [PATCH 4/5] will that fix it Signed-off-by: Lindsay Codecademy --- charts/rails/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/rails/Chart.yaml b/charts/rails/Chart.yaml index 0162d9f..00490d7 100644 --- a/charts/rails/Chart.yaml +++ b/charts/rails/Chart.yaml @@ -7,4 +7,4 @@ maintainers: - email: devops@codecademy.com # pragma: allowlist secret name: devops name: rails -version: 2.9.2 +version: 2.9.2 \ No newline at end of file From 6649a530312051d4c165d2f06059d5b109b3b8b8 Mon Sep 17 00:00:00 2001 From: Lindsay Codecademy Date: Tue, 9 Aug 2022 13:39:24 -0400 Subject: [PATCH 5/5] add custom name to additional port Signed-off-by: Lindsay Codecademy --- charts/rails/Chart.yaml | 2 +- charts/rails/ci/custom.yaml | 4 +++- charts/rails/templates/deployment.yaml | 6 +++--- charts/rails/templates/service.yaml | 8 ++++---- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/charts/rails/Chart.yaml b/charts/rails/Chart.yaml index 00490d7..0162d9f 100644 --- a/charts/rails/Chart.yaml +++ b/charts/rails/Chart.yaml @@ -7,4 +7,4 @@ maintainers: - email: devops@codecademy.com # pragma: allowlist secret name: devops name: rails -version: 2.9.2 \ No newline at end of file +version: 2.9.2 diff --git a/charts/rails/ci/custom.yaml b/charts/rails/ci/custom.yaml index 0746740..feefd2f 100644 --- a/charts/rails/ci/custom.yaml +++ b/charts/rails/ci/custom.yaml @@ -2,4 +2,6 @@ annotations: foo: bar bar: baz service: - additionalPort: 4000 + additionalPort: + port: 4000 + name: asdf diff --git a/charts/rails/templates/deployment.yaml b/charts/rails/templates/deployment.yaml index 6fd3769..04c6b92 100644 --- a/charts/rails/templates/deployment.yaml +++ b/charts/rails/templates/deployment.yaml @@ -123,9 +123,9 @@ spec: - name: http containerPort: {{ .Values.service.port }} protocol: TCP - {{- if .Values.service.additionalPort }} - - name: extra - containerPort: {{ .Values.service.additionalPort }} + {{- with .Values.service.additionalPort }} + - name: {{ .name }} + containerPort: {{ .port }} protocol: TCP {{- end }} livenessProbe: diff --git a/charts/rails/templates/service.yaml b/charts/rails/templates/service.yaml index d87bac7..723cca6 100644 --- a/charts/rails/templates/service.yaml +++ b/charts/rails/templates/service.yaml @@ -14,10 +14,10 @@ spec: targetPort: {{ .Values.service.port }} protocol: TCP name: http - {{- if .Values.service.additionalPort }} - - port: {{ .Values.service.additionalPort }} - targetPort: {{ .Values.service.additionalPort }} - name: extra + {{- with .Values.service.additionalPort }} + - port: {{ .port }} + targetPort: {{ .port }} + name: {{ .name }} {{- end }} selector: app.kubernetes.io/name: {{ include "rails.name" . }}