|
|
@ -74,13 +74,13 @@ ingress:
|
|
|
|
# - secretName: chart-example-tls
|
|
|
|
# - secretName: chart-example-tls
|
|
|
|
# hosts:
|
|
|
|
# hosts:
|
|
|
|
# - chart-example.local
|
|
|
|
# - chart-example.local
|
|
|
|
resources:
|
|
|
|
resources: {}
|
|
|
|
limits:
|
|
|
|
# limits:
|
|
|
|
cpu: 100m
|
|
|
|
# cpu: 100m
|
|
|
|
memory: 128Mi
|
|
|
|
# memory: 128Mi
|
|
|
|
requests:
|
|
|
|
#requests:
|
|
|
|
cpu: 100m
|
|
|
|
# cpu: 100m
|
|
|
|
memory: 128Mi
|
|
|
|
# memory: 128Mi
|
|
|
|
|
|
|
|
|
|
|
|
`
|
|
|
|
`
|
|
|
|
|
|
|
|
|
|
|
@ -115,10 +115,10 @@ kind: Ingress
|
|
|
|
metadata:
|
|
|
|
metadata:
|
|
|
|
name: {{ template "fullname" . }}
|
|
|
|
name: {{ template "fullname" . }}
|
|
|
|
labels:
|
|
|
|
labels:
|
|
|
|
app: {{ template "fullname" . }}
|
|
|
|
app: {{ template "name" . }}
|
|
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
|
|
|
|
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
|
|
|
release: "{{ .Release.Name }}"
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
heritage: "{{ .Release.Service }}"
|
|
|
|
heritage: {{ .Release.Service }}
|
|
|
|
annotations:
|
|
|
|
annotations:
|
|
|
|
{{- range $key, $value := .Values.ingress.annotations }}
|
|
|
|
{{- range $key, $value := .Values.ingress.annotations }}
|
|
|
|
{{ $key }}: {{ $value | quote }}
|
|
|
|
{{ $key }}: {{ $value | quote }}
|
|
|
@ -146,13 +146,17 @@ kind: Deployment
|
|
|
|
metadata:
|
|
|
|
metadata:
|
|
|
|
name: {{ template "fullname" . }}
|
|
|
|
name: {{ template "fullname" . }}
|
|
|
|
labels:
|
|
|
|
labels:
|
|
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
|
|
|
|
app: {{ template "name" . }}
|
|
|
|
|
|
|
|
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
|
|
|
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
|
|
|
|
heritage: {{ .Release.Service }}
|
|
|
|
spec:
|
|
|
|
spec:
|
|
|
|
replicas: {{ .Values.replicaCount }}
|
|
|
|
replicas: {{ .Values.replicaCount }}
|
|
|
|
template:
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
labels:
|
|
|
|
app: {{ template "fullname" . }}
|
|
|
|
app: {{ template "name" . }}
|
|
|
|
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
spec:
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
containers:
|
|
|
|
- name: {{ .Chart.Name }}
|
|
|
|
- name: {{ .Chart.Name }}
|
|
|
@ -169,7 +173,11 @@ spec:
|
|
|
|
path: /
|
|
|
|
path: /
|
|
|
|
port: {{ .Values.service.internalPort }}
|
|
|
|
port: {{ .Values.service.internalPort }}
|
|
|
|
resources:
|
|
|
|
resources:
|
|
|
|
{{ toYaml .Values.resources | indent 10 }}
|
|
|
|
{{ toYaml .Values.resources | indent 12 }}
|
|
|
|
|
|
|
|
{{- if .Values.nodeSelector }}
|
|
|
|
|
|
|
|
nodeSelector:
|
|
|
|
|
|
|
|
{{ toYaml .Values.nodeSelector | indent 8 }}
|
|
|
|
|
|
|
|
{{- end }}
|
|
|
|
`
|
|
|
|
`
|
|
|
|
|
|
|
|
|
|
|
|
const defaultService = `apiVersion: v1
|
|
|
|
const defaultService = `apiVersion: v1
|
|
|
@ -177,7 +185,10 @@ kind: Service
|
|
|
|
metadata:
|
|
|
|
metadata:
|
|
|
|
name: {{ template "fullname" . }}
|
|
|
|
name: {{ template "fullname" . }}
|
|
|
|
labels:
|
|
|
|
labels:
|
|
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
|
|
|
|
app: {{ template "name" . }}
|
|
|
|
|
|
|
|
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
|
|
|
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
|
|
|
|
heritage: {{ .Release.Service }}
|
|
|
|
spec:
|
|
|
|
spec:
|
|
|
|
type: {{ .Values.service.type }}
|
|
|
|
type: {{ .Values.service.type }}
|
|
|
|
ports:
|
|
|
|
ports:
|
|
|
@ -186,7 +197,8 @@ spec:
|
|
|
|
protocol: TCP
|
|
|
|
protocol: TCP
|
|
|
|
name: {{ .Values.service.name }}
|
|
|
|
name: {{ .Values.service.name }}
|
|
|
|
selector:
|
|
|
|
selector:
|
|
|
|
app: {{ template "fullname" . }}
|
|
|
|
app: {{ template "name" . }}
|
|
|
|
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
`
|
|
|
|
`
|
|
|
|
|
|
|
|
|
|
|
|
const defaultNotes = `1. Get the application URL by running these commands:
|
|
|
|
const defaultNotes = `1. Get the application URL by running these commands:
|
|
|
@ -202,7 +214,7 @@ const defaultNotes = `1. Get the application URL by running these commands:
|
|
|
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
|
|
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
|
|
|
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
|
|
|
|
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
|
|
|
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
|
|
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
|
|
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
|
|
|
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
|
|
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
|
|
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
|
|
|
kubectl port-forward $POD_NAME 8080:{{ .Values.service.externalPort }}
|
|
|
|
kubectl port-forward $POD_NAME 8080:{{ .Values.service.externalPort }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|