-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate RBAC for KKP integration using helm chart (#79)
Signed-off-by: Waleed Malik <[email protected]>
- Loading branch information
1 parent
eec2a1a
commit c7bfd49
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{{- if .Values.kkpintegration.rbac -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: kubelb-kkp | ||
namespace: {{ .Release.Namespace }} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: kubelb-kkp | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- namespaces | ||
# Required to copy kubelb-ccm-kubeconfig secret for the tenant in the KKP seed cluster. | ||
- secrets | ||
verbs: | ||
- get | ||
- list | ||
- apiGroups: | ||
- kubelb.k8c.io | ||
resources: | ||
- tenants | ||
- configs | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- create | ||
- update | ||
- delete | ||
- patch | ||
- apiGroups: | ||
- kubelb.k8c.io | ||
resources: | ||
- routes | ||
- loadbalancers | ||
- addresses | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: kubelb-kkp | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: kubelb-kkp | ||
subjects: | ||
- kind: ServiceAccount | ||
name: kubelb-kkp | ||
namespace: {{ .Release.Namespace }} | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: kubelb-kkp-token | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
kubernetes.io/service-account.name: kubelb-kkp | ||
type: kubernetes.io/service-account-token | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters