Skip to content

Commit

Permalink
Merge pull request #14 from kerberos-io/feature/add-oauth-to-api
Browse files Browse the repository at this point in the history
revert oauth to frontend + upgrade 0.71.0
  • Loading branch information
cedricve authored Oct 31, 2024
2 parents c70cf7f + aa73e95 commit d3390d5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion charts/hub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.70.0
version: 0.71.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
37 changes: 0 additions & 37 deletions charts/hub/templates/kerberos-hub/hub-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ metadata:
name: hub-api-ingress
annotations:
kubernetes.io/ingress.class: {{ .Values.ingress }}
{{- if eq .Values.kerberoshub.oauth2Proxy.enabled true }}
nginx.ingress.kubernetes.io/auth-url: "https://$host/oauth2/auth"
nginx.ingress.kubernetes.io/auth-signin: "https://$host/oauth2/start?rd=$escaped_request_uri"
{{- end }}
{{- if eq .Values.ingress "nginx" }}
kubernetes.io/tls-acme: "true"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
Expand Down Expand Up @@ -96,39 +92,6 @@ spec:
servicePort: 8081
{{- end }}
{{ end }}
{{- if eq .Values.kerberoshub.oauth2Proxy.enabled true }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: oauth2-proxy-api
namespace: kube-system
annotations:
kubernetes.io/ingress.class: {{ .Values.ingress }}
{{- if eq .Values.ingress "nginx" }}
cert-manager.io/cluster-issuer: letsencrypt-prod
kubernetes.io/tls-acme: "true"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/enable-cors: "true"
{{- end }}
spec:
ingressClassName: nginx
rules:
- host: "{{ .Values.kerberoshub.api.url }}"
http:
paths:
- path: /oauth2
pathType: Prefix
backend:
service:
name: oauth2-proxy
port:
number: 4180
tls:
- hosts:
- "{{ .Values.kerberoshub.api.url }}"
secretName:
{{- end }}
---
apiVersion: apps/v1
kind: Deployment
Expand Down
37 changes: 37 additions & 0 deletions charts/hub/templates/kerberos-hub/hub-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ metadata:
name: hub-frontend-ingress
annotations:
kubernetes.io/ingress.class: {{ .Values.ingress }}
{{- if eq .Values.kerberoshub.oauth2Proxy.enabled true }}
nginx.ingress.kubernetes.io/auth-url: "https://$host/oauth2/auth"
nginx.ingress.kubernetes.io/auth-signin: "https://$host/oauth2/start?rd=$escaped_request_uri"
{{- end }}
{{- if eq .Values.ingress "nginx" }}
kubernetes.io/tls-acme: "true"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
Expand Down Expand Up @@ -99,6 +103,39 @@ spec:
servicePort: 80
{{- end }}
{{- end }}
{{- if eq .Values.kerberoshub.oauth2Proxy.enabled true }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: oauth2-proxy-frontend
namespace: kube-system
annotations:
kubernetes.io/ingress.class: {{ .Values.ingress }}
{{- if eq .Values.ingress "nginx" }}
cert-manager.io/cluster-issuer: letsencrypt-prod
kubernetes.io/tls-acme: "true"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/enable-cors: "true"
{{- end }}
spec:
ingressClassName: nginx
rules:
- host: "{{ .Values.kerberoshub.frontend.url }}"
http:
paths:
- path: /oauth2
pathType: Prefix
backend:
service:
name: oauth2-proxy
port:
number: 4180
tls:
- hosts:
- "{{ .Values.kerberoshub.frontend.url }}"
secretName:
{{- end }}
---
apiVersion: apps/v1
kind: Deployment
Expand Down

0 comments on commit d3390d5

Please sign in to comment.