blob: 463ffe45269c592dc7ce808721f433acebb46727 [file] [log] [blame]
Giorgi Lekveishvilicd46ca62023-07-07 11:58:35 +04001apiVersion: rbac.authorization.k8s.io/v1
Giorgi Lekveishvili9d037332023-07-06 19:48:49 +04002kind: ClusterRole
3metadata:
4 name: {{ .Values.clusterRoleName }}
5rules:
6- apiGroups:
7 - ""
8 resources:
9 - namespaces
10 verbs:
11 - create
gio778577f2024-04-29 09:44:38 +040012- apiGroups:
giof8843412024-05-22 16:38:05 +040013 - "batch"
14 resources:
15 - jobs
16 verbs:
17 - create
18- apiGroups:
gioea6d9122025-05-22 17:57:18 +040019 - "*"
gio778577f2024-04-29 09:44:38 +040020 resources:
gioea6d9122025-05-22 17:57:18 +040021 - "*"
gio778577f2024-04-29 09:44:38 +040022 verbs:
23 - get
gioea6d9122025-05-22 17:57:18 +040024 - list
Giorgi Lekveishvili9d037332023-07-06 19:48:49 +040025---
26apiVersion: rbac.authorization.k8s.io/v1
27kind: ClusterRoleBinding
28metadata:
29 name: {{ .Values.clusterRoleName }}
30roleRef:
31 apiGroup: rbac.authorization.k8s.io
32 kind: ClusterRole
33 name: {{ .Values.clusterRoleName }}
34subjects:
35- kind: ServiceAccount
36 name: default
37 namespace: {{ .Release.Namespace }}
38---
Giorgi Lekveishvilida912e72023-07-06 18:48:55 +040039apiVersion: v1
40kind: Secret
41metadata:
42 name: ssh-key
43type: Opaque
44data:
45 private: {{ .Values.sshPrivateKey }}
46---
47apiVersion: v1
48kind: Service
49metadata:
50 name: appmanager
51 namespace: {{ .Release.Namespace }}
52spec:
53 type: ClusterIP
54 selector:
55 app: appmanager
56 ports:
gio24312cc2025-04-20 15:53:15 +040057 - name: http
gioea6d9122025-05-22 17:57:18 +040058 port: 80
Giorgi Lekveishvilida912e72023-07-06 18:48:55 +040059 targetPort: http
60 protocol: TCP
61---
Giorgi Lekveishvilida912e72023-07-06 18:48:55 +040062apiVersion: apps/v1
63kind: Deployment
64metadata:
65 name: appmanager
66 namespace: {{ .Release.Namespace }}
67spec:
68 selector:
69 matchLabels:
70 app: appmanager
71 replicas: 1
72 template:
73 metadata:
74 labels:
75 app: appmanager
76 spec:
77 volumes:
78 - name: ssh-key
79 secret:
80 secretName: ssh-key
81 containers:
82 - name: appmanager
83 image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
84 imagePullPolicy: {{ .Values.image.pullPolicy }}
85 ports:
86 - name: http
gio24312cc2025-04-20 15:53:15 +040087 containerPort: {{ .Values.port }}
Giorgi Lekveishvilida912e72023-07-06 18:48:55 +040088 protocol: TCP
89 command:
90 - pcloud-installer
91 - appmanager
92 - --repo-addr={{ .Values.repoAddr }}
93 - --ssh-key=/pcloud/ssh-key/private
gio36b23b32024-08-25 12:20:54 +040094 - --headscale-api-addr={{ .Values.headscaleAPIAddr }}
giof6ad2982024-08-23 17:42:49 +040095 - --dns-api-addr={{ .Values.dnsAPIAddr }}
96 - --cluster-proxy-config-path={{ .Values.clusterProxyConfigPath }}
gio24312cc2025-04-20 15:53:15 +040097 - --port={{ .Values.port }}
Giorgi Lekveishvili4586b4b2023-11-08 17:09:28 +040098 {{- if .Values.appRepoAddr }}
99 - --app-repo-addr={{ .Values.appRepoAddr }}
100 {{- end}}
Giorgi Lekveishvilida912e72023-07-06 18:48:55 +0400101 volumeMounts:
102 - name: ssh-key
103 readOnly: true
104 mountPath: /pcloud/ssh-key