Skip to content
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

Add Vitally token secret #585

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,13 @@ To install, upgrade or uninstall this chart, please refer to [the root README.md
| `cartoSecrets.defaultGoogleServiceAccount.existingSecret.name` | Name of the pre-existent secret containing the `cartoSecrets.defaultGoogleServiceAccount.existingSecret.key`. If `cartoSecrets.defaultGoogleServiceAccount.value` is defined, this value is going to be ignored and not used. | `""` |
| `cartoSecrets.defaultGoogleServiceAccount.existingSecret.key` | Key to find in `cartoSecrets.defaultGoogleServiceAccount.existingSecret.name` where the value of `cartoSecrets.defaultGoogleServiceAccount` is found. If `cartoSecrets.defaultGoogleServiceAccount.value` is defined, this value is going to be ignored and not used. | `""` |
| `cartoSecrets.gitbookApiToken` | GitBook API Token provided by CARTO | |
| `cartoSecrets.gitbookApiToken.value` | Value of the secret used by the app to connect to google services. This couldn't be changed. One of `cartoSecrets.gitbookApiToken.value` or `cartoSecrets.gitbookApiToken.existingSecret` could be defined. | `""` |
| `cartoSecrets.gitbookApiToken.value` | Value of the secret used by the app to connect to Gitbook. This couldn't be changed. One of `cartoSecrets.gitbookApiToken.value` or `cartoSecrets.gitbookApiToken.existingSecret` could be defined. | `""` |
| `cartoSecrets.gitbookApiToken.existingSecret.name` | Name of the pre-existent secret containing the `cartoSecrets.gitbookApiToken.existingSecret.key`. If `cartoSecrets.gitbookApiToken.value` is defined, this value is going to be ignored and not used. | `""` |
| `cartoSecrets.gitbookApiToken.existingSecret.key` | Key to find in `cartoSecrets.gitbookApiToken.existingSecret.name` where the value of `cartoSecrets.gitbookApiToken` is found. If `cartoSecrets.gitbookApiToken.value` is defined, this value is going to be ignored and not used. | `""` |
| `cartoSecrets.vitallyToken` | Vitally Token provided by CARTO | |
| `cartoSecrets.vitallyToken.value` | Value of the secret used by the app to connect to Vitally. This couldn't be changed. One of `cartoSecrets.vitallyToken.value` or `cartoSecrets.vitallyToken.existingSecret` could be defined. | `""` |
| `cartoSecrets.vitallyToken.existingSecret.name` | Name of the pre-existent secret containing the `cartoSecrets.vitallyToken.existingSecret.key`. If `cartoSecrets.vitallyToken.value` is defined, this value is going to be ignored and not used. | `""` |
| `cartoSecrets.vitallyToken.existingSecret.key` | Key to find in `cartoSecrets.vitallyToken.existingSecret.name` where the value of `cartoSecrets.vitallyToken` is found. If `cartoSecrets.vitallyToken.value` is defined, this value is going to be ignored and not used. | `""` |
| `cartoSecrets.instanceId` | The secret used to define the instance ID for the active installation | |
| `cartoSecrets.instanceId.value` | Value of the secret used to define the instance ID for the active installation. One of `cartoSecrets.instanceId.value` or `cartoSecrets.instanceId.existingSecret` could be defined. | `""` |
| `cartoSecrets.instanceId.existingSecret.name` | Name of the pre-existent secret containing the `cartoSecrets.instanceId.existingSecret.key`. If `cartoSecrets.instanceId.value` is defined, this value is going to be ignored and not used. | `""` |
Expand Down
5 changes: 3 additions & 2 deletions chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Association between env secret and path of the secret in values.yaml
*/}}
{{- define "carto._utils.secretAssociation" -}}
BIGQUERY_OAUTH2_CLIENT_SECRET: appSecrets.bigqueryOauth2ClientSecret
CARTO_SELFHOSTED_INSTANCE_ID: cartoSecrets.instanceId
ENCRYPTION_SECRET_KEY: cartoSecrets.encryptionSecretKey
IMPORT_ACCESSKEYID: appSecrets.awsAccessKeyId
IMPORT_AWS_ACCESS_KEY_ID: appSecrets.importAwsAccessKeyId
Expand All @@ -55,6 +56,7 @@ IMPORT_STORAGE_ACCESSKEY: appSecrets.azureStorageAccessKey
GITBOOK_API_TOKEN: cartoSecrets.gitbookApiToken
EXPORTS_S3_BUCKET_ACCESS_KEY_ID: appSecrets.exportAwsAccessKeyId
EXPORTS_S3_BUCKET_SECRET_ACCESS_KEY: appSecrets.exportAwsSecretAccessKey
GOOGLE_MAPS_API_KEY: appSecrets.googleMapsApiKey
LDS_JWT_SECRET: cartoSecrets.jwtApiSecret
LDS_PROVIDER_HERE_API_KEY: appSecrets.ldsHereApiKey
LDS_PROVIDER_MAPBOX_API_KEY: appSecrets.ldsMapboxApiKey
Expand All @@ -64,7 +66,7 @@ LDS_PROVIDER_TRAVELTIME_API_KEY: appSecrets.ldsTravelTimeApiKey
LDS_PROVIDER_TRAVELTIME_APP_ID: appSecrets.ldsTravelTimeAppId
LAUNCHDARKLY_SDK_KEY: cartoSecrets.launchDarklySdkKey
MAPS_API_V3_JWT_SECRET: cartoSecrets.jwtApiSecret
GOOGLE_MAPS_API_KEY: appSecrets.googleMapsApiKey
REACT_APP_VITALLY_TOKEN: cartoSecrets.vitallyToken
VARNISH_DEBUG_SECRET: cartoSecrets.varnishDebugSecret
VARNISH_PURGE_SECRET: cartoSecrets.varnishPurgeSecret
WORKSPACE_IMPORTS_ACCESSKEYID: appSecrets.awsAccessKeyId
Expand All @@ -74,7 +76,6 @@ WORKSPACE_JWT_SECRET: cartoSecrets.jwtApiSecret
WORKSPACE_THUMBNAILS_ACCESSKEYID: appSecrets.awsAccessKeyId
WORKSPACE_THUMBNAILS_SECRETACCESSKEY: appSecrets.awsAccessKeySecret
WORKSPACE_THUMBNAILS_STORAGE_ACCESSKEY: appSecrets.azureStorageAccessKey
CARTO_SELFHOSTED_INSTANCE_ID: cartoSecrets.instanceId
{{- end -}}

{{/*
Expand Down
1 change: 0 additions & 1 deletion chart/templates/workspace-www/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ data:
REACT_APP_WORKSPACE_WWW_ENABLE_TRACKJS: {{ .Values.appConfigValues.enableTrackJS | quote }}
REACT_APP_WORKSPACE_WWW_ENABLE_EXPORTS: "false"
REACT_APP_WORKSPACE_WWW_ENABLE_GENAI: "false"
REACT_APP_ASKNICELY_MIN_HOURS_ACCOUNT_OLD_ENOUGH: "1920"
{{- if .Values.appConfigValues.ssoOrganizationId }}
REACT_APP_ORGANIZATION_ID: {{ .Values.appConfigValues.ssoOrganizationId }}
{{- end }}
Expand Down
10 changes: 8 additions & 2 deletions chart/templates/workspace-www/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,20 @@ spec:
/docker-entrypoint.sh nginx -g "daemon off;"
{{- end }}
env:
{{- include "carto._utils.generateSecretDefs" (dict "vars" (list "GOOGLE_MAPS_API_KEY") "context" $ ) | nindent 12 }}
{{- include "carto._utils.generateSecretDefs" (dict "vars" (list
"GOOGLE_MAPS_API_KEY"
"REACT_APP_VITALLY_TOKEN"
) "context" $ ) | nindent 12 }}
{{- if .Values.workspaceWww.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.workspaceWww.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
- configMapRef:
name: {{ template "carto.workspaceWww.configmapName" . }}
{{- $secretContent := include "carto._utils.generateSecretObjects" (dict "vars" (list "GOOGLE_MAPS_API_KEY") "context" $ ) -}}
{{- $secretContent := include "carto._utils.generateSecretObjects" (dict "vars" (list
"GOOGLE_MAPS_API_KEY"
"REACT_APP_VITALLY_TOKEN"
) "context" $ ) -}}
{{- if $secretContent }}
- secretRef:
name: {{ include "carto.workspaceWww.secretName" . }}
Expand Down
5 changes: 4 additions & 1 deletion chart/templates/workspace-www/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{{ $secretContent := include "carto._utils.generateSecretObjects" (dict "vars" (list "GOOGLE_MAPS_API_KEY") "context" $ )}}
{{ $secretContent := include "carto._utils.generateSecretObjects" (dict "vars" (list
"GOOGLE_MAPS_API_KEY"
"REACT_APP_VITALLY_TOKEN"
) "context" $ )}}
{{- if $secretContent }}
apiVersion: v1
kind: Secret
Expand Down
12 changes: 11 additions & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,24 @@ cartoSecrets:
key: ""
## @extra cartoSecrets.gitbookApiToken GitBook API Token provided by CARTO
gitbookApiToken:
## @param cartoSecrets.gitbookApiToken.value Value of the secret used by the app to connect to google services. This couldn't be changed. One of `cartoSecrets.gitbookApiToken.value` or `cartoSecrets.gitbookApiToken.existingSecret` could be defined.
## @param cartoSecrets.gitbookApiToken.value Value of the secret used by the app to connect to Gitbook. This couldn't be changed. One of `cartoSecrets.gitbookApiToken.value` or `cartoSecrets.gitbookApiToken.existingSecret` could be defined.
value: ""
## @param cartoSecrets.gitbookApiToken.existingSecret.name Name of the pre-existent secret containing the `cartoSecrets.gitbookApiToken.existingSecret.key`. If `cartoSecrets.gitbookApiToken.value` is defined, this value is going to be ignored and not used.
## @param cartoSecrets.gitbookApiToken.existingSecret.key Key to find in `cartoSecrets.gitbookApiToken.existingSecret.name` where the value of `cartoSecrets.gitbookApiToken` is found. If `cartoSecrets.gitbookApiToken.value` is defined, this value is going to be ignored and not used.
##
existingSecret:
name: ""
key: ""
## @extra cartoSecrets.vitallyToken Vitally Token provided by CARTO
vitallyToken:
## @param cartoSecrets.vitallyToken.value Value of the secret used by the app to connect to Vitally. This couldn't be changed. One of `cartoSecrets.vitallyToken.value` or `cartoSecrets.vitallyToken.existingSecret` could be defined.
value: ""
## @param cartoSecrets.vitallyToken.existingSecret.name Name of the pre-existent secret containing the `cartoSecrets.vitallyToken.existingSecret.key`. If `cartoSecrets.vitallyToken.value` is defined, this value is going to be ignored and not used.
## @param cartoSecrets.vitallyToken.existingSecret.key Key to find in `cartoSecrets.vitallyToken.existingSecret.name` where the value of `cartoSecrets.vitallyToken` is found. If `cartoSecrets.vitallyToken.value` is defined, this value is going to be ignored and not used.
##
existingSecret:
name: ""
key: ""
## @extra cartoSecrets.instanceId The secret used to define the instance ID for the active installation
instanceId:
## @param cartoSecrets.instanceId.value Value of the secret used to define the instance ID for the active installation. One of `cartoSecrets.instanceId.value` or `cartoSecrets.instanceId.existingSecret` could be defined.
Expand Down
2 changes: 2 additions & 0 deletions manifests/kots-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ spec:
value: '{{repl ConfigOption "cartoPlatformGoogleSA" }}'
instanceId:
value: '{{repl ConfigOption "autogeneratedInstanceId" }}'
vitallyToken:
value: '{{repl LicenseFieldValue "vitallyToken" }}'
# Carto Config Values
cartoConfigValues:
cartoAccApiDomain: '{{repl fromJson (ConfigOption "valuesDerivedFromCartoPlatformEnvironment") | dig "cartoAccApiDomain" "" | Base64Decode }}'
Expand Down
Loading