Skip to content
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
13 changes: 4 additions & 9 deletions helm/oauth2-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: oauth2-proxy
version: 10.7.0
version: 11.0.0
apiVersion: v2
appVersion: 7.15.3
home: https://oauth2-proxy.github.io/oauth2-proxy/
Expand Down Expand Up @@ -30,13 +30,8 @@ maintainers:
kubeVersion: ">=1.16.0-0"
annotations:
artifacthub.io/changes: |
- kind: added
description: Add alpha-config.source and alpha-config.name helpers for centralized alpha config resolution
- kind: changed
description: Removed the `gatewayRef` field in favor of `parentRefs` for Gateway API configuration.
links:
- name: GitHub PR
url: https://github.com/oauth2-proxy/manifests/pull/405
- kind: added
description: Add deprecation guards for invalid alphaConfig combinations
links:
- name: GitHub PR
url: https://github.com/oauth2-proxy/manifests/pull/405
url: https://github.com/oauth2-proxy/manifests/pull/421
58 changes: 52 additions & 6 deletions helm/oauth2-proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,51 @@ redis-ha:

With above new chart version won't add extra `-ha` suffix to all redis resources.

### To 11.0.0

Version 11.0.0 use `gatewayAPI.parentRefs` instead of `gatewayAPI.gatewayRef`.

**Breaking Change**: If you were previously using the gatewayAPI options, you must now use `gatewayAPI.parentRefs` instead of `gatewayAPI.gatewayRef` to configure the HTTPRoute's parent. It can be a `Gateway` or/and one or several `ListenerSet`.

Before:

```yaml
gatewayApi:
enabled: true
gatewayRef:
name: gateway
namespace: gateway-system
sectionName: my-gateway-https-listener-name
# ... other gatewayApi configuration
```

After (Gateway version):

```yaml
gatewayApi:
enabled: true
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: gateway
namespace: gateway-system
sectionName: my-gateway-https-listener-name
# ... other gatewayApi configuration
```

After (listernerSet version):

```yaml
gatewayApi:
enabled: true
parentRefs:
- group: gateway.networking.k8s.io
kind: ListenerSet
name: oauth2-proxy
namespace: my-namespace
# ... other gatewayApi configuration
```

## Configuration

The following table lists the configurable parameters of the oauth2-proxy chart and their default values.
Expand Down Expand Up @@ -203,7 +248,7 @@ The following table lists the configurable parameters of the oauth2-proxy chart
| `extraVolumes` | list of extra volumes | `[]` |
| `gatewayApi.annotations` | Additional annotations to add to the HTTPRoute | `{}` |
| `gatewayApi.enabled` | Enable Gateway API HTTPRoute | `false` |
| `gatewayApi.gatewayRef` | The ParentRef of the HTTPRoute according to: https://gateway-api.sigs.k8s.io/reference/spec/#parentreference | `{}` |
| `gatewayApi.parentRefs` | The ParentRefs of the HTTPRoute according to: https://gateway-api.sigs.k8s.io/reference/api-spec/main/spec/#parentreference and https://gateway-api.sigs.k8s.io/reference/api-types/listenerset/#route-attachment | `{}` |
| `gatewayApi.hostnames` | Hostnames to match in the HTTPRoute | `[]` |
| `gatewayApi.labels` | Additional labels to add to the HTTPRoute | `{}` |
| `gatewayApi.rules` | HTTPRoute rule configuration. If not specified, a default rule with PathPrefix `/` will be created | `[]` |
Expand Down Expand Up @@ -335,15 +380,16 @@ This chart supports using [Kubernetes Gateway API](https://gateway-api.sigs.k8s.

1. Ensure the Gateway API CRDs are installed in your cluster
2. Create a Gateway resource (or use an existing one)
3. Configure the chart to create an HTTPRoute
3. (Optionnal) Create a ListenerSet resource (or use an existing one)
4. Configure the chart to create an HTTPRoute

### Basic Gateway API Configuration

```yaml
gatewayApi:
enabled: true
gatewayRef:
name: my-gateway
parentRefs:
- name: my-gateway
namespace: gateway-system
hostnames:
- oauth.example.com
Expand All @@ -354,8 +400,8 @@ gatewayApi:
```yaml
gatewayApi:
enabled: true
gatewayRef:
name: my-gateway
parentRefs:
- name: my-gateway
namespace: gateway-system
sectionName: my-gateway-https-listener-name
hostnames:
Expand Down
19 changes: 19 additions & 0 deletions helm/oauth2-proxy/ci/gateway-api-listenerset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Test values for Gateway API HTTPRoute configuration with ListenerSet
gatewayApi:
enabled: true
parentRefs:
- group: gateway.networking.k8s.io
kind: ListenerSet
name: oauth2-proxy
namespace: my-namespace
hostnames:
- oauth.example.com
rules:
- matches:
- path:
type: PathPrefix
value: /oauth2
annotations:
example.com/annotation: "value"
labels:
example.com/label: "value"
9 changes: 9 additions & 0 deletions helm/oauth2-proxy/ci/gateway-api-minimal-listenerset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Minimal Gateway API configuration with default rule with ListenerSet
gatewayApi:
enabled: true
parentRefs:
- kind: ListenerSet
name: oauth2-proxy
namespace: my-namespace
hostnames:
- minimal.example.com
3 changes: 2 additions & 1 deletion helm/oauth2-proxy/ci/gateway-api-minimal.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Minimal Gateway API configuration with default rule
gatewayApi:
enabled: true
gatewayRef:
parentRefs:
- kind: Gateway
name: minimal-gateway
hostnames:
- minimal.example.com
18 changes: 18 additions & 0 deletions helm/oauth2-proxy/ci/gateway-api-name-listenerset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Gateway API configuration with rule name with ListenerSet
gatewayApi:
enabled: true
parentRefs:
- kind: ListenerSet
name: oauth2-proxy
namespace: my-namespace
rules:
- name: service
matches:
- path:
type: PathPrefix
value: /
- name: metrics
matches:
- path:
type: PathPrefix
value: /metrics
3 changes: 2 additions & 1 deletion helm/oauth2-proxy/ci/gateway-api-name.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Gateway API configuration with rule name
gatewayApi:
enabled: true
gatewayRef:
parentRefs:
- kind: Gateway
name: test-gateway
rules:
- name: service
Expand Down
3 changes: 2 additions & 1 deletion helm/oauth2-proxy/ci/gateway-api.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Test values for Gateway API HTTPRoute configuration
gatewayApi:
enabled: true
gatewayRef:
parentRefs:
- kind: Gateway
name: example-gateway
namespace: gateway-system
hostnames:
Expand Down
4 changes: 2 additions & 2 deletions helm/oauth2-proxy/templates/httproute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ metadata:
{{ tpl ( toYaml . ) $ | indent 4 }}
{{- end }}
spec:
{{- with .Values.gatewayApi.gatewayRef }}
{{- with .Values.gatewayApi.parentRefs }}
parentRefs:
- {{ toYaml . | nindent 4 | trim }}
{{- toYaml . | nindent 2 }}
{{- end }}
{{- if .Values.gatewayApi.hostnames }}
hostnames:
Expand Down
24 changes: 18 additions & 6 deletions helm/oauth2-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -365,18 +365,30 @@ ingress:
# - chart-example.local

# Gateway API HTTPRoute configuration
# Ref: https://gateway-api.sigs.k8s.io/api-types/httproute/
# Ref: https://gateway-api.sigs.k8s.io/reference/api-types/httproute/
gatewayApi:
enabled: false
# The name of the Gateway resource to attach the HTTPRoute to
# Example:
# gatewayRef:
# The list of the parentRef resources to attach the HTTPRoute to
# Can either be a Gateway or one or several ListenerSet
# Example :
# Gateway version
# parentRefs:
# - group: gateway.networking.k8s.io
# kind: Gateway
# name: gateway
# namespace: gateway-system
# sectionName: my-gateway-https-listener-name
#
# https://gateway-api.sigs.k8s.io/reference/spec/#parentreference
gatewayRef: {}
# ListenerSet version
# parentRefs:
# - group: gateway.networking.k8s.io
# kind: ListenerSet
# name: oauth2-proxy
# namespace: my-namespace
#
# https://gateway-api.sigs.k8s.io/reference/api-spec/main/spec/#parentreference
# https://gateway-api.sigs.k8s.io/reference/api-types/listenerset/#route-attachment
parentRefs: []
# HTTPRoute rule configuration
# rules:
# - name: service # optional: enables targeting by sectionName in policies
Expand Down