blob: 81898d4a926a02f06a58fa874b8a8f22edc89319 [file] [log] [blame]
Giorgi Lekveishvilicd46ca62023-07-07 11:58:35 +04001apiVersion: rbac.authorization.k8s.io/v1
Giorgi Lekveishvili7fb28bf2023-06-24 19:51:16 +04002kind: ClusterRole
3metadata:
Giorgi Lekveishvili9d037332023-07-06 19:48:49 +04004 name: {{ .Values.clusterRoleName }}
Giorgi Lekveishvili7fb28bf2023-06-24 19:51:16 +04005rules:
6- apiGroups:
7 - ""
8 resources:
9 - namespaces
10 verbs:
11 - create
12---
13apiVersion: rbac.authorization.k8s.io/v1
14kind: ClusterRoleBinding
15metadata:
Giorgi Lekveishvili9d037332023-07-06 19:48:49 +040016 name: {{ .Values.clusterRoleName }}
Giorgi Lekveishvili7fb28bf2023-06-24 19:51:16 +040017roleRef:
18 apiGroup: rbac.authorization.k8s.io
19 kind: ClusterRole
Giorgi Lekveishvili9d037332023-07-06 19:48:49 +040020 name: {{ .Values.clusterRoleName }}
Giorgi Lekveishvili7fb28bf2023-06-24 19:51:16 +040021subjects:
22- kind: ServiceAccount
23 name: default
24 namespace: {{ .Release.Namespace }}
25---
Giorgi Lekveishvili12850ee2023-06-22 13:11:17 +040026apiVersion: v1
27kind: Secret
28metadata:
29 name: ssh-key
30type: Opaque
31data:
32 private: {{ .Values.sshPrivateKey }}
33---
34apiVersion: v1
35kind: Service
36metadata:
37 name: welcome
38 namespace: {{ .Release.Namespace }}
39spec:
40 type: ClusterIP
41 selector:
42 app: welcome
43 ports:
44 - name: http
45 port: 80
46 targetPort: http
47 protocol: TCP
48---
49apiVersion: networking.k8s.io/v1
50kind: Ingress
51metadata:
52 name: ingress
53 namespace: {{ .Release.Namespace }}
Giorgi Lekveishviliaf940c82023-07-07 12:10:16 +040054 {{- if .Values.ingress.certificateIssuer }}
Giorgi Lekveishvili12850ee2023-06-22 13:11:17 +040055 annotations:
56 acme.cert-manager.io/http01-edit-in-place: "true"
57 cert-manager.io/cluster-issuer: {{ .Values.ingress.certificateIssuer}}
Giorgi Lekveishvili9d037332023-07-06 19:48:49 +040058 {{- end }}
Giorgi Lekveishvili12850ee2023-06-22 13:11:17 +040059spec:
60 ingressClassName: {{ .Values.ingress.className }}
Giorgi Lekveishviliaf940c82023-07-07 12:10:16 +040061 {{- if .Values.ingress.certificateIssuer }}
Giorgi Lekveishvili12850ee2023-06-22 13:11:17 +040062 tls:
63 - hosts:
64 - {{ .Values.ingress.domain }}
65 secretName: cert-welcome
Giorgi Lekveishvili9d037332023-07-06 19:48:49 +040066 {{- end }}
Giorgi Lekveishvili12850ee2023-06-22 13:11:17 +040067 rules:
68 - host: {{ .Values.ingress.domain }}
69 http:
70 paths:
71 - path: /
72 pathType: Prefix
73 backend:
74 service:
75 name: welcome
76 port:
77 name: http
78---
79apiVersion: apps/v1
80kind: Deployment
81metadata:
82 name: welcome
83 namespace: {{ .Release.Namespace }}
84spec:
85 selector:
86 matchLabels:
87 app: welcome
88 replicas: 1
89 template:
90 metadata:
91 labels:
92 app: welcome
93 spec:
94 volumes:
95 - name: ssh-key
96 secret:
97 secretName: ssh-key
98 containers:
99 - name: welcome
100 image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
101 imagePullPolicy: {{ .Values.image.pullPolicy }}
102 ports:
103 - name: http
104 containerPort: 8080
105 protocol: TCP
106 command:
107 - pcloud-installer
108 - welcome
109 - --repo-addr={{ .Values.repoAddr }}
110 - --ssh-key=/pcloud/ssh-key/private
111 - --port=8080
Giorgi Lekveishvilic89b9002023-12-21 13:09:26 +0400112 - --create-account-addr={{ .Values.createAccountAddr }}
Giorgi Lekveishvili0d2e9ad2024-03-13 13:30:15 +0400113 - --login-addr={{ .Values.loginAddr }}
gio2728e402024-08-01 18:14:21 +0400114 - --memberships-addr={{ .Values.membershipsAddr }}
Giorgi Lekveishvili12850ee2023-06-22 13:11:17 +0400115 volumeMounts:
116 - name: ssh-key
117 readOnly: true
118 mountPath: /pcloud/ssh-key