blob: 29ce6ef2f1fb74aad6d31ff3cbca19fab59da662 [file] [log] [blame]
Giorgi Lekveishvili2df23db2023-12-14 07:55:22 +04001apiVersion: v1
2kind: ServiceAccount
3metadata:
4 name: fluxcd-reconciler
5 namespace: {{ .Release.Namespace }}
6---
7apiVersion: rbac.authorization.k8s.io/v1
8kind: ClusterRole
9metadata:
10 name: fluxcd-reconciler
11rules: # TODO(gio): restrict to ns create and dnszone get
12- apiGroups:
13 - "source.toolkit.fluxcd.io/v1"
14 resources:
15 - "gitrepositories"
16 verbs:
17 - get
18 - update
19- apiGroups:
20 - "kustomize.toolkit.fluxcd.io"
21 resources:
22 - "kustomizations"
23 verbs:
24 - get
25 - update
26---
27apiVersion: rbac.authorization.k8s.io/v1
28kind: ClusterRoleBinding
29metadata:
30 name: fluxcd-reconciler
31roleRef:
32 apiGroup: rbac.authorization.k8s.io
33 kind: ClusterRole
34 name: fluxcd-reconciler
35subjects:
36- kind: ServiceAccount
37 name: fluxcd-reconciler
38 namespace: {{ .Release.Namespace }}
39---
40apiVersion: v1
41kind: Service
42metadata:
43 name: fluxcd-reconciler
44 namespace: {{ .Release.Namespace }}
45spec:
46 type: ClusterIP
47 selector:
48 app: fluxcd-reconciler
49 ports:
50 - name: http
51 port: 80
52 targetPort: http
53 protocol: TCP
54---
55apiVersion: apps/v1
56kind: Deployment
57metadata:
58 name: fluxcd-reconciler
59 namespace: {{ .Release.Namespace }}
60spec:
61 selector:
62 matchLabels:
63 app: fluxcd-reconciler
64 replicas: 1
65 serviceAccountName: fluxcd-reconciler
66 template:
67 metadata:
68 labels:
69 app: fluxcd-reconciler
70 spec:
71 containers:
72 - name: fluxcd-reconciler
73 image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
74 imagePullPolicy: {{ .Values.image.pullPolicy }}
75 ports:
76 - name: http
77 containerPort: 8080
78 protocol: TCP
Giorgi Lekveishvili2dd35c22023-12-17 21:22:00 +040079 command: ["/fluxcd_reconciler", "--port=8080"]
Giorgi Lekveishvili2df23db2023-12-14 07:55:22 +040080 resources:
81 requests:
82 memory: "10Mi"
83 cpu: "10m"
84 limits:
85 memory: "20Mi"
86 cpu: "100m"
87 tolerations:
88 - key: "pcloud"
89 operator: "Equal"
90 value: "role"
91 effect: "NoSchedule"