blob: f84e7bad766c870ac7a7b943d8128698af7acfc4 [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:
13 - "helm.toolkit.fluxcd.io"
14 resources:
15 - helmreleases
16 verbs:
17 - get
Giorgi Lekveishvili9d037332023-07-06 19:48:49 +040018---
19apiVersion: rbac.authorization.k8s.io/v1
20kind: ClusterRoleBinding
21metadata:
22 name: {{ .Values.clusterRoleName }}
23roleRef:
24 apiGroup: rbac.authorization.k8s.io
25 kind: ClusterRole
26 name: {{ .Values.clusterRoleName }}
27subjects:
28- kind: ServiceAccount
29 name: default
30 namespace: {{ .Release.Namespace }}
31---
Giorgi Lekveishvilida912e72023-07-06 18:48:55 +040032apiVersion: v1
33kind: Secret
34metadata:
35 name: ssh-key
36type: Opaque
37data:
38 private: {{ .Values.sshPrivateKey }}
39---
40apiVersion: v1
41kind: Service
42metadata:
43 name: appmanager
44 namespace: {{ .Release.Namespace }}
45spec:
46 type: ClusterIP
47 selector:
48 app: appmanager
49 ports:
Giorgi Lekveishvili3c91e8b2024-03-25 20:20:14 +040050 - name: {{ .Values.portName }}
Giorgi Lekveishvilida912e72023-07-06 18:48:55 +040051 port: 80
52 targetPort: http
53 protocol: TCP
54---
Giorgi Lekveishvilida912e72023-07-06 18:48:55 +040055apiVersion: apps/v1
56kind: Deployment
57metadata:
58 name: appmanager
59 namespace: {{ .Release.Namespace }}
60spec:
61 selector:
62 matchLabels:
63 app: appmanager
64 replicas: 1
65 template:
66 metadata:
67 labels:
68 app: appmanager
69 spec:
70 volumes:
71 - name: ssh-key
72 secret:
73 secretName: ssh-key
74 containers:
75 - name: appmanager
76 image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
77 imagePullPolicy: {{ .Values.image.pullPolicy }}
78 ports:
79 - name: http
80 containerPort: 8080
81 protocol: TCP
82 command:
83 - pcloud-installer
84 - appmanager
85 - --repo-addr={{ .Values.repoAddr }}
86 - --ssh-key=/pcloud/ssh-key/private
87 - --port=8080
Giorgi Lekveishvili4586b4b2023-11-08 17:09:28 +040088 {{- if .Values.appRepoAddr }}
89 - --app-repo-addr={{ .Values.appRepoAddr }}
90 {{- end}}
Giorgi Lekveishvilida912e72023-07-06 18:48:55 +040091 volumeMounts:
92 - name: ssh-key
93 readOnly: true
94 mountPath: /pcloud/ssh-key