Skip to content

Commit 91bee3b

Browse files
authored
multiple template fixes, expose pod IP in env to LocalStack (#132)
1 parent 1ec56b7 commit 91bee3b

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

charts/localstack/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ spec:
139139
valueFrom:
140140
fieldRef:
141141
fieldPath: metadata.namespace
142+
- name: LOCALSTACK_K8S_POD_IP
143+
valueFrom:
144+
fieldRef:
145+
fieldPath: status.podIP
142146
{{- if include "localstack.lambda.labels" . }}
143147
- name: LAMBDA_K8S_LABELS
144148
value: {{ include "localstack.lambda.labels" . | quote }}

charts/localstack/templates/role.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ rules:
1919
- apiGroups: [""]
2020
resources: ["services"]
2121
verbs: ["get", "list"]
22+
- apiGroups: ["apps"]
23+
resources: ["deployments"]
24+
verbs: ["*"]
2225
{{- if .Values.role.extraRoles }}
2326
{{ include "common.tplvalues.render" (dict "value" .Values.role.extraRoles "context" $) }}
2427
{{- end }}

charts/localstack/templates/service.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ spec:
4040
{{- if .Values.service.dnsService }}
4141
- name: dns-tcp
4242
port: 53
43-
containerPort: 53
43+
targetPort: 53
4444
protocol: TCP
4545
- name: dns-udp
4646
port: 53
47-
containerPort: 53
47+
targetPort: 53
4848
protocol: UDP
4949
{{- end }}
5050
{{- range $index, $port := untilStep (.Values.service.externalServicePorts.start|int) (.Values.service.externalServicePorts.end|int) 1 }}

0 commit comments

Comments
 (0)