Skip to content

Commit 6fe53cd

Browse files
committed
Brought the way we handled the deployment and ingress labels and annotations inline with what we do for Console.
1 parent 7c5d1c9 commit 6fe53cd

File tree

3 files changed

+57
-8
lines changed

3 files changed

+57
-8
lines changed

charts/gateway/templates/deployment.yaml

+20-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@ apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: {{ include "conduktor-gateway.fullname" . }}
5-
labels: {{ include "conduktor-gateway.labels" . | nindent 4 }}
5+
labels: {{- include "conduktor-gateway.labels" . | nindent 4 }}
6+
{{- if .Values.commonLabels }}
7+
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
8+
{{- end }}
9+
annotations:
10+
{{- if .Values.commonAnnotations }}
11+
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
12+
{{- end }}
613
spec:
714
selector:
815
matchLabels: {{ include "conduktor-gateway.podSelectorLabels" . | nindent 6 }}
@@ -12,18 +19,24 @@ spec:
1219
template:
1320
metadata:
1421
annotations:
22+
{{- if .Values.commonAnnotations }}
23+
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 8 }}
24+
{{- end }}
25+
{{- if .Values.gateway.podAnnotations }}
26+
{{- include "common.tplvalues.render" (dict "value" .Values.gateway.podAnnotations "context" $) | nindent 8 }}
27+
{{- end }}
1528
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
1629
checksum/self-secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
1730
{{- if .Values.gateway.secretSha256sum }}
1831
checksum/secret: {{ .Values.gateway.secretSha256sum }}
1932
{{- end }}
20-
{{- with .Values.gateway.podAnnotations }}
21-
{{- toYaml . | nindent 8 }}
33+
labels: {{- include "conduktor-gateway.labels" . | nindent 8 }}
34+
{{- if .Values.gateway.podLabels }}
35+
{{- include "common.tplvalues.render" (dict "value" .Values.gateway.podLabels "context" $) | nindent 8 }}
36+
{{- end }}
37+
{{- if .Values.commonLabels }}
38+
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }}
2239
{{- end }}
23-
labels: {{ include "conduktor-gateway.labels" . | nindent 8 }}
24-
{{- if .Values.gateway.podLabels }}
25-
{{- toYaml .Values.gateway.podLabels | nindent 8 }}
26-
{{- end }}
2740
spec:
2841
containers:
2942
- name: gateway

charts/gateway/templates/ingress.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ kind: Ingress
44
metadata:
55
name: {{ template "common.names.fullname" . }}
66
namespace: {{ include "common.names.namespace" . | quote }}
7-
labels: {{ include "conduktor-gateway.labels" . | nindent 4 }}
7+
labels: {{- include "conduktor-gateway.labels" . | nindent 4 }}
8+
{{- with .Values.commonLabels }}
9+
{{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
10+
{{- end }}
811
{{- if or .Values.ingress.annotations .Values.commonAnnotations }}
912
annotations:
1013
{{- if .Values.ingress.annotations }}

values.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
global:
2+
imagePullSecrets:
3+
- name: harbor-secret
4+
commonLabels:
5+
conduktor.io/team: gateway
6+
conduktor.io/app-env: nightly
7+
conduktor.io/env: staging
8+
gateway:
9+
image:
10+
registry: harbor.cdkt.dev
11+
repository: conduktor/conduktor-gateway
12+
tag: nightly-1742776053 # {"$imagepolicy": "gateway-nightly:conduktor-gateway:tag"}
13+
podLabels:
14+
replicas: 3
15+
secretRef: "gateway-secrets" # pragma: allowlist secret
16+
env:
17+
LOG4J2_APPENDER_LAYOUT: json
18+
GATEWAY_SECURITY_PROTOCOL: SASL_PLAINTEXT
19+
KAFKA_BOOTSTRAP_SERVERS: "cp-kafka.gateway-nightly.svc.cluster.local:9092"
20+
KAFKA_SECURITY_PROTOCOL: SASL_PLAINTEXT
21+
KAFKA_SASL_MECHANISM: PLAIN
22+
KAFKA_SASL_JAAS_CONFIG: "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"admin\" password=\"admin-secret\";"
23+
startupProbeDelay: "45"
24+
portRange:
25+
start: 9092
26+
count: 3
27+
jmx:
28+
enable: true
29+
resources:
30+
requests:
31+
cpu: 1
32+
limits:
33+
cpu: 3

0 commit comments

Comments
 (0)