Skip to content

Commit

Permalink
chore: update web environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
WitoDelnat committed Jul 4, 2024
1 parent 26342c3 commit 332def7
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 24 deletions.
30 changes: 30 additions & 0 deletions charts/testkube-cloud-ui/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,34 @@ spec:
containerPort: 8080
protocol: TCP
env:
- name: API_SERVER_ENDPOINT
value: {{ if .Values.ui.apiServerEndpoint}}{{ .Values.ui.apiServerEndpoint }}{{ else }}https://api.{{ .Values.global.domain }}{{ end }}
- name: API_ROOT_ROUTE
value: {{ if .Values.ui.rootRoute}}{{ tpl .Values.ui.rootRoute $ }}{{ else }}https://{{ .Values.global.uiSubdomain }}.{{ .Values.global.domain }}{{ end }}
{{- if .Values.ui.authStrategy }}
- name: AUTH_STRATEGY
value: {{ .Values.ui.authStrategy }}
{{- end }}
{{- if .Values.sentry.enabled }}
- name: SENTRY_KEY
{{- if .Values.sentry.secretRef }}
valueFrom:
secretKeyRef:
name: {{ .Values.sentry.secretRef }}
key: "SENTRY_KEY"
{{- else }}
value: "{{ .Values.sentry.url }}"
{{- end }}
{{- end }}
{{- if .Values.ui.disableTelemetry }}
- name: DISABLE_TELEMETRY
value: "true"
{{- end }}

# START LEGACY ENVS
# Dashboard migrated from CreateReactApp to Vite.
# Keep these envs a while for backwards compatibility with older images.
# This can be deleted if it was commited more than a month ago.
- name: REACT_APP_API_SERVER_ENDPOINT
value: {{ if .Values.ui.apiServerEndpoint}}{{ .Values.ui.apiServerEndpoint }}{{ else }}https://api.{{ .Values.global.domain }}{{ end }}
- name: REACT_APP_API_ROOT_ROUTE
Expand All @@ -64,6 +92,8 @@ spec:
- name: REACT_APP_DISABLE_TELEMETRY
value: "true"
{{- end }}
# ENV LEGACY ENVS

{{- range $k, $v := .Values.additionalEnv }}
- name: {{ $k }}
value: {{ tpl ($v | toString) $ | quote }}
Expand Down
140 changes: 116 additions & 24 deletions charts/testkube-enterprise/profiles/values.demo.yaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,101 @@
global:
ingress:
enabled: false
# -- Run Testkube in enterprise mode (enables enterprise features)
enterpriseMode: true
# -- Enterprise License key
enterpriseLicenseKey: ""
# -- TLS certificate provider. Set to "cert-manager" for integration with cert-manager or leave empty for other methods
certificateProvider: ""
# -- Image pull secrets to use for testkube-cloud-api and testkube-cloud-ui
imagePullSecrets: []
dex:
# -- Global Dex issuer url which is configured both in Dex and API
issuer: http://localhost:5556
storage:
endpoint: "testkube-enterprise-minio:9000"
credsSecretRef: testkube-minio-credentials
secure: false

sharedSecretGenerator:
enabled: true
securityContext: {}
resources: {}
image: {}

testkube-cloud-api:
fullnameOverride: testkube-enterprise-api
image:
repository: testkubeenterprise/testkube-enterprise-api
tag: 1.10.5
additionalEnv:
OAUTH_CLI_CLIENT_ID: testkube-cloud-cli
OAUTH_CLI_CLIENT_ID: teskube-cloud-cli
OAUTH_ENABLED: true
OAUTH_SKIP_DISCOVERY: true
OAUTH_AUTH_URL: http://localhost:5556/auth
OAUTH_TOKEN_URL: http://testkube-enterprise-dex:5556/token
OAUTH_USER_INFO_URL: http://testkube-enterprise-dex:5556/userinfo
OAUTH_JWKS_URL: http://testkube-enterprise-dex:5556/keys
DEX_SIGNUP_ORIGIN: testkube-enterprise-dex:5557
OAUTH_TOKEN_URL: http://testkube-enterprise-dex.{{.Release.Namespace}}.svc.cluster.local:5556/token
OAUTH_USER_INFO_URL: http://testkube-enterprise-dex.{{.Release.Namespace}}.svc.cluster.local:5556/userinfo
OAUTH_JWKS_URL: http://testkube-enterprise-dex.{{.Release.Namespace}}.svc.cluster.local:5556/keys
api:
inviteMode: "auto-accept"
# -- Configure which invitation mode to use (email|auto-accept): email uses SMTP protocol to send email invites and auto-accept immediately adds them
inviteMode: auto-accept
features:
disablePersonalOrgs: true
bootstrapOrg: "demo"
bootstrapEnv: "my-first-environment"
bootstrapAgentTokenSecretRef: "testkube-default-agent-token"
migrations:
enabled: false
mongo:
dsn: "mongodb://testkube-enterprise-mongodb:27017"
database: "testkubeEnterpriseDB"
nats:
uri: "nats://testkube-enterprise-nats:4222"
minio:
endpoint: "testkube-enterprise-minio:9000"
credsSecretRef: testkube-minio-credentials
expirationPeriod: 0
secure: false
sendgrid:
# -- Sendgrid API key
apiKey: ""
# -- Secret API key secret ref (secret must contain key SENDGRID_API_KEY) (default is `sendgrid-api-key`)
secretRef: ""
agent:
hide: false
# -- Agent host (without protocol) is used for building agent install commands (if blank, api will autogenerate it based on the value of `global.domain`)
host: "testkube-enterprise-api:grpcs"
# -- Agent port - used for building agent install commands
port: 80
tls:
serveHTTPS: false
oauth:
# -- OAuth secret ref for OAuth configuration (secret must contain keys: OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET, OAUTH_ISSUER_URL, OAUTH_REDIRECT_URI) (default is `testkube-cloud-oauth-secret`)
secretRef: ""
# -- OAuth Client ID for the configured static client in Dex
clientId: "testkube-enterprise"
# -- OAuth Client ID for the configured static client in Dex
clientSecret: "QWkVzs3nct6HZM5hxsPzwaZtq"
# -- If oauth.secretRef is empty (""), then oauth.redirectUri field will be used for the OAuth redirect URI
redirectUri: "http://localhost:8090/auth/callback"
# -- if oauth.secretRef is empty (""), then oauth.issuerUrl field will be used for the OAuth issuer URL
issuerUrl: ""
dashboardAddress: "http://localhost:8080"
apiAddress: "http://localhost:8090"
# -- S3 bucket in which to store logs & artifacts
outputsBucket: testkube-cloud-outputs
prometheus:
enabled: false

testkube-cloud-ui:
fullnameOverride: testkube-enterprise-ui
ui:
# -- Auth strategy to use (possible values: "" (default), "gitlab", "github"), setting to "" enables all auth strategies, if you use a custom Dex connector, set this to the id of the connector
authStrategy: ""
apiServerEndpoint: "http://localhost:8090"
rootRoute: "http://testkube-enterprise-ui:8080"
rootRoute: "http://testkube-enterprise-ui.{{.Release.Namespace}}.svc.cluster.local:8080"
additionalEnv:
REACT_APP_ENABLE_SIGNUP: "true"
ENABLE_SIGNUP: "true"
image:
repository: testkubeenterprise/testkube-enterprise-ui
tag: 1.9.4

testkube-agent:
enabled: true
Expand All @@ -61,35 +105,77 @@ testkube-agent:
enabled: false
testkube-api:
cloud:
url: testkube-enterprise-api:8089
url: testkube-enterprise-api.{{.Release.Namespace}}.svc.cluster.local:8089
tls:
enabled: false
existingSecret:
name: testkube-default-agent-token
key: agent-token

testkube-worker-service:
fullnameOverride: testkube-enterprise-worker-service
image:
repository: testkubeenterprise/testkube-enterprise-worker-service
tag: 1.9.4
api:
nats:
uri: "nats://testkube-enterprise-nats.{{.Release.Namespace}}.svc.cluster.local:4222"
minio:
endpoint: "testkube-enterprise-minio:9000"
credsSecretRef: testkube-minio-credentials
secure: false
additionalEnv:
USE_MINIO: true
image:
tag: 1.9.6

# See https://artifacthub.io/packages/helm/nats/nats
nats:
fullnameOverride: testkube-enterprise-nats
config:
cluster:
enabled: false
enabled: true
replicas: 3
jetstream:
enabled: true
fileStore:
pvc:
enabled: true
size: 10Gi
storageClassName:
merge:
max_payload: << 8MB >>
cluster:
name: << testkube-enterprise >>
reloader:
enabled: true
natsBox:
enabled: true
promExporter:
enabled: true

# See https://artifacthub.io/packages/helm/bitnami/mongodb
mongodb:
enabled: true
image:
registry: docker.io
repository: zcube/bitnami-compat-mongodb
tag: 6.0.5

minio:
fullnameOverride: "testkube-enterprise-mongodb"
auth:
existingSecret: testkube-minio-credentials
# -- Toggle whether to enable MongoDB authentication
enabled: false
# rootPassword: "123DefaultOne321"
resources:
requests:
cpu: 150m
memory: 128Mi
tolerations: []
podSecurityContext: {}
containerSecurityContext: {}

## See https://github.com/dexidp/helm-charts
dex:
enabled: true
fullnameOverride: testkube-enterprise-dex
ingress:
enabled: false
configSecret:
Expand Down Expand Up @@ -124,16 +210,22 @@ dex:
passwordConnector: local
additionalStaticClients: []
additionalConfig: |
staticClients:
- id: testkube-enterprise
redirectURIs:
- http://localhost:8090/auth/callback
name: Testkube
secret: QWkVzs3nct6HZM5hxsPzwaZtq
enablePasswordDB: true
staticPasswords:
- email: "[email protected]"
# bcrypt hash of the string "password": $(echo password | htpasswd -BinC 10 admin | cut -d: -f2)
hash: "$2a$10$2b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W"
username: "admin"
userID: "08a8684b-db88-4b73-90a9-3cd1661f5466"
resources:
requests:
cpu: 100m
memory: 128Mi
limits: {}

# see https://artifacthub.io/packages/helm/bitnami/minio
minio:
nameOverride: minio
enabled: true
auth:
existingSecret: testkube-minio-credentials

0 comments on commit 332def7

Please sign in to comment.