add oauth2proxy in front of stash

This commit is contained in:
2023-03-22 15:59:19 -04:00
parent 8bb566fb14
commit 463ac84e3a
4 changed files with 25 additions and 44 deletions

View File

@@ -8,15 +8,6 @@ config:
clientID: ab3b5b5f-cb5b-4e89-9453-d1fb318399c8 clientID: ab3b5b5f-cb5b-4e89-9453-d1fb318399c8
clientSecret: gto_mjzrf23bvu5ohu7dub6r7ti5daoa7vw2wpafum7i4qcb4emwqrza clientSecret: gto_mjzrf23bvu5ohu7dub6r7ti5daoa7vw2wpafum7i4qcb4emwqrza
#configFile: |-
# email_domains = [ "*" ]
# upstreams = [ "file:///dev/null" ]
# provider = "github"
# redirect-url = "https://www.xai-corp.net/oauth2/callback"
# login-url = "https://git.xai-corp.net/login/oauth/authorize"
# redeem-url = "https://git.xai-corp.net/login/oauth/access_token"
# validate-url = "https://git.xai-corp.net/api/v1"
extraArgs: extraArgs:
upstream: "http://hello-world/" upstream: "http://hello-world/"
provider: "github" provider: "github"

View File

@@ -1,40 +1,30 @@
--- ---
#oauth2-proxy values file for stash app #oauth2-proxy values file for stash app
config:
# Add config annotations
annotations: {}
# OAuth client ID
clientID: "7b70fc0364e3f2da5d4b"
# OAuth client secret
clientSecret: "0359972eef425a4a0b7690b6c323214c26a04686"
configFile: |-
provider = "email"
email_domains = ["sympatico.ca"]
# provider = "github" image:
# github_user = "rmorgan105" tag: "v7.2.0"
# email_domains = [ "*" ]
# upstreams = [ "file:///dev/null" ] config:
clientID: cf0bd81a-eb10-4db6-9689-07a9a7ea0de1
clientSecret: gto_vgpe33q73wstgc637u6xhtmmsvbux6ckliypntd3kuzpq7squ42a
extraArgs:
upstream: "http://stash:9999/"
provider: "github"
provider-display-name: "Gitea"
redirect-url: "https://stash.xai-corp.net/oauth2/callback"
login-url: "https://git.xai-corp.net/login/oauth/authorize"
redeem-url: "https://git.xai-corp.net/login/oauth/access_token"
validate-url: "https://git.xai-corp.net/api/v1"
ingress: ingress:
enabled: true enabled: true
# className: traefic
path: / path: /
# Only used if API capabilities (networking.k8s.io/v1) allow it pathType: Prefix
pathType: ImplementationSpecific
# Used to create an Ingress record.
hosts: hosts:
- stash.xai-corp.net - stash.xai-corp.net
# - chart-example.local # - chart-example.local
# Extra paths to prepend to every host configuration. This is useful when working with annotation based services. # Extra paths to prepend to every host configuration. This is useful when working with annotation based services.
# Warning! The configuration is dependant on your current k8s API version capabilities (networking.k8s.io/v1) # Warning! The configuration is dependant on your current k8s API version capabilities (networking.k8s.io/v1)
extraPaths: tls: # < placing a host in the TLS config will determine what ends up in the cert's subjectAltNames
- path: / - secretName: xai-corp-production-tls
pathType: ImplementationSpecific
backend:
service:
name: stash
port:
number: 9999
# annotations:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"

View File

@@ -8,7 +8,7 @@ image:
ingress: ingress:
main: main:
enabled: true enabled: false
hosts: hosts:
- host: stash.xai-corp.net - host: stash.xai-corp.net
paths: paths:

View File

@@ -58,16 +58,16 @@
- name: load variables files/stash/proxy-values.yaml - name: load variables files/stash/proxy-values.yaml
ansible.builtin.include_vars: ansible.builtin.include_vars:
file: files/stash/proxy-values.yaml file: files/stash/proxy-values.yaml
name: stash_values name: proxy_values
- name: Install oauth2-proxy Release - name: Install oauth2-proxy Release
local_action: local_action:
module: kubernetes.core.helm module: kubernetes.core.helm
release_state: absent release_state: "{{ apps.stash.state }}"
name: stash-oauth2-proxy name: oauth2-proxy
namespace: "{{ apps.stash.namespace }}" namespace: "{{ apps.stash.namespace }}"
create_namespace: yes create_namespace: no
update_repo_cache: True update_repo_cache: True
chart_ref: oauth2-proxy/oauth2-proxy chart_ref: oauth2-proxy/oauth2-proxy
values: "{{stash_values}}" values: "{{proxy_values}}"
wait: true wait: true