Skip to content
Snippets Groups Projects
Verified Commit 5ec39ce8 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

fix(goharbor): Limit permissions for goharbor helm release

This patch adds a new service-account that is used by flux to deploy
harbor to the namespace. This reduces the risk if the helm chart
contains any malicious objects to be contained in the namespace.
parent 8bd381fd
No related branches found
No related tags found
No related merge requests found
...@@ -4,3 +4,33 @@ metadata: ...@@ -4,3 +4,33 @@ metadata:
name: goharbor name: goharbor
labels: labels:
name: goharbor name: goharbor
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: flux-reconciler
namespace: goharbor
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: flux-reconciler
namespace: goharbor
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: flux-reconciler
namespace: goharbor
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: flux-reconciler
subjects:
- kind: ServiceAccount
name: flux-reconciler
namespace: goharbor
...@@ -4,6 +4,7 @@ metadata: ...@@ -4,6 +4,7 @@ metadata:
name: goharbor name: goharbor
namespace: goharbor namespace: goharbor
spec: spec:
serviceAccountName: flux-reconciler
timeout: 15m timeout: 15m
releaseName: harbor releaseName: harbor
chart: chart:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment