From 114f1db643f7afc4826eb954c69dc065ab501712 Mon Sep 17 00:00:00 2001 From: Andrea Borghi Date: Tue, 4 Apr 2023 14:18:35 +0200 Subject: [PATCH] Add annotations and labels on the custom ingress --- templates/ingress.yaml | 2 +- tests/expected.yaml | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/templates/ingress.yaml b/templates/ingress.yaml index 2a11957..9a7a0fd 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -6,7 +6,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }}-{{ $hostGroupName }} - {{- include "common.metadata" ( dict "root" $ "service" $.Values ) | nindent 2 }} + {{- include "common.metadata" ( dict "root" $ "service" $.Values.ingress ) | nindent 2 }} spec: # Add tls only if ingress.tls.enabled is set to true and the other fields are complete. {{- if and ( hasKey $hostGroupDefinition "tls" ) ( eq $hostGroupDefinition.tls.enabled true ) }} diff --git a/tests/expected.yaml b/tests/expected.yaml index e747617..ba3c507 100644 --- a/tests/expected.yaml +++ b/tests/expected.yaml @@ -3,7 +3,7 @@ apiVersion: policy/v1 kind: PodDisruptionBudget metadata: - name: custom-custom-pod-with-service-name + name: custom-custom-pod-with-serv labels: app.kubernetes.io/name: custom-pod app.kubernetes.io/instance: custom @@ -54,7 +54,7 @@ spec: apiVersion: v1 kind: Service metadata: - name: custom-custom-pod-with-service-name + name: custom-custom-pod-with-serv labels: helm.sh/chart: custom-pod app.kubernetes.io/version: "1.0" @@ -129,7 +129,7 @@ spec: apiVersion: apps/v1 kind: Deployment metadata: - name: custom-custom-pod-with-service-name + name: custom-custom-pod-with-serv labels: helm.sh/chart: custom-pod app.kubernetes.io/version: "1.0" @@ -167,7 +167,7 @@ spec: imagePullPolicy: IfNotPresent env: - name: "TEST" - value: aa + value: "aa" terminationMessagePolicy: FallbackToLogsOnError resources: limits: @@ -191,7 +191,7 @@ spec: name: "jwt-key-secret" key: "JWT_SECRET_KEY" - name: "MY_ENV_VAR" - value: some-value + value: "some-value" terminationMessagePolicy: FallbackToLogsOnError resources: null @@ -219,7 +219,7 @@ spec: imagePullPolicy: IfNotPresent env: - name: "TEST" - value: aa + value: "aa" terminationMessagePolicy: FallbackToLogsOnError resources: limits: @@ -243,7 +243,7 @@ spec: name: "jwt-key-secret" key: "JWT_SECRET_KEY" - name: "MY_ENV_VAR" - value: some-value + value: "some-value" terminationMessagePolicy: FallbackToLogsOnError resources: null @@ -328,7 +328,7 @@ spec: imagePullPolicy: IfNotPresent env: - name: "TEST" - value: aa + value: "aa" terminationMessagePolicy: FallbackToLogsOnError resources: limits: @@ -352,7 +352,7 @@ spec: name: "jwt-key-secret" key: "JWT_SECRET_KEY" - name: "MY_ENV_VAR" - value: some-value + value: "some-value" terminationMessagePolicy: FallbackToLogsOnError resources: null @@ -436,7 +436,7 @@ spec: imagePullPolicy: IfNotPresent env: - name: "TEST" - value: aa + value: "aa" terminationMessagePolicy: FallbackToLogsOnError resources: limits: @@ -460,7 +460,7 @@ spec: name: "jwt-key-secret" key: "JWT_SECRET_KEY" - name: "MY_ENV_VAR" - value: some-value + value: "some-value" terminationMessagePolicy: FallbackToLogsOnError resources: null @@ -529,7 +529,7 @@ spec: pathType: Prefix backend: service: - name: custom-custom-pod-with-service-name + name: custom-custom-pod-with-serv port: number: 8080 - path: "/two" @@ -553,7 +553,7 @@ spec: pathType: Prefix backend: service: - name: custom-custom-pod-with-service-name + name: custom-custom-pod-with-serv port: number: 8080 - path: "/two" @@ -597,7 +597,7 @@ spec: pathType: Prefix backend: service: - name: custom-custom-pod-with-service-name + name: custom-custom-pod-with-serv port: number: 8080 - path: "/two"