-
Notifications
You must be signed in to change notification settings - Fork 7k
Derive dedicated Dex deployment #564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
merenbach
merged 22 commits into
argoproj:master
from
merenbach:555-dedicated-dex-deployment
Sep 15, 2018
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
dc9bb07
Rm Dex from Argo CD server deployment
4df7efa
Add Dex server deployment
01b1315
Separate out Dex-specific server steps
41e0e95
Update Dex deployment name
63900f1
Update install.yaml
5e21165
Update container port for Dex
c5804de
Add Dex service, rename manifest components
326230a
Update ports
02f2655
Update dex endpoint
26bcda5
Rename manifest files for ordering
a71de54
Add service account for Dex, with too many perms
75faa73
Try a limited set of perms for Dex
3b5848f
Update ports for Dex
73a35f8
Update install.yaml
94e664b
Make token generation more cryptographically secure
2a9f055
Rm comments from components
2153c48
Update install.yaml
1e975cd
Reinsert warning at top of install.yaml
bd64278
Update manifest generation tests and counts
58410da
Don't ignore return values
38129ed
Restrict to particular resource names, thanks @jessesuen
d9b41ee
Update install.yaml
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: dex-server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: Role | ||
| metadata: | ||
| name: dex-server-role | ||
| rules: | ||
| - apiGroups: | ||
| - "" | ||
| resourceNames: | ||
| - argocd-cm | ||
| - argocd-secret | ||
| resources: | ||
| - secrets | ||
| - configmaps | ||
| verbs: | ||
| - get | ||
| - list | ||
| - watch | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
| name: dex-server-role-binding | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: Role | ||
| name: dex-server-role | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: dex-server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: dex-server | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| app: dex-server | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: dex-server | ||
| spec: | ||
| serviceAccountName: dex-server | ||
| initContainers: | ||
| - name: copyutil | ||
| image: argoproj/argocd-server:v0.8.0 | ||
| command: [cp, /argocd-util, /shared] | ||
| volumeMounts: | ||
| - mountPath: /shared | ||
| name: static-files | ||
| containers: | ||
| - name: dex | ||
| image: quay.io/coreos/dex:v2.10.0 | ||
| command: [/shared/argocd-util, rundex] | ||
| ports: | ||
| - containerPort: 5556 | ||
| - containerPort: 5557 | ||
| volumeMounts: | ||
| - mountPath: /shared | ||
| name: static-files | ||
| volumes: | ||
| - emptyDir: {} | ||
| name: static-files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: dex-server | ||
| spec: | ||
| ports: | ||
| - name: http | ||
| protocol: TCP | ||
| port: 5556 | ||
| targetPort: 5556 | ||
| - name: grpc | ||
| protocol: TCP | ||
| port: 5557 | ||
| targetPort: 5557 | ||
| selector: | ||
| app: dex-server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| package dex | ||
|
|
||
| import ( | ||
| "testing" | ||
| ) | ||
|
|
||
| func TestRandString(t *testing.T) { | ||
| var ss string | ||
| var err error | ||
|
|
||
| ss, err = randString(10, "A") | ||
| if err != nil { | ||
| t.Fatalf("Could not generate entropy: %v", err) | ||
| } | ||
| if ss != "AAAAAAAAAA" { | ||
| t.Errorf("Expected 10 As, but got %q", ss) | ||
| } | ||
|
|
||
| ss, err = randString(5, "ABC123") | ||
| if err != nil { | ||
| t.Fatalf("Could not generate entropy: %v", err) | ||
| } | ||
| if len(ss) != 5 { | ||
| t.Errorf("Expected random string of length 10, but got %q", ss) | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not want this role to read all secrets and configmaps in the namespace just the settings one. We should add: