blob: 33d9a2d9e2975e675538bcfa6202e5ce859b344c [file] [log] [blame]
gioe72b54f2024-04-22 10:44:41 +04001# TODO(gio): we'll need to separate intra-dns service and one accessible from k8s cluster
2apiVersion: v1
3kind: Service
4metadata:
5 name: dns-api
6 namespace: {{ .Release.Namespace }}
7 {{- if .Values.service.annotations }}
8 annotations:
9 {{- toYaml .Values.service.annotations | nindent 4 }}
10 {{- end }}
11spec:
12 type: {{ .Values.service.type }}
13 selector:
14 app: dns-api
15 ports:
16 - name: http
17 port: 80
18 targetPort: http
19 protocol: TCP
20---
21apiVersion: apps/v1
22kind: Deployment
23metadata:
24 name: dns-api
25 namespace: {{ .Release.Namespace }}
26spec:
27 selector:
28 matchLabels:
29 app: dns-api
30 replicas: 1
31 template:
32 metadata:
33 labels:
34 app: dns-api
35 spec:
36 containers:
37 - name: dns-api
38 image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
39 imagePullPolicy: {{ .Values.image.pullPolicy }}
40 ports:
41 - name: http
42 containerPort: 8080
43 protocol: TCP
44 command:
45 - dns-api
46 - --port=8080
47 - --root-dir={{ .Values.volume.mountPath }}
48 - --config={{ .Values.config }}
49 - --db={{ .Values.db }}
50 - --zone={{ .Values.zone }}
51 - --public-ip={{ .Values.publicIP }}
52 - --private-ip={{ .Values.privateIP }}
53 - --nameserver-ip={{ .Values.nameserverIP }}
54 volumeMounts:
55 - name: data
56 mountPath: {{ .Values.volume.mountPath }}
57 resources:
58 requests:
59 memory: "10Mi"
60 cpu: "10m"
61 limits:
62 memory: "20Mi"
63 cpu: "100m"
64 volumes:
65 - name: data
66 persistentVolumeClaim:
67 claimName: {{ .Values.volume.claimName }}
68 tolerations:
69 - key: "pcloud"
70 operator: "Equal"
71 value: "role"
72 effect: "NoSchedule"