Skip to content

[werft] Update previews to use analytics token from secret #14511

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
merged 1 commit into from
Nov 8, 2022

Conversation

Pothulapati
Copy link
Contributor

Description

Currently, Analytics in preview environments are broken through werft as we need to pass the write key through attributes which means we would leak it.

This PR fixes that by instead updating weft to read them from a Kubernetes secret (This is already added into the cluster. See https://github.com/gitpod-io/ops/pull/6614). This means users now enable analytics by using setting analytics: segment and we read segment-staging-write-key to make it work. This secret is set to the staging segment source right now.

Signed-off-by: Tarun Pothulapati [email protected]

Related Issue(s)

Fixes #14509

How to test

Run the following and see analytic events in the staging trusted segment source.

leeway run dev/preview:build
leeway run dev/preview:create-preview
GITPOD_ANALYTICS=segment leeway run dev/preview:deploy-gitpod

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide

Fixes #14509

Currently, Analytics in preview environments are broken through
werft as we need to pass the write key through attributes which
means we would leak it.

This PR fixes that by instead updating weft to read them from
a Kubernetes secret (This is already added into the cluster. See
https://github.com/gitpod-io/ops/pull/6614). This means users
now enable analytics by using setting `analytics: segment` and
we read `segment-staging-write-key` to make it work. This secret
is set to the staging segment source right now.

Signed-off-by: Tarun Pothulapati <[email protected]>
Copy link
Contributor

@mads-hartmann mads-hartmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Enjoyed pairing on this!

@roboquat roboquat merged commit 0da1204 into main Nov 8, 2022
@roboquat roboquat deleted the tar/werft-analytics-token branch November 8, 2022 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Read segments analytics token for preview environments from a secret
3 participants