Skip to content

Commit

Permalink
Enable Support for PodDisruptionBudget with eg control plane
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Volchok <[email protected]>
  • Loading branch information
alexwo committed Jun 5, 2024
1 parent 607d8bc commit 5698a61
Show file tree
Hide file tree
Showing 11 changed files with 209 additions and 1 deletion.
86 changes: 86 additions & 0 deletions charts/gateway-addons-helm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# gateway-addons-helm

![Version: v0.0.0-latest](https://img.shields.io/badge/Version-v0.0.0--latest-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)

An Add-ons Helm chart for Envoy Gateway

**Homepage:** <https://gateway.envoyproxy.io/>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| envoy-gateway-steering-committee | | <https://github.com/envoyproxy/gateway/blob/main/GOVERNANCE.md> |
| envoy-gateway-maintainers | | <https://github.com/envoyproxy/gateway/blob/main/CODEOWNERS> |

## Source Code

* <https://github.com/envoyproxy/gateway>

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| https://grafana.github.io/helm-charts | grafana | 6.58.4 |
| https://prometheus-community.github.io/helm-charts | prometheus | 23.1.0 |

## Usage

[Helm](https://helm.sh) must be installed to use the charts. Please refer to
Helm's [documentation](https://helm.sh/docs) to get started.

### Install from DockerHub

Once Helm has been set up correctly, install the chart from dockerhub:

``` shell
helm install eg oci://docker.io/envoyproxy/gateway-helm --version v0.0.0-latest -n envoy-gateway-system --create-namespace
```
You can find all helm chart release in [Dockerhub](https://hub.docker.com/r/envoyproxy/gateway-helm/tags)

### Install from Source Code

You can also install the helm chart from the source code:

To install the eg chart along with Gateway API CRDs and Envoy Gateway CRDs:

``` shell
make kube-deploy TAG=latest
```

### Skip install CRDs

You can install the eg chart along without Gateway API CRDs and Envoy Gateway CRDs, make sure CRDs exist in Cluster first if you want to skip to install them, otherwise EG may fail to start:

``` shell
helm install eg --create-namespace oci://docker.io/envoyproxy/gateway-helm --version v0.0.0-latest -n envoy-gateway-system --skip-crds
```

To uninstall the chart:

``` shell
helm delete eg
```

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| grafana.adminPassword | string | `"admin"` | |
| grafana.datasources."datasources.yaml".apiVersion | int | `1` | |
| grafana.datasources."datasources.yaml".datasources[0].name | string | `"Prometheus"` | |
| grafana.datasources."datasources.yaml".datasources[0].type | string | `"prometheus"` | |
| grafana.datasources."datasources.yaml".datasources[0].url | string | `"http://prometheus-server"` | |
| grafana.service.type | string | `"LoadBalancer"` | |
| prometheus.alertmanager.enabled | bool | `false` | |
| prometheus.kube-state-metrics.enabled | bool | `false` | |
| prometheus.prometheus-node-exporter.enabled | bool | `false` | |
| prometheus.prometheus-pushgateway.enabled | bool | `false` | |
| prometheus.server.fullnameOverride | string | `"prometheus"` | |
| prometheus.server.global.scrape_interval | string | `"15s"` | |
| prometheus.server.image.repository | string | `"prom/prometheus"` | |
| prometheus.server.persistentVolume.enabled | bool | `false` | |
| prometheus.server.readinessProbeInitialDelay | int | `0` | |
| prometheus.server.securityContext | string | `nil` | |
| prometheus.server.service.type | string | `"LoadBalancer"` | |

50 changes: 50 additions & 0 deletions charts/gateway-addons-helm/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
+++
title = "Gateway Helm Chart"
+++

![Version: v0.0.0-latest](https://img.shields.io/badge/Version-v0.0.0--latest-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)

An Add-ons Helm chart for Envoy Gateway

**Homepage:** <https://gateway.envoyproxy.io/>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| envoy-gateway-steering-committee | | <https://github.com/envoyproxy/gateway/blob/main/GOVERNANCE.md> |
| envoy-gateway-maintainers | | <https://github.com/envoyproxy/gateway/blob/main/CODEOWNERS> |

## Source Code

* <https://github.com/envoyproxy/gateway>

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| https://grafana.github.io/helm-charts | grafana | 6.58.4 |
| https://prometheus-community.github.io/helm-charts | prometheus | 23.1.0 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| grafana.adminPassword | string | `"admin"` | |
| grafana.datasources."datasources.yaml".apiVersion | int | `1` | |
| grafana.datasources."datasources.yaml".datasources[0].name | string | `"Prometheus"` | |
| grafana.datasources."datasources.yaml".datasources[0].type | string | `"prometheus"` | |
| grafana.datasources."datasources.yaml".datasources[0].url | string | `"http://prometheus-server"` | |
| grafana.service.type | string | `"LoadBalancer"` | |
| prometheus.alertmanager.enabled | bool | `false` | |
| prometheus.kube-state-metrics.enabled | bool | `false` | |
| prometheus.prometheus-node-exporter.enabled | bool | `false` | |
| prometheus.prometheus-pushgateway.enabled | bool | `false` | |
| prometheus.server.fullnameOverride | string | `"prometheus"` | |
| prometheus.server.global.scrape_interval | string | `"15s"` | |
| prometheus.server.image.repository | string | `"prom/prometheus"` | |
| prometheus.server.persistentVolume.enabled | bool | `false` | |
| prometheus.server.readinessProbeInitialDelay | int | `0` | |
| prometheus.server.securityContext | string | `nil` | |
| prometheus.server.service.type | string | `"LoadBalancer"` | |

1 change: 1 addition & 0 deletions charts/gateway-helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,5 @@ To uninstall the chart:
| global.images.ratelimit.pullPolicy | string | `"IfNotPresent"` | |
| global.images.ratelimit.pullSecrets | list | `[]` | |
| kubernetesClusterDomain | string | `"cluster.local"` | |
| podDisruptionBudget.minAvailable | int | `0` | |

12 changes: 12 additions & 0 deletions charts/gateway-helm/templates/envoy-gateway-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ metadata:
labels:
{{- include "eg.labels" . | nindent 4 }}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: envoy-gateway
namespace: '{{ .Release.Namespace }}'
spec:
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
selector:
matchLabels:
control-plane: envoy-gateway
{{- include "eg.selectorLabels" . | nindent 6 }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
3 changes: 2 additions & 1 deletion charts/gateway-helm/values.tmpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ global:
pullPolicy: IfNotPresent
# List of secrets in the same namespace of the component that can be used to pull images from private repositories.
pullSecrets: []

podDisruptionBudget:
minAvailable: 0
deployment:
envoyGateway:
image:
Expand Down
1 change: 1 addition & 0 deletions site/content/en/latest/install/gateway-helm-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ The Helm chart for Envoy Gateway
| global.images.ratelimit.pullPolicy | string | `"IfNotPresent"` | |
| global.images.ratelimit.pullSecrets | list | `[]` | |
| kubernetesClusterDomain | string | `"cluster.local"` | |
| podDisruptionBudget.minAvailable | int | `0` | |

1 change: 1 addition & 0 deletions site/content/zh/latest/install/gateway-helm-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ The Helm chart for Envoy Gateway
| global.images.ratelimit.pullPolicy | string | `"IfNotPresent"` | |
| global.images.ratelimit.pullSecrets | list | `[]` | |
| kubernetesClusterDomain | string | `"cluster.local"` | |
| podDisruptionBudget.minAvailable | int | `0` | |

14 changes: 14 additions & 0 deletions test/helm/default-config.out.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
---
# Source: gateway-helm/templates/envoy-gateway-deployment.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: envoy-gateway
namespace: 'envoy-gateway-system'
spec:
minAvailable: 0
selector:
matchLabels:
control-plane: envoy-gateway
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: eg
---
# Source: gateway-helm/templates/envoy-gateway-deployment.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down
14 changes: 14 additions & 0 deletions test/helm/deployment-images-config.out.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
---
# Source: gateway-helm/templates/envoy-gateway-deployment.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: envoy-gateway
namespace: 'envoy-gateway-system'
spec:
minAvailable: 0
selector:
matchLabels:
control-plane: envoy-gateway
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: eg
---
# Source: gateway-helm/templates/envoy-gateway-deployment.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down
14 changes: 14 additions & 0 deletions test/helm/envoy-gateway-config.out.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
---
# Source: gateway-helm/templates/envoy-gateway-deployment.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: envoy-gateway
namespace: 'envoy-gateway-system'
spec:
minAvailable: 0
selector:
matchLabels:
control-plane: envoy-gateway
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: eg
---
# Source: gateway-helm/templates/envoy-gateway-deployment.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down
14 changes: 14 additions & 0 deletions test/helm/global-images-config.out.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
---
# Source: gateway-helm/templates/envoy-gateway-deployment.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: envoy-gateway
namespace: 'envoy-gateway-system'
spec:
minAvailable: 0
selector:
matchLabels:
control-plane: envoy-gateway
app.kubernetes.io/name: gateway-helm
app.kubernetes.io/instance: eg
---
# Source: gateway-helm/templates/envoy-gateway-deployment.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down

0 comments on commit 5698a61

Please sign in to comment.