Skip to content

Commit

Permalink
Add annotations and labels on the custom ingress
Browse files Browse the repository at this point in the history
  • Loading branch information
danduk82 committed Apr 4, 2023
1 parent 206d33e commit 114f1db
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) }}
Expand Down
28 changes: 14 additions & 14 deletions tests/expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -167,7 +167,7 @@ spec:
imagePullPolicy: IfNotPresent
env:
- name: "TEST"
value: aa
value: "aa"
terminationMessagePolicy: FallbackToLogsOnError
resources:
limits:
Expand All @@ -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
Expand Down Expand Up @@ -219,7 +219,7 @@ spec:
imagePullPolicy: IfNotPresent
env:
- name: "TEST"
value: aa
value: "aa"
terminationMessagePolicy: FallbackToLogsOnError
resources:
limits:
Expand All @@ -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
Expand Down Expand Up @@ -328,7 +328,7 @@ spec:
imagePullPolicy: IfNotPresent
env:
- name: "TEST"
value: aa
value: "aa"
terminationMessagePolicy: FallbackToLogsOnError
resources:
limits:
Expand All @@ -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
Expand Down Expand Up @@ -436,7 +436,7 @@ spec:
imagePullPolicy: IfNotPresent
env:
- name: "TEST"
value: aa
value: "aa"
terminationMessagePolicy: FallbackToLogsOnError
resources:
limits:
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 114f1db

Please sign in to comment.