gitea runner improvements
This commit is contained in:
		| @@ -12,6 +12,7 @@ spec: | |||||||
|         app: actions-runner |         app: actions-runner | ||||||
|     spec: |     spec: | ||||||
|       hostname: kube-runner |       hostname: kube-runner | ||||||
|  |       serviceAccountName: actions-runner | ||||||
|       containers: |       containers: | ||||||
|       - name: actions-runner |       - name: actions-runner | ||||||
|         image: actions-runner |         image: actions-runner | ||||||
| @@ -29,3 +30,10 @@ spec: | |||||||
|               key: runner-token |               key: runner-token | ||||||
|         - name: GITEA_RUNNER_LABELS |         - name: GITEA_RUNNER_LABELS | ||||||
|           value: k8s |           value: k8s | ||||||
|  |         volumeMounts: | ||||||
|  |         - name: runner-data | ||||||
|  |           mountPath: /data | ||||||
|  |       volumes: | ||||||
|  |       - name: runner-data | ||||||
|  |         emptyDir: {} | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										38
									
								
								infrastructure/gitea/actions.rbac.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								infrastructure/gitea/actions.rbac.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | |||||||
|  | apiVersion: v1 | ||||||
|  | kind: ServiceAccount | ||||||
|  | metadata: | ||||||
|  |   name: actions-runner | ||||||
|  | --- | ||||||
|  | apiVersion: rbac.authorization.k8s.io/v1 | ||||||
|  | kind: Role | ||||||
|  | metadata: | ||||||
|  |   name: actions-role | ||||||
|  | rules: | ||||||
|  | - apiGroups: [""] | ||||||
|  |   resources: ["pods"] | ||||||
|  |   verbs: ["get", "list", "create", "delete"] | ||||||
|  | - apiGroups: [""] | ||||||
|  |   resources: ["pods/exec"] | ||||||
|  |   verbs: ["get", "create"] | ||||||
|  | - apiGroups: [""] | ||||||
|  |   resources: ["pods/log"] | ||||||
|  |   verbs: ["get", "list", "watch",] | ||||||
|  | - apiGroups: ["batch"] | ||||||
|  |   resources: ["jobs"] | ||||||
|  |   verbs: ["get", "list", "create", "delete"] | ||||||
|  | - apiGroups: [""] | ||||||
|  |   resources: ["secrets"] | ||||||
|  |   verbs: ["get", "list", "create", "delete"] | ||||||
|  | --- | ||||||
|  | kind: RoleBinding | ||||||
|  | apiVersion: rbac.authorization.k8s.io/v1 | ||||||
|  | metadata: | ||||||
|  |   name: actions-role-binding | ||||||
|  | subjects: | ||||||
|  | - kind: ServiceAccount | ||||||
|  |   name: actions-runner | ||||||
|  |   apiGroup: "" | ||||||
|  | roleRef: | ||||||
|  |   kind: Role | ||||||
|  |   name: actions-role | ||||||
|  |   apiGroup: rbac.authorization.k8s.io | ||||||
| @@ -10,6 +10,8 @@ resources: | |||||||
|   - drone-server.sealedsecret.yaml |   - drone-server.sealedsecret.yaml | ||||||
|   - actions.deployment.yaml |   - actions.deployment.yaml | ||||||
|   - actions.sealedsecret.yaml |   - actions.sealedsecret.yaml | ||||||
|  |   - actions.rbac.yaml | ||||||
|  |  | ||||||
|  |  | ||||||
| namespace: gitea | namespace: gitea | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user