-
Notifications
You must be signed in to change notification settings - Fork 700
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added changes required for dex setup for litmus 3.0.0-beta11 (#4163)
* Added changes required for dex setup Signed-off-by: Saranya-jena <saranya.jena@harness.io> * Moved dex-server to chaoscenter Signed-off-by: Saranya-jena <saranya.jena@harness.io> * resolved review comments Signed-off-by: Saranya-jena <saranya.jena@harness.io> * fixed imports Signed-off-by: Saranya-jena <saranya.jena@harness.io> --------- Signed-off-by: Saranya-jena <saranya.jena@harness.io>
- Loading branch information
1 parent
ac6ebe4
commit ba00736
Showing
40 changed files
with
1,123 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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,3 @@ | ||
FROM ghcr.io/dexidp/dex:latest | ||
ENV DEX_FRONTEND_DIR=/srv/dex/web | ||
COPY --chown=root:root web /srv/dex/web |
This file contains 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,139 @@ | ||
# ConfigMap for DexServer | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: dex-server-admin-config | ||
namespace: litmus | ||
data: | ||
config.yaml: | | ||
issuer: http://<Your Domain>:32000 # Replace your domain here | ||
storage: | ||
type: kubernetes | ||
config: | ||
inCluster: true | ||
web: | ||
http: 0.0.0.0:5556 | ||
staticClients: | ||
- id: LitmusPortalAuthBackend | ||
redirectURIs: | ||
- '/auth/dex/callback' | ||
- 'http://localhost:8080/auth/dex/callback' # Included for local testing purposes | ||
name: 'LitmusPortalAuthBackend' | ||
secret: ZXhhbXBsZS1hcHAtc2VjcmV0 | ||
oauth2: | ||
skipApprovalScreen: true | ||
connectors: | ||
- type: google | ||
id: google | ||
name: Google | ||
config: | ||
clientID: # Add your Google Client ID here | ||
clientSecret: # Add your Google Client Secret here | ||
redirectURI: http://<Your Domain>:32000 # Replace your domain here | ||
- type: github | ||
id: github | ||
name: GitHub | ||
config: | ||
clientID: # Add your GitHub Client ID here | ||
clientSecret: # Add your GitHub Client Secret here | ||
redirectURI: http://<Your Domain>:32000/callback # Replace your domain here | ||
--- | ||
# ClusterRole for DexServer | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: litmus-dex-server | ||
rules: | ||
- apiGroups: [dex.coreos.com] | ||
resources: | ||
[ | ||
authcodes, | ||
authrequests, | ||
connectors, | ||
devicerequests, | ||
connectors, | ||
devicerequests, | ||
devicetokens, | ||
oauth2clients, | ||
offlinesessionses, | ||
passwords, | ||
refreshtokens, | ||
signingkeies, | ||
] | ||
verbs: [delete, deletecollection, get, list, patch, create, update, watch] | ||
--- | ||
# ClusterRoleBinding for DexServer | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: litmus-dex-server-crb | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: litmus-dex-server | ||
subjects: | ||
- kind: ServiceAccount | ||
name: litmus-server-account | ||
namespace: litmus | ||
--- | ||
# Deployment for DexServer | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: litmusportal-dex-server | ||
namespace: litmus | ||
labels: | ||
component: litmusportal-dex-server | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
component: litmusportal-dex-server | ||
template: | ||
metadata: | ||
labels: | ||
component: litmusportal-dex-server | ||
spec: | ||
serviceAccountName: litmus-server-account | ||
containers: | ||
- name: litmus-dex | ||
imagePullPolicy: IfNotPresent | ||
image: litmuschaos/litmusportal-dex-server:ci | ||
command: ["/usr/local/bin/dex", "serve", "/etc/dex/cfg/config.yaml"] | ||
ports: | ||
- containerPort: 5556 | ||
volumeMounts: | ||
- name: config | ||
mountPath: /etc/dex/cfg | ||
volumes: | ||
- name: config | ||
configMap: | ||
name: dex-server-admin-config | ||
items: | ||
- key: config.yaml | ||
path: config.yaml | ||
--- | ||
# Exposed service for DexServer | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: litmusportal-dex-service | ||
namespace: litmus | ||
spec: | ||
type: NodePort | ||
ports: | ||
- name: dex-server | ||
port: 80 | ||
protocol: TCP | ||
targetPort: 5556 | ||
nodePort: 32000 | ||
selector: | ||
component: litmusportal-dex-server |
17 changes: 17 additions & 0 deletions
17
chaoscenter/dex-server/web/static/img/atlassian-crowd-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.