Skip to content

Commit

Permalink
Update nirmata-kube-controller.yaml with aggregated cluster role (#486)
Browse files Browse the repository at this point in the history
* Update nirmata-kube-controller.yaml with aggregated cluster role

* add kube controller flags to have write clusterroles

* chart version bump
  • Loading branch information
krishbajaj1609 authored Jan 5, 2025
1 parent af782ea commit 8b81aa4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 34 deletions.
2 changes: 1 addition & 1 deletion charts/nirmata-kube-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.5
version: 0.1.6

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ type: kubernetes.io/service-account-token
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: nirmata:readonly
name: nirmata:readonly-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: nirmata:readonly
name: view
subjects:
- kind: ServiceAccount
name: nirmata
Expand All @@ -39,32 +39,18 @@ roleRef:
kind: ClusterRole
name: admin
subjects:
- kind: ServiceAccount
name: nirmata
namespace: {{ .Values.namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: nirmata:view
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: view
subjects:
- kind: ServiceAccount
name: nirmata
namespace: {{ .Values.namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations: {}
name: nirmata:readonly
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
rules:
- apiGroups:
- kyverno.io
- operator.kyverno.io
- apiGroups: ["kyverno.io", "operator.kyverno.io"]
resources:
- policies
- policies/status
Expand All @@ -77,36 +63,38 @@ rules:
- generaterequests/status
verbs:
- get
- watch
- list
- apiGroups:
- wgpolicyk8s.io
- watch
{{ if .Values.enablePolicyExceptions }}
- create
- update
- patch
- delete
{{ end }}
- apiGroups: ["wgpolicyk8s.io"]
resources:
- policyreports
- policyreports/status
- clusterpolicyreports
- clusterpolicyreports/status
verbs:
- get
- watch
- list
- apiGroups:
- policy.kubernetes.io
- watch
- apiGroups: ["policy.kubernetes.io"]
resources:
- reportchangerequests
- reportchangerequests/status
- clusterreportchangerequests
- clusterreportchangerequests/status
verbs:
- get
- watch
- list
- apiGroups:
- security.nirmata.io
- watch
- apiGroups: ["security.nirmata.io"]
resources:
- imagekeys
- imagekeys/status
- imagekeys/finalizers
- kyvernoes
- kyvernoes/status
- policysets
Expand All @@ -117,17 +105,22 @@ rules:
- kyvernoconfigs/status
verbs:
- get
- watch
- list
- apiGroups:
- ''
- watch
{{ if .Values.enablePolicySets }}
- create
- update
- patch
- delete
{{ end }}
- apiGroups: [""]
resources:
- nodes
- componentstatuses
verbs:
- get
- watch
- list
- watch
---
apiVersion: v1
kind: ConfigMap
Expand Down
4 changes: 4 additions & 0 deletions charts/nirmata-kube-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ cluster:
# to use apiToken, please specify the token directly, no base64 encode needed
# apiToken: ""

enablePolicyExceptions: false
enablePolicySets: false


proxy:
httpProxy: ""
httpsProxy: ""
Expand Down

0 comments on commit 8b81aa4

Please sign in to comment.