diff --git a/charts/port-k8s-exporter/Chart.yaml b/charts/port-k8s-exporter/Chart.yaml index c59984c..e226e58 100644 --- a/charts/port-k8s-exporter/Chart.yaml +++ b/charts/port-k8s-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: port-k8s-exporter description: A Helm chart for Port Kubernetes Exporter type: application -version: 0.1.7 +version: 0.1.8 appVersion: "0.1.6" home: https://getport.io/ sources: diff --git a/charts/port-k8s-exporter/README.md b/charts/port-k8s-exporter/README.md index d8da733..34e7fd2 100644 --- a/charts/port-k8s-exporter/README.md +++ b/charts/port-k8s-exporter/README.md @@ -68,6 +68,8 @@ The following table lists the configuration parameters of the `port-k8s-exporter | `serviceAccount.name` | ServiceAccount object name | `""` | | `clusterRole.annotations` | Annotations for ClusterRole object | `{}` | | `clusterRole.name` | ClusterRole object name | `""` | +| `clusterRole.apiGroups` | ClusterRole apiGroups | `"{'*'}"` | +| `clusterRole.resources` | ClusterRole resources | `"{'*'}"` | | `clusterRoleBinding.annotations` | Annotations for ClusterRoleBinding object | `{}` | | `clusterRoleBinding.name` | ClusterRoleBinding object name | `""` | | `podAnnotations` | Annotations to be added to the pod | `{}` | diff --git a/charts/port-k8s-exporter/templates/serviceaccount.yaml b/charts/port-k8s-exporter/templates/serviceaccount.yaml index a941ec3..8e4759b 100644 --- a/charts/port-k8s-exporter/templates/serviceaccount.yaml +++ b/charts/port-k8s-exporter/templates/serviceaccount.yaml @@ -22,8 +22,14 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} rules: - - apiGroups: ["*"] - resources: ["*"] + - apiGroups: + {{- range .Values.clusterRole.apiGroups }} + - {{ . }} + {{- end }} + resources: + {{- range .Values.clusterRole.resources }} + - {{ . }} + {{- end }} verbs: ["get", "watch", "list"] --- apiVersion: rbac.authorization.k8s.io/v1 diff --git a/charts/port-k8s-exporter/values.yaml b/charts/port-k8s-exporter/values.yaml index b7372b5..82d9d10 100644 --- a/charts/port-k8s-exporter/values.yaml +++ b/charts/port-k8s-exporter/values.yaml @@ -31,6 +31,10 @@ serviceAccount: clusterRole: annotations: {} name: "" + apiGroups: + - "*" + resources: + - "*" clusterRoleBinding: annotations: {}