diff --git a/charts/cryostat/templates/role.yaml b/charts/cryostat/templates/role.yaml deleted file mode 100644 index 98f96c60..00000000 --- a/charts/cryostat/templates/role.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- define "cryostat.createRole" -}} -{{- $ns := index . 0 -}} -{{- with index . 1 -}} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ include "cryostat.fullname" . }} - namespace: {{ $ns }} - labels: - {{- include "cryostat.labels" . | nindent 4 }} -rules: -- apiGroups: - - "" - resources: - - endpoints - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - pods - - replicationcontrollers - verbs: - - get -- apiGroups: - - apps - resources: - - replicasets - - deployments - - daemonsets - - statefulsets - verbs: - - get -- apiGroups: - - apps.openshift.io - resources: - - deploymentconfigs - verbs: - - get -- apiGroups: - - route.openshift.io - resources: - - routes - verbs: - - get - - list -{{- end -}} -{{- end -}} - -{{- if and .Values.rbac.create .Values.core.discovery.kubernetes.enabled -}} -{{- $watchNs := compact (default list .Values.core.discovery.kubernetes.namespaces) | uniq -}} -{{- if and (not $watchNs) (not .Values.core.discovery.kubernetes.installNamespaceDisabled) -}} -{{- $watchNs = list .Release.Namespace -}} -{{- end -}} -{{- range $ns := $watchNs }} -{{ include "cryostat.createRole" (list $ns $) }} -{{- end -}} -{{- end -}}