ci: add Hugo blog CI/CD to k3s
Some checks failed
Deploy Hugo Blog to k3s / build-and-deploy (push) Failing after 4m5s
Some checks failed
Deploy Hugo Blog to k3s / build-and-deploy (push) Failing after 4m5s
- Enable Gitea Container Registry - Dockerfile: nginx:alpine serving hugo public/ - Gitea Actions: build & push image + deploy to k3s - k8s manifests: namespace hugo, deployment, service, ingress - RBAC: allow runner to update deployments in hugo ns - .gitignore: add public/ (CI builds it)
This commit is contained in:
26
deploy/hugo-rbac.yaml
Normal file
26
deploy/hugo-rbac.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: hugo-deployer
|
||||
namespace: hugo
|
||||
rules:
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["deployments"]
|
||||
verbs: ["get", "list", "watch", "patch", "update"]
|
||||
- apiGroups: [""]
|
||||
resources: ["pods"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: hugo-deployer-binding
|
||||
namespace: hugo
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: default
|
||||
namespace: gitea-runner
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: hugo-deployer
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
Reference in New Issue
Block a user