77 lines
2.4 KiB
YAML
77 lines
2.4 KiB
YAML
{{ $labels := (dict
|
|
"app.kubernetes.io/name" .Chart.Name
|
|
"app.kubernetes.io/instance" .Release.Name
|
|
"app.kubernetes.io/part-of" .Release.Namespace
|
|
) }}
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: homepage
|
|
namespace: {{ .Release.Namespace}}
|
|
spec:
|
|
revisionHistoryLimit: 4
|
|
replicas: 1
|
|
strategy:
|
|
type: RollingUpdate
|
|
selector:
|
|
matchLabels:
|
|
{{ $labels | toYaml | nindent 12 }}
|
|
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{ $labels | toYaml | nindent 16 }}
|
|
spec:
|
|
serviceAccountName: homepage
|
|
automountServiceAccountToken: true
|
|
dnsPolicy: ClusterFirst
|
|
enableServiceLinks: true
|
|
volumes:
|
|
- name: homepage-config
|
|
configMap:
|
|
name: homepage
|
|
- name: logs
|
|
emptyDir: {}
|
|
containers:
|
|
- name: homepage
|
|
image: "{{ .Values.image }}"
|
|
imagePullPolicy: Always
|
|
env:
|
|
- name: HOMEPAGE_ALLOWED_HOSTS
|
|
value: "{{ .Values.allowedHosts }}"
|
|
ports:
|
|
- name: http
|
|
containerPort: 3000
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- mountPath: /app/config/logs
|
|
name: logs
|
|
- mountPath: /app/config/kubernetes.yaml
|
|
name: homepage-config
|
|
subPath: kubernetes.yaml
|
|
- mountPath: /app/config/settings.yaml
|
|
name: homepage-config
|
|
subPath: settings.yaml
|
|
- mountPath: /app/config/widgets.yaml
|
|
name: homepage-config
|
|
subPath: widgets.yaml
|
|
|
|
---
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: homepage
|
|
annotations:
|
|
{{ (.serviceAnnotations | default dict) | toYaml | nindent 4 }}
|
|
spec:
|
|
selector:
|
|
{{ $labels | toYaml | nindent 8 }}
|
|
type: {{ $.Values.serviceType | default "ClusterIP" | quote }}
|
|
ports:
|
|
- targetPort: 3000
|
|
port: 80
|
|
protocol: TCP
|
|
name: http
|