From 33c85e01dc340129ab6305e2bd76e650ca060110 Mon Sep 17 00:00:00 2001 From: Edoardo Rizzardi Date: Thu, 5 Dec 2024 12:54:27 +0100 Subject: [PATCH 1/9] Add possiblity to route requests to sidecar container --- helm/oauth2-proxy/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/templates/service.yaml b/helm/oauth2-proxy/templates/service.yaml index e8d02aeb..ab63c0da 100644 --- a/helm/oauth2-proxy/templates/service.yaml +++ b/helm/oauth2-proxy/templates/service.yaml @@ -36,7 +36,7 @@ spec: {{- end }} ports: - port: {{ .Values.service.portNumber }} - targetPort: {{ .Values.httpScheme }} + targetPort: {{ .Values.service.targetPort | default .Values.httpScheme }} {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} nodePort: {{ .Values.service.nodePort }} {{- end }} From 435eb371902e5408149e19c19fcecb40714f2681 Mon Sep 17 00:00:00 2001 From: Edoardo Rizzardi Date: Tue, 10 Dec 2024 10:11:04 +0100 Subject: [PATCH 2/9] feat: add targetPort in values.yaml --- helm/oauth2-proxy/values.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index c9ef103e..485ce290 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -153,6 +153,9 @@ service: externalTrafficPolicy: "" # configure internalTrafficPolicy internalTrafficPolicy: "" + # configure service target port + # useful when there's need to route requests to sidecar containers first + targetPort: ## Create or use ServiceAccount serviceAccount: From c77c7b3a23fe04867e7d629b24fa575a35f9df50 Mon Sep 17 00:00:00 2001 From: Edoardo Rizzardi Date: Tue, 10 Dec 2024 10:12:02 +0100 Subject: [PATCH 3/9] feat: add empty string to service.targetPort --- helm/oauth2-proxy/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index 485ce290..bac07369 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -155,7 +155,7 @@ service: internalTrafficPolicy: "" # configure service target port # useful when there's need to route requests to sidecar containers first - targetPort: + targetPort: "" ## Create or use ServiceAccount serviceAccount: From 924ea229ebdc8d9e9613f3318c04a004fd1b7f60 Mon Sep 17 00:00:00 2001 From: Edoardo Rizzardi Date: Mon, 23 Dec 2024 11:06:57 +0100 Subject: [PATCH 4/9] feat: update ArtifactHub message --- helm/oauth2-proxy/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index d75ef77a..e84b22da 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -35,7 +35,7 @@ kubeVersion: ">=1.16.0-0" annotations: artifacthub.io/changes: | - kind: added - description: allow templates in annotations + description: allow requests to be directed to sidecar first links: - name: Github PR - url: https://github.com/oauth2-proxy/manifests/pull/256 + url: https://github.com/oauth2-proxy/manifests/pull/270 From 5946fa923e93d14fd910e3d198a504e12f4e0ca8 Mon Sep 17 00:00:00 2001 From: Edoardo Rizzardi Date: Mon, 23 Dec 2024 13:11:18 +0100 Subject: [PATCH 5/9] feat: update chart version --- helm/oauth2-proxy/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index e84b22da..004c89cc 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 7.8.3 +version: 7.9.3 apiVersion: v2 appVersion: 7.7.1 home: https://oauth2-proxy.github.io/oauth2-proxy/ From 8cfe6d84c95534e9a05dcdf36975419695591d42 Mon Sep 17 00:00:00 2001 From: Edoardo Rizzardi Date: Mon, 23 Dec 2024 13:11:25 +0100 Subject: [PATCH 6/9] feat: update documentation --- helm/oauth2-proxy/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helm/oauth2-proxy/README.md b/helm/oauth2-proxy/README.md index 8a767862..7eb6530f 100644 --- a/helm/oauth2-proxy/README.md +++ b/helm/oauth2-proxy/README.md @@ -196,6 +196,7 @@ The following table lists the configurable parameters of the oauth2-proxy chart | `service.loadBalancerIP` | ip of load balancer | `nil` | | `service.loadBalancerSourceRanges` | allowed source ranges in load balancer | `nil` | | `service.nodePort` | external port number for the service when service.type is `NodePort` | `nil` | +| `service.targetPort` | name for the service's `targetPort` | `""` | `serviceAccount.enabled` | create a service account | `true` | | `serviceAccount.name` | the service account name | `` | | `serviceAccount.annotations` | (optional) annotations for the service account | `{}` | @@ -357,3 +358,6 @@ config: whitelist_domains = [ ".domain.com", ".example.io"] provider = "google" ``` + +## Route requests to sidecar container +You can route requests to a sidecar container first by setting the `service.targetPort` variable; by default, the service's `targetPort` value equals to the `httpSchema`'s. \ No newline at end of file From ca8385f9dac9f7443d1b7176604bc7aec1c2bf72 Mon Sep 17 00:00:00 2001 From: Edoardo Rizzardi Date: Mon, 30 Dec 2024 09:58:23 +0100 Subject: [PATCH 7/9] feat: bump to correct version --- helm/oauth2-proxy/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index 004c89cc..21d01d05 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 7.9.3 +version: 7.9.0 apiVersion: v2 appVersion: 7.7.1 home: https://oauth2-proxy.github.io/oauth2-proxy/ From a423d1d151aa387935ee105b7845f81d47d9564f Mon Sep 17 00:00:00 2001 From: Edoardo Rizzardi Date: Mon, 30 Dec 2024 09:58:44 +0100 Subject: [PATCH 8/9] feat: fix parameter description --- helm/oauth2-proxy/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/oauth2-proxy/README.md b/helm/oauth2-proxy/README.md index 7eb6530f..a601af42 100644 --- a/helm/oauth2-proxy/README.md +++ b/helm/oauth2-proxy/README.md @@ -196,7 +196,7 @@ The following table lists the configurable parameters of the oauth2-proxy chart | `service.loadBalancerIP` | ip of load balancer | `nil` | | `service.loadBalancerSourceRanges` | allowed source ranges in load balancer | `nil` | | `service.nodePort` | external port number for the service when service.type is `NodePort` | `nil` | -| `service.targetPort` | name for the service's `targetPort` | `""` +| `service.targetPort` | (optional) a numeric port number (e.g., 80) or a port name defined in the pod's container(s) (e.g., http) | `""` | `serviceAccount.enabled` | create a service account | `true` | | `serviceAccount.name` | the service account name | `` | | `serviceAccount.annotations` | (optional) annotations for the service account | `{}` | @@ -360,4 +360,4 @@ config: ``` ## Route requests to sidecar container -You can route requests to a sidecar container first by setting the `service.targetPort` variable; by default, the service's `targetPort` value equals to the `httpSchema`'s. \ No newline at end of file +You can route requests to a sidecar container first by setting the `service.targetPort` variable. The possible values for the targetPort field of a Kubernetes Service can be either a port number or the name of a port defined in the pod. By default, the service's `targetPort` value equals to `httpSchema`'s. \ No newline at end of file From 01147b849ac7afbc246a5d20b291a2ff2f8d8134 Mon Sep 17 00:00:00 2001 From: Edoardo Rizzardi Date: Mon, 30 Dec 2024 09:58:55 +0100 Subject: [PATCH 9/9] feat: remove comment --- helm/oauth2-proxy/values.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index bac07369..1487ae85 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -154,7 +154,6 @@ service: # configure internalTrafficPolicy internalTrafficPolicy: "" # configure service target port - # useful when there's need to route requests to sidecar containers first targetPort: "" ## Create or use ServiceAccount