feat(sso): added dex and added template parameters for grafana and dex
This commit is contained in:
parent
67c513d1a5
commit
d677b4b0e7
3 changed files with 107 additions and 2 deletions
29
template/stacks/core/dex.yaml
Normal file
29
template/stacks/core/dex.yaml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: dex
|
||||
namespace: argocd
|
||||
labels:
|
||||
env: dev
|
||||
spec:
|
||||
project: default
|
||||
syncPolicy:
|
||||
automated:
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
retry:
|
||||
limit: -1
|
||||
destination:
|
||||
name: in-cluster
|
||||
namespace: dex
|
||||
sources:
|
||||
- repoURL: https://charts.dexidp.io
|
||||
chart: dex
|
||||
targetRevision: 0.23.0
|
||||
helm:
|
||||
valueFiles:
|
||||
- $values/{{{ .Env.CLIENT_REPO_ID }}}/{{{ .Env.DOMAIN }}}/stacks/core/dex/values.yaml
|
||||
- repoURL: https://{{{ .Env.CLIENT_REPO_DOMAIN }}}/{{{ .Env.CLIENT_REPO_ORG_NAME }}}
|
||||
targetRevision: HEAD
|
||||
ref: values
|
||||
76
template/stacks/core/dex/values.yaml
Normal file
76
template/stacks/core/dex/values.yaml
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
ingress:
|
||||
enabled: true
|
||||
className: nginx
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: main
|
||||
hosts:
|
||||
- host: {{{ .Env.DOMAIN_DEX }}}
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- hosts:
|
||||
- {{{ .Env.DOMAIN_DEX }}}
|
||||
secretName: dex-cert
|
||||
|
||||
envVars:
|
||||
- name: FORGEJO_CLIENT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: dex-forgejo-client
|
||||
key: clientSecret
|
||||
- name: FORGEJO_CLIENT_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: dex-forgejo-client
|
||||
key: clientID
|
||||
- name: OIDC_DEX_GRAFANA_CLIENT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: dex-grafana-client
|
||||
key: clientSecret
|
||||
- name: OIDC_DEX_ARGO_CLIENT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: dex-argo-client
|
||||
key: clientSecret
|
||||
- name: LOG_LEVEL
|
||||
value: debug
|
||||
|
||||
config:
|
||||
# Set it to a valid URL
|
||||
issuer: https://{{{ .Env.DOMAIN_DEX }}}
|
||||
|
||||
# See https://dexidp.io/docs/storage/ for more options
|
||||
storage:
|
||||
type: memory
|
||||
|
||||
oauth2:
|
||||
skipApprovalScreen: true
|
||||
alwaysShowLoginScreen: false
|
||||
|
||||
connectors:
|
||||
- type: gitea
|
||||
id: gitea
|
||||
name: Forgejo
|
||||
config:
|
||||
clientID: "$FORGEJO_CLIENT_ID"
|
||||
clientSecret: "$FORGEJO_CLIENT_SECRET"
|
||||
redirectURI: https://{{{ .Env.DOMAIN_DEX }}}/callback
|
||||
baseURL: https://edp.buildth.ing
|
||||
# loadAllGroups: true
|
||||
orgs:
|
||||
- name: DevFW
|
||||
enablePasswordDB: false
|
||||
|
||||
staticClients:
|
||||
- id: controller-argocd-dex
|
||||
name: ArgoCD Client
|
||||
redirectURIs:
|
||||
- "http://{{{ .Env.DOMAIN_ARGOCD }}}/auth/callback"
|
||||
secret: "{{`{{ .Env.OIDC_DEX_ARGO_CLIENT_SECRET }}`}}"
|
||||
- id: grafana
|
||||
redirectURIs:
|
||||
- "https://{{{ .Env.DOMAIN_GRAFANA }}}/login/generic_oauth"
|
||||
name: "Grafana"
|
||||
secret: "thisisasecret"
|
||||
|
|
@ -25,7 +25,7 @@ spec:
|
|||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: grafana.{{{ .Env.DOMAIN }}}
|
||||
- host: {{{ .Env.DOMAIN_GRAFANA }}}
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
|
|
@ -37,5 +37,5 @@ spec:
|
|||
pathType: Prefix
|
||||
tls:
|
||||
- hosts:
|
||||
- grafana.{{{ .Env.DOMAIN }}}
|
||||
- {{{ .Env.DOMAIN_GRAFANA }}}
|
||||
secretName: grafana-net-tls
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue