diff --git a/charts/templates/NOTES.txt b/charts/templates/NOTES.txt index 3f4b91d..dab13a1 100644 --- a/charts/templates/NOTES.txt +++ b/charts/templates/NOTES.txt @@ -1,11 +1,5 @@ 1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} +{{- if contains "NodePort" .Values.service.type }} export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "dao-2048.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT @@ -18,5 +12,5 @@ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "dao-2048.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT + kubectl --namespace {{ .Release.Namespace }} --address 0.0.0.0 port-forward $POD_NAME 8080:$CONTAINER_PORT {{- end }} diff --git a/charts/templates/deployment.yaml b/charts/templates/deployment.yaml index 2288a6e..13bcaef 100644 --- a/charts/templates/deployment.yaml +++ b/charts/templates/deployment.yaml @@ -5,9 +5,7 @@ metadata: labels: {{- include "dao-2048.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} - {{- end }} selector: matchLabels: {{- include "dao-2048.selectorLabels" . | nindent 6 }} @@ -24,7 +22,6 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} - serviceAccountName: {{ include "dao-2048.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: