Skip to content

Commit

Permalink
Merge pull request #1899 from lcc3108/master
Browse files Browse the repository at this point in the history
update example/k8s/dex.yaml
  • Loading branch information
sagikazarmark committed Feb 10, 2021
2 parents 1c9fb49 + f2fcb2c commit a7a92b0
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions examples/k8s/dex.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
apiVersion: extensions/v1beta1
---
apiVersion: v1
kind: Namespace
metadata:
name: dex
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: dex
name: dex
namespace: dex
spec:
replicas: 3
selector:
matchLabels:
app: dex
template:
metadata:
labels:
app: dex
spec:
serviceAccountName: dex # This is created below
containers:
- image: quay.io/dexidp/dex:v2.10.0
- image: dexidp/dex:v2.27.0 #or quay.io/dexidp/dex:v2.26.0
name: dex
command: ["/usr/local/bin/dex", "serve", "/etc/dex/cfg/config.yaml"]

Expand All @@ -38,6 +48,11 @@ spec:
secretKeyRef:
name: github-client
key: client-secret

readinessProbe:
httpGet:
path: /healthz
port: 5556
volumes:
- name: config
configMap:
Expand All @@ -53,6 +68,7 @@ kind: ConfigMap
apiVersion: v1
metadata:
name: dex
namespace: dex
data:
config.yaml: |
issuer: https://dex.example.com:32000
Expand Down Expand Up @@ -95,6 +111,7 @@ apiVersion: v1
kind: Service
metadata:
name: dex
namespace: dex
spec:
type: NodePort
ports:
Expand All @@ -112,8 +129,9 @@ metadata:
labels:
app: dex
name: dex
namespace: dex
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: dex
Expand All @@ -125,7 +143,7 @@ rules:
resources: ["customresourcedefinitions"]
verbs: ["create"] # To manage its own resources, dex must be able to create customresourcedefinitions
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: dex
Expand All @@ -136,4 +154,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: dex # Service account assigned to the dex pod, created above
namespace: default # The namespace dex is running in
namespace: dex # The namespace dex is running in

0 comments on commit a7a92b0

Please sign in to comment.