Skip to content

Commit 8581ed7

Browse files
committed
helm: add controls for rendering clusterrole
Signed-off-by: zirain <[email protected]>
1 parent eb7266c commit 8581ed7

File tree

6 files changed

+787
-5
lines changed

6 files changed

+787
-5
lines changed

charts/gateway-helm/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ To uninstall the chart:
6060
| Key | Type | Default | Description |
6161
|-----|------|---------|-------------|
6262
| certgen | object | `{"job":{"affinity":{},"annotations":{},"args":[],"nodeSelector":{},"resources":{},"securityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532,"seccompProfile":{"type":"RuntimeDefault"}},"tolerations":[],"ttlSecondsAfterFinished":30},"rbac":{"annotations":{},"labels":{}}}` | Certgen is used to generate the certificates required by EnvoyGateway. If you want to construct a custom certificate, you can generate a custom certificate through Cert-Manager before installing EnvoyGateway. Certgen will not overwrite the custom certificate. Please do not manually modify `values.yaml` to disable certgen, it may cause EnvoyGateway OIDC,OAuth2,etc. to not work as expected. |
63-
| config.envoyGateway | object | `{"extensionApis":{},"gateway":{"controllerName":"gateway.envoyproxy.io/gatewayclass-controller"},"logging":{"level":{"default":"info"}},"provider":{"type":"Kubernetes"}}` | EnvoyGateway configuration. Visit https://gateway.envoyproxy.io/docs/api/extension_types/#envoygateway to view all options. |
63+
| config.deploy.type | string | `"ControllerNamespace"` | |
64+
| config.envoyGateway.extensionApis | object | `{}` | |
65+
| config.envoyGateway.gateway.controllerName | string | `"gateway.envoyproxy.io/gatewayclass-controller"` | |
66+
| config.envoyGateway.logging.level.default | string | `"info"` | |
67+
| config.envoyGateway.provider.type | string | `"Kubernetes"` | |
6468
| createNamespace | bool | `false` | |
6569
| deployment.envoyGateway.image.repository | string | `""` | |
6670
| deployment.envoyGateway.image.tag | string | `""` | |

charts/gateway-helm/templates/infra-manager-rbac.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
{{ if .Values.config.envoyGateway.provider.kubernetes }}
21
{{ $kube := .Values.config.envoyGateway.provider.kubernetes }}
3-
{{ if and (not $kube.watch) ($kube.deploy) (eq $kube.deploy.type "GatewayNamespace") }}
2+
{{ $enabledInConfigmap := and (not $kube.watch) ($kube.deploy) (eq $kube.deploy.type "GatewayNamespace") }}
3+
{{ $enabledInConfig := eq .Values.config.deploy.type "GatewayNamespace" }}
4+
{{ if or $enabledInConfig $enabledInConfigmap }}
45
---
56
apiVersion: rbac.authorization.k8s.io/v1
67
kind: ClusterRole
@@ -28,7 +29,6 @@ subjects:
2829
namespace: '{{ $.Release.Namespace }}'
2930
---
3031
{{ end }}
31-
{{ end }}
3232
apiVersion: rbac.authorization.k8s.io/v1
3333
kind: Role
3434
metadata:

charts/gateway-helm/values.tmpl.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ hpa:
9393
behavior: {}
9494

9595
config:
96+
deploy:
97+
# Deploy type controls which namespace EnvoyGateway will povison into.
98+
# Optional value: ControllerNamespace, GatewayNamespace
99+
type: ControllerNamespace
96100
# -- EnvoyGateway configuration. Visit https://gateway.envoyproxy.io/docs/api/extension_types/#envoygateway to view all options.
97101
envoyGateway:
98102
gateway:

site/content/en/latest/install/gateway-helm-api.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ The Helm chart for Envoy Gateway
2424
| Key | Type | Default | Description |
2525
|-----|------|---------|-------------|
2626
| certgen | object | `{"job":{"affinity":{},"annotations":{},"args":[],"nodeSelector":{},"resources":{},"securityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532,"seccompProfile":{"type":"RuntimeDefault"}},"tolerations":[],"ttlSecondsAfterFinished":30},"rbac":{"annotations":{},"labels":{}}}` | Certgen is used to generate the certificates required by EnvoyGateway. If you want to construct a custom certificate, you can generate a custom certificate through Cert-Manager before installing EnvoyGateway. Certgen will not overwrite the custom certificate. Please do not manually modify `values.yaml` to disable certgen, it may cause EnvoyGateway OIDC,OAuth2,etc. to not work as expected. |
27-
| config.envoyGateway | object | `{"extensionApis":{},"gateway":{"controllerName":"gateway.envoyproxy.io/gatewayclass-controller"},"logging":{"level":{"default":"info"}},"provider":{"type":"Kubernetes"}}` | EnvoyGateway configuration. Visit https://gateway.envoyproxy.io/docs/api/extension_types/#envoygateway to view all options. |
27+
| config.deploy.type | string | `"ControllerNamespace"` | |
28+
| config.envoyGateway.extensionApis | object | `{}` | |
29+
| config.envoyGateway.gateway.controllerName | string | `"gateway.envoyproxy.io/gatewayclass-controller"` | |
30+
| config.envoyGateway.logging.level.default | string | `"info"` | |
31+
| config.envoyGateway.provider.type | string | `"Kubernetes"` | |
2832
| createNamespace | bool | `false` | |
2933
| deployment.envoyGateway.image.repository | string | `""` | |
3034
| deployment.envoyGateway.image.tag | string | `""` | |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
global:
2+
images:
3+
envoyGateway:
4+
image: "docker.io/envoyproxy/gateway-dev:latest"
5+
pullPolicy: Always
6+
config:
7+
deploy:
8+
type: GatewayNamespace

0 commit comments

Comments
 (0)