| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 1 | # TODO(giolekva): finish |
| 2 | apiVersion: v1 |
| 3 | kind: Namespace |
| 4 | metadata: |
| Giorgi Lekveishvili | 4549c35 | 2023-07-20 10:18:52 +0400 | [diff] [blame] | 5 | name: dodo |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 6 | --- |
| 7 | apiVersion: v1 |
| 8 | kind: ServiceAccount |
| 9 | metadata: |
| Giorgi Lekveishvili | 4549c35 | 2023-07-20 10:18:52 +0400 | [diff] [blame] | 10 | name: dodo-bootstrap |
| 11 | namespace: dodo |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 12 | --- |
| 13 | apiVersion: rbac.authorization.k8s.io/v1 |
| 14 | kind: ClusterRole |
| 15 | metadata: |
| Giorgi Lekveishvili | 4549c35 | 2023-07-20 10:18:52 +0400 | [diff] [blame] | 16 | name: dodo-bootstrap |
| 17 | namespace: dodo |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 18 | rules: |
| 19 | - apiGroups: |
| Giorgi Lekveishvili | 4549c35 | 2023-07-20 10:18:52 +0400 | [diff] [blame] | 20 | - "*" |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 21 | resources: |
| Giorgi Lekveishvili | 4549c35 | 2023-07-20 10:18:52 +0400 | [diff] [blame] | 22 | - "*" |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 23 | verbs: |
| Giorgi Lekveishvili | 4549c35 | 2023-07-20 10:18:52 +0400 | [diff] [blame] | 24 | - "*" |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 25 | --- |
| 26 | apiVersion: rbac.authorization.k8s.io/v1 |
| 27 | kind: ClusterRoleBinding |
| 28 | metadata: |
| Giorgi Lekveishvili | 4549c35 | 2023-07-20 10:18:52 +0400 | [diff] [blame] | 29 | name: dodo-bootstrap |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 30 | roleRef: |
| 31 | apiGroup: rbac.authorization.k8s.io |
| 32 | kind: ClusterRole |
| Giorgi Lekveishvili | 4549c35 | 2023-07-20 10:18:52 +0400 | [diff] [blame] | 33 | name: dodo-bootstrap |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 34 | subjects: |
| 35 | - kind: ServiceAccount |
| Giorgi Lekveishvili | 4549c35 | 2023-07-20 10:18:52 +0400 | [diff] [blame] | 36 | name: dodo-bootstrap |
| 37 | namespace: dodo |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 38 | --- |
| 39 | apiVersion: v1 |
| 40 | kind: ConfigMap |
| 41 | metadata: |
| 42 | name: admin-pub-key |
| Giorgi Lekveishvili | 4549c35 | 2023-07-20 10:18:52 +0400 | [diff] [blame] | 43 | namespace: dodo |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 44 | data: # TODO(giolekva): can it work without ssh-ed25519 prefix |
| 45 | key.pub: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOa7FUrmXzdY3no8qNGUk7OPaRcIUi8G7MVbLlff9eB/ |
| 46 | --- |
| 47 | apiVersion: batch/v1 |
| 48 | kind: Job |
| 49 | metadata: |
| Giorgi Lekveishvili | 4549c35 | 2023-07-20 10:18:52 +0400 | [diff] [blame] | 50 | name: dodo-bootstrap |
| 51 | namespace: dodo |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 52 | spec: |
| 53 | template: |
| 54 | spec: |
| Giorgi Lekveishvili | 4549c35 | 2023-07-20 10:18:52 +0400 | [diff] [blame] | 55 | serviceAccountName: dodo-bootstrap |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 56 | volumes: |
| 57 | - name: admin-pub-key |
| 58 | configMap: |
| 59 | name: admin-pub-key |
| 60 | containers: |
| 61 | - name: pcloud-bootstrap |
| 62 | image: giolekva/pcloud-installer:latest |
| 63 | imagePullPolicy: Always |
| 64 | volumeMounts: |
| 65 | - name: admin-pub-key |
| 66 | mountPath: /admin-pub-key |
| 67 | command: |
| 68 | - pcloud-installer |
| 69 | - bootstrap |
| Giorgi Lekveishvili | 4549c35 | 2023-07-20 10:18:52 +0400 | [diff] [blame] | 70 | - --env-name=dodo |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 71 | - --admin-pub-key=/admin-pub-key/key.pub |
| Giorgi Lekveishvili | 4549c35 | 2023-07-20 10:18:52 +0400 | [diff] [blame] | 72 | - --from-ip=192.168.0.210 |
| 73 | - --to-ip=192.168.0.240 |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 74 | - --charts-dir=/charts |
| 75 | - --storage-dir=/pcloud-storage/longhorn |
| 76 | restartPolicy: Never |