Skip to content

Commit

Permalink
align oauth2-proxy with helmchart
Browse files Browse the repository at this point in the history
Signed-off-by: Krzysztof Romanowski <krzysztof.romanowski.kr3@roche.com>
  • Loading branch information
kromanow94 committed Oct 2, 2023
1 parent 35ec17b commit 93dadd4
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 35 deletions.
18 changes: 11 additions & 7 deletions common/oidc-client/oauth2-proxy/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ spec:
configMap:
name: oauth2-proxy
defaultMode: 420
- name: oauth2-proxy
secret:
secretName: oauth2-proxy
containers:
- name: oauth2-proxy
image: quay.io/oauth2-proxy/oauth2-proxy:v7.4.0
Expand All @@ -36,18 +33,25 @@ spec:
containerPort: 44180
protocol: TCP
env:
- name: OAUTH2_PROXY_CLIENT_ID
valueFrom:
secretKeyRef:
name: oauth2-proxy
key: client-id
- name: OAUTH2_PROXY_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: oauth2-proxy
key: client-secret
- name: OAUTH2_PROXY_COOKIE_SECRET
valueFrom:
secretKeyRef:
name: oauth2-proxy
key: COOKIE_SECRET
key: cookie-secret
volumeMounts:
- name: configmain
mountPath: /etc/oauth2_proxy/oauth2_proxy.cfg
subPath: oauth2_proxy.cfg
- name: oauth2-proxy
subPath: CLIENT_SECRET
mountPath: "/etc/oauth2_proxy/CLIENT_SECRET"
livenessProbe:
httpGet:
path: /ping
Expand Down
47 changes: 23 additions & 24 deletions common/oidc-client/oauth2-proxy/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: oauth2-proxy

resources:
- deployment.yaml
- namespace.yaml
Expand All @@ -17,31 +19,28 @@ resources:
secretGenerator:
- name: oauth2-proxy
type: Opaque
envs:
- secret_params.env

namespace: oauth2-proxy

generatorOptions:
disableNameSuffixHash: true
literals:
- "client-id=kubeflow-oidc-authservice"
- "client-secret=pUBnBOY80SnXgjibTYM9ZWNzY2xreNGQok"
- "cookie-secret=7d16fee92f8d11b8940b081b3f8b8acb"

vars:
- name: AUTHSERVICE_NAMESPACE
objref:
kind: Service
name: oauth2-proxy
apiVersion: v1
fieldref:
fieldpath: metadata.namespace
- name: AUTHSERVICE_SERVICE
objref:
kind: Service
name: oauth2-proxy
apiVersion: v1
fieldref:
fieldpath: metadata.name
configurations:
- params.yaml
# vars:
# - name: AUTHSERVICE_NAMESPACE
# objref:
# kind: Service
# name: oauth2-proxy
# apiVersion: v1
# fieldref:
# fieldpath: metadata.namespace
# - name: AUTHSERVICE_SERVICE
# objref:
# kind: Service
# name: oauth2-proxy
# apiVersion: v1
# fieldref:
# fieldpath: metadata.name
# configurations:
# - params.yaml

images:
- name: quay.io/oauth2-proxy/oauth2-proxy
Expand Down
2 changes: 0 additions & 2 deletions common/oidc-client/oauth2-proxy/base/oauth2-proxy-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ data:
upstreams = "static://200"
email_domains = [ "*" ]
skip_auth_regex=["/dex/.*"]
client_id = "kubeflow-oidc-authservice"
client_secret_file = "/etc/oauth2_proxy/CLIENT_SECRET"
# ---
# OIDC Discovery has to be skipped and login url has to be provided directly
# in order to enable relative auth redirect.
Expand Down
2 changes: 0 additions & 2 deletions common/oidc-client/oauth2-proxy/base/secret_params.env

This file was deleted.

0 comments on commit 93dadd4

Please sign in to comment.