Revert "[bitnami/external-dns] only create clusterrole if not limited to namespace (#3412)" (#3592)

This reverts commit 4b0d529aeb.
This commit is contained in:
Rafael Ríos Saavedra
2020-09-03 10:36:55 +02:00
committed by GitHub
parent 4b0d529aeb
commit f461a0c024
5 changed files with 3 additions and 103 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: external-dns
version: 3.4.0
version: 3.3.0
appVersion: 0.7.3
description: ExternalDNS is a Kubernetes addon that configures public DNS servers with information about exposed Kubernetes services to make them discoverable.
keywords:

View File

@@ -1,4 +1,4 @@
{{- if and .Values.rbac.create (not .Values.namespace) }}
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }}
kind: ClusterRole
metadata:

View File

@@ -1,4 +1,4 @@
{{- if and .Values.rbac.create (not .Values.namespace) }}
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }}
kind: ClusterRoleBinding
metadata:

View File

@@ -1,84 +0,0 @@
{{- if and .Values.rbac.create .Values.namespace }}
apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }}
kind: Role
metadata:
name: {{ template "external-dns.fullname" . }}
namespace: {{ .Values.namespace }}
labels: {{ include "external-dns.labels" . | nindent 4 }}
rules:
- apiGroups:
- ""
resources:
- services
- pods
- endpoints
verbs:
- get
- list
- watch
- apiGroups:
- extensions
- "networking.k8s.io"
resources:
- ingresses
verbs:
- get
- list
- watch
- apiGroups:
- networking.istio.io
resources:
- gateways
- virtualservices
verbs:
- get
- list
- watch
- apiGroups:
- zalando.org
resources:
- routegroups
verbs:
- get
- list
- watch
- apiGroups:
- zalando.org
resources:
- routegroups/status
verbs:
- patch
- update
{{- if or .Values.crd.create .Values.crd.apiversion }}
- apiGroups:
{{- if .Values.crd.create }}
- externaldns.k8s.io
{{- else }}
- {{ $api := splitn "/" 2 .Values.crd.apiversion }}{{ $api._0 }}
{{- end }}
resources:
{{- if .Values.crd.create }}
- dnsendpoints
{{- else }}
- {{ printf "%ss" (.Values.crd.kind | lower) }}
{{- end }}
verbs:
- get
- list
- watch
- apiGroups:
{{- if .Values.crd.create }}
- externaldns.k8s.io
{{- else }}
- {{ $api := splitn "/" 2 .Values.crd.apiversion }}{{ $api._0 }}
{{- end }}
resources:
{{- if .Values.crd.create }}
- dnsendpoints/status
{{- else }}
- {{ printf "%ss/status" (.Values.crd.kind | lower) }}
{{- end }}
verbs:
- update
{{- end }}
{{- end }}

View File

@@ -1,16 +0,0 @@
{{- if and .Values.rbac.create .Values.namespace }}
apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }}
kind: RoleBinding
metadata:
name: {{ template "external-dns.fullname" . }}
namespace: {{ .Values.namespace }}
labels: {{ include "external-dns.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ template "external-dns.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "external-dns.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}