Skip to content

Commit

Permalink
Merge pull request #7 from port-labs/PORT-2492-k-8-s-exporter-add-clu…
Browse files Browse the repository at this point in the history
…ster-role-apigroups-and-resources-to-values

Add cluster role apiGroups and resources to Helm chart values
  • Loading branch information
talsabagport authored Jan 3, 2023
2 parents ddcf51d + fae5d6d commit f4a4d1f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/port-k8s-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions charts/port-k8s-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | `{}` |
Expand Down
10 changes: 8 additions & 2 deletions charts/port-k8s-exporter/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions charts/port-k8s-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ serviceAccount:
clusterRole:
annotations: {}
name: ""
apiGroups:
- "*"
resources:
- "*"

clusterRoleBinding:
annotations: {}
Expand Down

0 comments on commit f4a4d1f

Please sign in to comment.