Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user-facing role definitions for Envoy Gateway and Gateway API #4532

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions charts/gateway-helm/templates/k8s-roles-extension.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# These roles grant the standard Kubernetes "admin", "edit", and "view"
# roles access to Gateway API and Envoy-Gateway resources.
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-admin
labels:
{{- include "eg.labels" . | nindent 4 }}
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["*"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-edit
labels:
{{- include "eg.labels" . | nindent 4 }}
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["create", "update", "patch", "delete", "deletecollection"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-view
labels:
{{- include "eg.labels" . | nindent 4 }}
rbac.authorization.k8s.io/aggregate-to-view: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["get", "list", "watch"]
1 change: 1 addition & 0 deletions release-notes/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ security updates: |

# New features or capabilities added in this release.
new features: |
The Envoy Gateway Helm chart installs roles that grant the standard Kubernetes "admin", "edit", and "view" roles access to Gateway API and Envoy-Gateway resources.
Add a new feature here

# Fixes for bugs identified in previous versions.
Expand Down
54 changes: 54 additions & 0 deletions test/helm/gateway-helm/certjen-custom-scheduling.out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,60 @@ rules:
verbs:
- update
---
# Source: gateway-helm/templates/k8s-roles-extension.yaml
# These roles grant the standard Kubernetes "admin", "edit", and "view"
# roles access to Gateway API and Envoy-Gateway resources.
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-admin
labels:
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: gateway-helm
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["*"]
---
# Source: gateway-helm/templates/k8s-roles-extension.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-edit
labels:
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: gateway-helm
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["create", "update", "patch", "delete", "deletecollection"]
---
# Source: gateway-helm/templates/k8s-roles-extension.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-view
labels:
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: gateway-helm
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
rbac.authorization.k8s.io/aggregate-to-view: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["get", "list", "watch"]
---
# Source: gateway-helm/templates/envoy-gateway-rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
54 changes: 54 additions & 0 deletions test/helm/gateway-helm/control-plane-with-pdb.out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,60 @@ rules:
verbs:
- update
---
# Source: gateway-helm/templates/k8s-roles-extension.yaml
# These roles grant the standard Kubernetes "admin", "edit", and "view"
# roles access to Gateway API and Envoy-Gateway resources.
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-admin
labels:
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: gateway-helm
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["*"]
---
# Source: gateway-helm/templates/k8s-roles-extension.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-edit
labels:
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: gateway-helm
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["create", "update", "patch", "delete", "deletecollection"]
---
# Source: gateway-helm/templates/k8s-roles-extension.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-view
labels:
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: gateway-helm
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
rbac.authorization.k8s.io/aggregate-to-view: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["get", "list", "watch"]
---
# Source: gateway-helm/templates/envoy-gateway-rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
54 changes: 54 additions & 0 deletions test/helm/gateway-helm/default-config.out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,60 @@ rules:
verbs:
- update
---
# Source: gateway-helm/templates/k8s-roles-extension.yaml
# These roles grant the standard Kubernetes "admin", "edit", and "view"
# roles access to Gateway API and Envoy-Gateway resources.
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-admin
labels:
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: gateway-helm
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["*"]
---
# Source: gateway-helm/templates/k8s-roles-extension.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-edit
labels:
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: gateway-helm
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["create", "update", "patch", "delete", "deletecollection"]
---
# Source: gateway-helm/templates/k8s-roles-extension.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-view
labels:
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: gateway-helm
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
rbac.authorization.k8s.io/aggregate-to-view: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["get", "list", "watch"]
---
# Source: gateway-helm/templates/envoy-gateway-rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
54 changes: 54 additions & 0 deletions test/helm/gateway-helm/deployment-custom-topology.out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,60 @@ rules:
verbs:
- update
---
# Source: gateway-helm/templates/k8s-roles-extension.yaml
# These roles grant the standard Kubernetes "admin", "edit", and "view"
# roles access to Gateway API and Envoy-Gateway resources.
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-admin
labels:
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: gateway-helm
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["*"]
---
# Source: gateway-helm/templates/k8s-roles-extension.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-edit
labels:
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: gateway-helm
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["create", "update", "patch", "delete", "deletecollection"]
---
# Source: gateway-helm/templates/k8s-roles-extension.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-view
labels:
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: gateway-helm
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
rbac.authorization.k8s.io/aggregate-to-view: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["get", "list", "watch"]
---
# Source: gateway-helm/templates/envoy-gateway-rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
54 changes: 54 additions & 0 deletions test/helm/gateway-helm/deployment-images-config.out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,60 @@ rules:
verbs:
- update
---
# Source: gateway-helm/templates/k8s-roles-extension.yaml
# These roles grant the standard Kubernetes "admin", "edit", and "view"
# roles access to Gateway API and Envoy-Gateway resources.
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-admin
labels:
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: gateway-helm
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["*"]
---
# Source: gateway-helm/templates/k8s-roles-extension.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-edit
labels:
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: gateway-helm
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["create", "update", "patch", "delete", "deletecollection"]
---
# Source: gateway-helm/templates/k8s-roles-extension.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: envoy-gateway-namespaced-view
labels:
helm.sh/chart: gateway-helm-v0.0.0-latest
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: gateway-helm
app.kubernetes.io/version: "latest"
app.kubernetes.io/managed-by: Helm
rbac.authorization.k8s.io/aggregate-to-view: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["gateway.networking.k8s.io", "gateway.envoyproxy.io"]
resources: ["*"]
verbs: ["get", "list", "watch"]
---
# Source: gateway-helm/templates/envoy-gateway-rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
Loading
Loading