Skip to content
Closed
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
6 changes: 5 additions & 1 deletion charts/gateway-helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ To uninstall the chart:
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| 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. |
| 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. |
| config.deploy.type | string | `"ControllerNamespace"` | |
| config.envoyGateway.extensionApis | object | `{}` | |
| config.envoyGateway.gateway.controllerName | string | `"gateway.envoyproxy.io/gatewayclass-controller"` | |
| config.envoyGateway.logging.level.default | string | `"info"` | |
| config.envoyGateway.provider.type | string | `"Kubernetes"` | |
| createNamespace | bool | `false` | |
| deployment.envoyGateway.image.repository | string | `""` | |
| deployment.envoyGateway.image.tag | string | `""` | |
Expand Down
6 changes: 3 additions & 3 deletions charts/gateway-helm/templates/infra-manager-rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{ if .Values.config.envoyGateway.provider.kubernetes }}
{{ $kube := .Values.config.envoyGateway.provider.kubernetes }}
{{ if and (not $kube.watch) ($kube.deploy) (eq $kube.deploy.type "GatewayNamespace") }}
{{ $enabledInConfigmap := and (not $kube.watch) ($kube.deploy) (eq $kube.deploy.type "GatewayNamespace") }}
{{ $enabledInConfig := eq .Values.config.deploy.type "GatewayNamespace" }}
{{ if or $enabledInConfig $enabledInConfigmap }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down Expand Up @@ -28,7 +29,6 @@ subjects:
namespace: '{{ $.Release.Namespace }}'
---
{{ end }}
{{ end }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
Expand Down
4 changes: 4 additions & 0 deletions charts/gateway-helm/values.tmpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ hpa:
behavior: {}

config:
deploy:
# Deploy type controls which namespace EnvoyGateway will povison into.
# Optional value: ControllerNamespace, GatewayNamespace
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be inside provider.kubernetes

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to add a knob won't be part of configmap, so that users can enabled rbac first and reenable GNM later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

users will still need to then define twice, and the primary way to define configimap is via helm today

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either way is fine in this patch:

{{ if or $enabledInConfig $enabledInConfigmap }}

type: ControllerNamespace
# -- EnvoyGateway configuration. Visit https://gateway.envoyproxy.io/docs/api/extension_types/#envoygateway to view all options.
envoyGateway:
gateway:
Expand Down
6 changes: 5 additions & 1 deletion site/content/en/latest/install/gateway-helm-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ The Helm chart for Envoy Gateway
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| 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. |
| 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. |
| config.deploy.type | string | `"ControllerNamespace"` | |
| config.envoyGateway.extensionApis | object | `{}` | |
| config.envoyGateway.gateway.controllerName | string | `"gateway.envoyproxy.io/gatewayclass-controller"` | |
| config.envoyGateway.logging.level.default | string | `"info"` | |
| config.envoyGateway.provider.type | string | `"Kubernetes"` | |
| createNamespace | bool | `false` | |
| deployment.envoyGateway.image.repository | string | `""` | |
| deployment.envoyGateway.image.tag | string | `""` | |
Expand Down
5 changes: 2 additions & 3 deletions test/config/helm/gateway-namespace-mode.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
config:
deploy:
type: GatewayNamespace
envoyGateway:
gateway:
controllerName: gateway.envoyproxy.io/gatewayclass-controller
provider:
type: Kubernetes
kubernetes:
deploy:
type: GatewayNamespace
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
global:
images:
envoyGateway:
image: "docker.io/envoyproxy/gateway-dev:latest"
pullPolicy: Always
config:
deploy:
type: GatewayNamespace
Loading
Loading