An app to auto config dex auth client
DexAuthClient
: Auto config DEX config fileDexClientOrder
: Auto create an oauth2 proxy and apply to the target ingressIngress
: Auto create aDexClientOrder
by adding an annotation to the ingress,the annotation key isdex.xzzpig.com/oauth-proxy
and value is the name ofDexProxyConfig
kubectl apply -f https://github.com/xzzpig/dex-configurer/raw/master/deploy/bundle.yaml
kubectl delete --all DexAuthClient && kubectl delete -f https://github.com/xzzpig/dex-configurer/raw/master/deploy/bundle.yaml
apiVersion: dex.xzzpig.com/v1
kind: DexAuthClient
metadata:
name: dexauthclient-sample
spec:
id: example-app
name: Example App
redirectURIs:
- http://127.0.0.1:5555/callback
secret: abcdabcd
secretRef:
namespace: ""
name: dex
key: config.yaml
- Create
DexProxyConfig
apiVersion: dex.xzzpig.com/v1
kind: DexProxyConfig
metadata:
name: dexproxyconfig-sample
spec:
ocid-issuer-url: https://auth.sample.com
provider-display-name: Sample OCID Provider
secretRef:
namespace: ""
name: dex
key: config.yaml
default-url:
scheme: https
- Create
DexClientOrder
apiVersion: dex.xzzpig.com/v1
kind: DexClientOrder
metadata:
name: dexclientorder-sample
spec:
config:
name: dexproxyconfig-sample
target-ingress:
name: dexproxy-sample-ingress
- Enjoy!
App will Create an OAuth Proxy and Apply to Target Ingress
- Create
DexProxyConfig
Same To Before
- Create/Modify Ingress
Add an annotation to the
Ingress
,the annotation key isdex.xzzpig.com/oauth-proxy
and value is the name ofDexProxyConfig
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example
annotations:
dex.xzzpig.com/oauth-proxy`: dexclientorder-sample # Look Here
spec:
rules:
- host: example.yourdomain.com
http:
paths:
- backend:
service:
name: example-service
port:
number: 5000
path: /
pathType: Prefix
- Enjoy!
App will Create a DexClientOrder