-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script, templates and manifests to make RHOBS deployable on test …
…clusters (#112) * Adjust tenant and session secrets Signed-off-by: Matej Gera <[email protected]> * Update image names and tags Signed-off-by: Matej Gera <[email protected]> * Add Minio and Dex jsonnet templates Signed-off-by: Matej Gera <[email protected]> * Additional test secrets Signed-off-by: Matej Gera <[email protected]> * Add test service accounts and role bindings Signed-off-by: Matej Gera <[email protected]> * Add generated templates Signed-off-by: Matej Gera <[email protected]> * Add parameter override files Signed-off-by: Matej Gera <[email protected]> * Add launch script and README Signed-off-by: Matej Gera <[email protected]> * Cleanup Signed-off-by: Matej Gera <[email protected]> * Update tests/README.md Co-authored-by: Moad Zardab <[email protected]> Co-authored-by: Moad Zardab <[email protected]>
- Loading branch information
Showing
32 changed files
with
752 additions
and
72 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
title = "gitleaks config" | ||
[allowlist] | ||
paths=[ | ||
'''dex-template.jsonnet''', | ||
'''observatorium-template.yaml''', | ||
'''dex-template.yaml''', | ||
] |
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
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,107 @@ | ||
local dex = (import 'github.com/observatorium/observatorium/configuration/components/dex.libsonnet')({ | ||
name:: 'dex', | ||
namespace:: '${NAMESPACE}', | ||
image:: '${IMAGE}:${IMAGE_TAG}', | ||
version:: '${IMAGE_TAG}', | ||
config:: { | ||
oauth2: { | ||
passwordConnector: 'local', | ||
}, | ||
staticClients: [ | ||
{ | ||
id: 'test', | ||
name: 'test', | ||
secret: 'ZXhhbXBsZS1hcHAtc2VjcmV0', | ||
}, | ||
], | ||
enablePasswordDB: true, | ||
staticPasswords: [ | ||
{ | ||
email: '[email protected]', | ||
// bcrypt hash of the string "password" | ||
hash: '$2a$10$2b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W', | ||
username: 'admin', | ||
userID: '08a8684b-db88-4b73-90a9-3cd1661f5466', | ||
}, | ||
], | ||
issuer: 'http://${NAMESPACE}.${NAMESPACE}.svc.cluster.local:5556/dex', | ||
storage: { | ||
type: 'sqlite3', | ||
config: { file: '/storage/dex.db' }, | ||
}, | ||
web: { | ||
http: '0.0.0.0:5556', | ||
}, | ||
logger: { level: 'debug' }, | ||
}, | ||
replicas: 1, | ||
}) + { | ||
deployment+: { | ||
spec+: { | ||
replicas: '${{REPLICAS}}', // additional parenthesis does matter, they convert argument to an int. | ||
template+: { | ||
spec+: { | ||
containers: [ | ||
super.containers[0] { | ||
resources: { | ||
requests: { | ||
cpu: '${DEX_CPU_REQUEST}', | ||
memory: '${DEX_MEMORY_REQUEST}', | ||
}, | ||
limits: { | ||
cpu: '${DEX_CPU_LIMITS}', | ||
memory: '${DEX_MEMORY_LIMITS}', | ||
}, | ||
}, | ||
volumeMounts: [ | ||
{ name: 'config', mountPath: '/etc/dex/cfg' }, | ||
{ name: 'storage', mountPath: '/storage', readOnly: false }, | ||
], | ||
}, | ||
], | ||
volumes: [ | ||
{ | ||
name: 'config', | ||
secret: { | ||
secretName: dex.config.name, | ||
items: [ | ||
{ key: 'config.yaml', path: 'config.yaml' }, | ||
], | ||
}, | ||
}, | ||
{ | ||
name: 'storage', | ||
persistentVolumeClaim: { claimName: dex.config.name }, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
{ | ||
apiVersion: 'v1', | ||
kind: 'Template', | ||
metadata: { | ||
name: 'dex', | ||
}, | ||
objects: [ | ||
dex[name] { | ||
metadata+: { | ||
namespace:: 'hidden', | ||
}, | ||
} | ||
for name in std.objectFields(dex) | ||
], | ||
parameters: [ | ||
{ name: 'NAMESPACE', value: 'dex' }, | ||
{ name: 'IMAGE', value: 'dexidp/dex' }, | ||
{ name: 'IMAGE_TAG', value: 'v2.30.0' }, | ||
{ name: 'REPLICAS', value: '1' }, | ||
{ name: 'DEX_CPU_REQUEST', value: '100m' }, | ||
{ name: 'DEX_MEMORY_REQUEST', value: '200Mi' }, | ||
{ name: 'DEX_CPU_LIMITS', value: '100m' }, | ||
{ name: 'DEX_MEMORY_LIMITS', value: '200Mi' }, | ||
], | ||
} |
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
Oops, something went wrong.