Skip to content

Commit

Permalink
Add Rancher projects rule (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasdinov authored Dec 13, 2023
1 parent b9b5e67 commit cd15973
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
Binary file modified assets/kubevirt/kubevirt-0.2.0.tgz
Binary file not shown.
11 changes: 6 additions & 5 deletions charts/kubevirt/0.2.0/templates/namespace-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ metadata:
"helm.sh/hook-weight": "1"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
kind: ClusterRole
metadata:
name: kubevirt-namespace-modifier
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/hook-delete-policy": hook-succeeded
Expand All @@ -23,12 +22,14 @@ rules:
resourceNames:
- {{ .Release.Namespace | quote }}
verbs: [ "get", "patch" ]
- apiGroups: [ "management.cattle.io" ] # Rancher
resources: [ "projects" ]
verbs: [ "updatepsa" ]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
kind: ClusterRoleBinding
metadata:
name: kubevirt-namespace-modifier
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/hook-delete-policy": hook-succeeded
Expand All @@ -38,7 +39,7 @@ subjects:
namespace: {{ .Release.Namespace }}
name: kubevirt-namespace-modifier
roleRef:
kind: Role
kind: ClusterRole
name: kubevirt-namespace-modifier
apiGroup: rbac.authorization.k8s.io
---
Expand Down
4 changes: 2 additions & 2 deletions index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ entries:
kubevirt:
- apiVersion: v2
appVersion: 1.1.0
created: "2023-12-11T19:30:04.351997+02:00"
created: "2023-12-13T13:58:22.119519+02:00"
description: A Helm chart for KubeVirt
digest: 6f822c871c485be8e75897117d71ee38b5f58080fb1b909f3764d935d6d67213
digest: 167fc276eee1b5c16e18753b89c1aac8b65cbcae638e06d661e62d749f1fdd86
icon: https://raw.githubusercontent.com/cncf/artwork/main/projects/kubevirt/icon/color/kubevirt-icon-color.svg
name: kubevirt
type: application
Expand Down
11 changes: 6 additions & 5 deletions packages/kubevirt/charts/templates/namespace-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ metadata:
"helm.sh/hook-weight": "1"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
kind: ClusterRole
metadata:
name: kubevirt-namespace-modifier
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/hook-delete-policy": hook-succeeded
Expand All @@ -23,12 +22,14 @@ rules:
resourceNames:
- {{ .Release.Namespace | quote }}
verbs: [ "get", "patch" ]
- apiGroups: [ "management.cattle.io" ] # Rancher
resources: [ "projects" ]
verbs: [ "updatepsa" ]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
kind: ClusterRoleBinding
metadata:
name: kubevirt-namespace-modifier
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/hook-delete-policy": hook-succeeded
Expand All @@ -38,7 +39,7 @@ subjects:
namespace: {{ .Release.Namespace }}
name: kubevirt-namespace-modifier
roleRef:
kind: Role
kind: ClusterRole
name: kubevirt-namespace-modifier
apiGroup: rbac.authorization.k8s.io
---
Expand Down

0 comments on commit cd15973

Please sign in to comment.