ungleich-k8s/apps/alpine-helm-deployment/templates/deployment.yaml
2021-12-19 12:23:23 +01:00

73 lines
1.6 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-alpine
spec:
selector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: alpine
replicas: 1
template:
metadata:
labels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: alpine
spec:
initContainers:
containers:
- name: alpine
image: alpine:{{ .Chart.AppVersion }}
ports:
- containerPort: 53
- containerPort: 80
volumeMounts:
- name: data
mountPath: "/data"
command:
- sh
- -c
- "sleep 10000000"
volumes:
- name: data
persistentVolumeClaim:
claimName: {{ .Release.Name }}-data
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: alpine
spec:
type: ClusterIP
ports:
- protocol: TCP
port: 53
name: dns-tcp
- protocol: UDP
port: 53
name: dns-udp
- protocol: TCP
port: 80
name: http
selector:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: alpine
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-data
labels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: alpine
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
storageClassName: rook-ceph-block-hdd