add isolated live development deployments
This commit is contained in:
46
dev/helm/templates/deployment.yaml
Normal file
46
dev/helm/templates/deployment.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
{{- $instance := required "instance is required" .Values.instance -}}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Name | quote }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ .Chart.Name | quote }}
|
||||
app.kubernetes.io/instance: {{ $instance | quote }}
|
||||
dev.mancave.link/instance: {{ $instance | quote }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ .Chart.Name | quote }}
|
||||
dev.mancave.link/instance: {{ $instance | quote }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ .Chart.Name | quote }}
|
||||
app.kubernetes.io/instance: {{ $instance | quote }}
|
||||
dev.mancave.link/instance: {{ $instance | quote }}
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
volumeMounts:
|
||||
- name: source
|
||||
mountPath: /usr/share/nginx/html
|
||||
subPath: {{ required "sharedVolume.subPath is required" .Values.sharedVolume.subPath | quote }}
|
||||
volumes:
|
||||
- name: source
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.sharedVolume.claimName | quote }}
|
||||
23
dev/helm/templates/ingress.yaml
Normal file
23
dev/helm/templates/ingress.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
{{- $instance := required "instance is required" .Values.instance -}}
|
||||
{{- $host := required "ingress.host is required" .Values.ingress.host -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ .Release.Name | quote }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ .Chart.Name | quote }}
|
||||
app.kubernetes.io/instance: {{ $instance | quote }}
|
||||
dev.mancave.link/instance: {{ $instance | quote }}
|
||||
spec:
|
||||
ingressClassName: {{ .Values.ingress.className }}
|
||||
rules:
|
||||
- host: {{ $host | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: {{ .Release.Name | quote }}
|
||||
port:
|
||||
number: {{ .Values.service.port }}
|
||||
19
dev/helm/templates/service.yaml
Normal file
19
dev/helm/templates/service.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
{{- $instance := required "instance is required" .Values.instance -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name | quote }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ .Chart.Name | quote }}
|
||||
app.kubernetes.io/instance: {{ $instance | quote }}
|
||||
dev.mancave.link/instance: {{ $instance | quote }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ .Chart.Name | quote }}
|
||||
dev.mancave.link/instance: {{ $instance | quote }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
Reference in New Issue
Block a user