Adding frontend to helm chart
parent
a3c89245b4
commit
64deeef8e2
@ -0,0 +1,15 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
# https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
metadata:
|
||||
labels:
|
||||
name: {{ $.Release.Name }}-{{ $.Chart.Name}}-frontend-service
|
||||
name: {{ $.Release.Name }}-{{ $.Chart.Name}}-frontend-service
|
||||
spec:
|
||||
ports:
|
||||
- protocol: 'TCP'
|
||||
port: 80
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: {{ $.Release.Name }}-{{ $.Chart.Name}}-frontend
|
@ -0,0 +1,32 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
# https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
metadata:
|
||||
# This allows us to ensure we have a unique config name. Which means we could have two of the same service
|
||||
# in the same namespace.
|
||||
name: {{ .Release.Name }}-{{ .Chart.Name }}-frontend
|
||||
labels:
|
||||
app: {{ .Release.Name }}-{{ .Chart.Name }}-frontend
|
||||
spec:
|
||||
{{- with .Values.services.frontend }}
|
||||
replicas: {{ .replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ $.Release.Name }}-{{ $.Chart.Name }}-frontend
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ $.Release.Name }}-{{ $.Chart.Name }}-frontend
|
||||
# Here I am just demonstrating that you can pull values from Chart.yaml or Releases.
|
||||
# Note the capital first letter in accessing the values
|
||||
app_version: {{ $.Chart.AppVersion }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ $.Release.Name }}-{{ $.Chart.Name}}-frontend
|
||||
image: {{ .image_name }}:{{ .image_version }}
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
imagePullSecrets:
|
||||
- name: {{ $.Values.image_pull_secret }}
|
||||
{{- end }}
|
Loading…
Reference in New Issue