blob: 463ffe45269c592dc7ce808721f433acebb46727 [file] [log] [blame]
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +04001apiVersion: rbac.authorization.k8s.io/v1
2kind: ClusterRole
3metadata:
4 name: {{ .Values.clusterRoleName }}
5rules:
6- apiGroups:
7 - ""
8 resources:
9 - namespaces
10 verbs:
11 - create
12- apiGroups:
13 - "batch"
14 resources:
15 - jobs
16 verbs:
17 - create
18- apiGroups:
Giorgi Lekveishvili193b7c02025-05-22 16:21:37 +040019 - "*"
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +040020 resources:
Giorgi Lekveishvili193b7c02025-05-22 16:21:37 +040021 - "*"
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +040022 verbs:
23 - get
Giorgi Lekveishvili193b7c02025-05-22 16:21:37 +040024 - list
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +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---
39apiVersion: 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:
Giorgi Lekveishvili06a67912025-04-20 15:56:03 +040057 - name: http
Giorgi Lekveishvili193b7c02025-05-22 16:21:37 +040058 port: 80
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +040059 targetPort: http
60 protocol: TCP
61---
62apiVersion: 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
Giorgi Lekveishvili06a67912025-04-20 15:56:03 +040087 containerPort: {{ .Values.port }}
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +040088 protocol: TCP
89 command:
90 - pcloud-installer
91 - appmanager
92 - --repo-addr={{ .Values.repoAddr }}
93 - --ssh-key=/pcloud/ssh-key/private
Giorgi Lekveishvili64cb6e32024-08-27 08:26:04 +040094 - --headscale-api-addr={{ .Values.headscaleAPIAddr }}
Giorgi Lekveishvili54f781e2024-09-15 16:04:16 +040095 - --dns-api-addr={{ .Values.dnsAPIAddr }}
96 - --cluster-proxy-config-path={{ .Values.clusterProxyConfigPath }}
Giorgi Lekveishvili06a67912025-04-20 15:56:03 +040097 - --port={{ .Values.port }}
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +040098 {{- if .Values.appRepoAddr }}
99 - --app-repo-addr={{ .Values.appRepoAddr }}
100 {{- end}}
101 volumeMounts:
102 - name: ssh-key
103 readOnly: true
104 mountPath: /pcloud/ssh-key