-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Provide support for enabling ingress controller (experimental, …
…breaking) (#245) * Basic setup without RBAC * RBAC support * Add link to repo Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com> --------- Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
- Loading branch information
1 parent
2e5cf07
commit a1d6121
Showing
5 changed files
with
75 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
helm-charts/azure-api-management-gateway/templates/ingress-controller.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{{- $doesSupportStableIngress := .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}} | ||
{{- if and (.Values.ingress.controller.enabled) ($doesSupportStableIngress) -}} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: IngressClass | ||
metadata: | ||
name: {{ include "azure-api-management-gateway.fullname" . }} | ||
labels: | ||
{{- include "azure-api-management-gateway.labels" . | nindent 4 }} | ||
{{- with .Values.ingress.controller.ingressClass.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
controller: {{ .Values.ingress.controller.ingressClass.controller | quote }} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: {{ include "azure-api-management-gateway.fullname" . }}-rbac | ||
labels: | ||
{{- include "azure-api-management-gateway.labels" . | nindent 4 }} | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- secrets | ||
- namespaces | ||
verbs: | ||
- get | ||
- watch | ||
- get | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- services | ||
verbs: | ||
- get | ||
- watch | ||
- get | ||
- apiGroups: | ||
- networking.k8s.io | ||
resources: | ||
- ingresses | ||
verbs: | ||
- list | ||
- watch | ||
- get | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: {{ include "azure-api-management-gateway.fullname" . }} | ||
labels: | ||
{{- include "azure-api-management-gateway.labels" . | nindent 4 }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: {{ include "azure-api-management-gateway.fullname" . }}-rbac | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ .Values.serviceAccountName }} | ||
namespace: {{ .Release.Namespace }} | ||
{{- end }} |
49 changes: 0 additions & 49 deletions
49
helm-charts/azure-api-management-gateway/templates/ingress-stable.yaml
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters