Skip to content

Commit 4416755

Browse files
authored
fix numeric-only namespace templating (#63)
1 parent f4c3b6f commit 4416755

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

charts/localstack/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ annotations:
22
category: Infrastructure
33
apiVersion: v2
44
appVersion: latest
5-
version: 0.4.2
5+
version: 0.4.3
66
name: localstack
77
description: LocalStack - a fully functional local AWS cloud stack
88
type: application

charts/localstack/templates/NOTES.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
{{- end }}
77
{{- end }}
88
{{- else if contains "NodePort" .Values.service.type }}
9-
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "localstack.fullname" . }})
10-
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
9+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace | quote }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "localstack.fullname" . }})
10+
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace | quote }} -o jsonpath="{.items[0].status.addresses[0].address}")
1111
echo http://$NODE_IP:$NODE_PORT
1212
{{- else if contains "LoadBalancer" .Values.service.type }}
1313
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
14-
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "localstack.fullname" . }}'
15-
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "localstack.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
14+
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace | quote }} svc -w {{ include "localstack.fullname" . }}'
15+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace | quote }} {{ include "localstack.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
1616
echo http://$SERVICE_IP:{{ .Values.service.edgeService.targetPort }}
1717
{{- else if contains "ClusterIP" .Values.service.type }}
18-
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "localstack.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
19-
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
18+
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace | quote }} -l "app.kubernetes.io/name={{ include "localstack.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
19+
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace | quote }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
2020
echo "Visit http://127.0.0.1:8080 to use your application"
21-
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
21+
kubectl --namespace {{ .Release.Namespace | quote }} port-forward $POD_NAME 8080:$CONTAINER_PORT
2222
{{- end }}

charts/localstack/templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: v1
33
kind: ConfigMap
44
metadata:
55
name: {{ template "localstack.fullname" . }}-init-scripts-config
6-
namespace: {{ .Release.Namespace }}
6+
namespace: {{ .Release.Namespace | quote }}
77
labels:
88
{{- include "localstack.labels" . | nindent 4 }}
99
annotations:

charts/localstack/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: {{ include "localstack.fullname" . }}
5-
namespace: {{ .Release.Namespace }}
5+
namespace: {{ .Release.Namespace | quote }}
66
labels:
77
{{- include "localstack.labels" . | nindent 4 }}
88
annotations:

charts/localstack/templates/ingress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ apiVersion: extensions/v1beta1
1313
kind: Ingress
1414
metadata:
1515
name: {{ $fullName }}
16-
namespace: {{ .Release.Namespace }}
16+
namespace: {{ .Release.Namespace | quote }}
1717
labels:
1818
{{- include "localstack.labels" . | nindent 4 }}
1919
annotations:

charts/localstack/templates/pvc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: PersistentVolumeClaim
33
apiVersion: v1
44
metadata:
55
name: {{ include "common.names.fullname" . }}
6-
namespace: {{ .Release.Namespace }}
6+
namespace: {{ .Release.Namespace | quote }}
77
labels:
88
{{- include "localstack.labels" . | nindent 4 }}
99
annotations:

charts/localstack/templates/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
kind: Service
33
metadata:
44
name: {{ include "localstack.fullname" . }}
5-
namespace: {{ .Release.Namespace }}
5+
namespace: {{ .Release.Namespace | quote }}
66
labels:
77
{{- include "localstack.labels" . | nindent 4 }}
88
annotations:

charts/localstack/templates/serviceaccount.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: v1
33
kind: ServiceAccount
44
metadata:
55
name: {{ include "localstack.serviceAccountName" . }}
6-
namespace: {{ .Release.Namespace }}
6+
namespace: {{ .Release.Namespace | quote }}
77
labels:
88
{{- include "localstack.labels" . | nindent 4 }}
99
annotations:

0 commit comments

Comments
 (0)