2023-01-30 03:27:11 -06:00
|
|
|
"""
|
|
|
|
This module returns functions for generating Drone secrets fetched from Vault.
|
|
|
|
"""
|
2024-01-19 11:29:49 -06:00
|
|
|
gcr_pull_secret = "gcr"
|
|
|
|
gar_pull_secret = "gar"
|
2023-01-30 03:27:11 -06:00
|
|
|
drone_token = "drone_token"
|
|
|
|
prerelease_bucket = "prerelease_bucket"
|
|
|
|
gcp_upload_artifacts_key = "gcp_upload_artifacts_key"
|
2023-07-21 08:53:57 -05:00
|
|
|
gcp_grafanauploads = "gcp_grafanauploads"
|
|
|
|
gcp_grafanauploads_base64 = "gcp_grafanauploads_base64"
|
2023-07-11 06:08:05 -05:00
|
|
|
gcp_download_build_container_assets_key = "gcp_download_build_container_assets_key"
|
2023-01-30 03:27:11 -06:00
|
|
|
azure_sp_app_id = "azure_sp_app_id"
|
|
|
|
azure_sp_app_pw = "azure_sp_app_pw"
|
|
|
|
azure_tenant = "azure_tenant"
|
2022-12-07 01:13:57 -06:00
|
|
|
|
2023-05-03 13:56:02 -05:00
|
|
|
rgm_gcp_key_base64 = "gcp_key_base64"
|
|
|
|
rgm_destination = "destination"
|
2023-10-04 11:55:43 -05:00
|
|
|
rgm_storybook_destination = "rgm_storybook_destination"
|
|
|
|
rgm_cdn_destination = "rgm_cdn_destination"
|
|
|
|
rgm_downloads_destination = "rgm_downloads_destination"
|
2023-05-03 13:56:02 -05:00
|
|
|
rgm_github_token = "github_token"
|
2023-05-17 12:19:53 -05:00
|
|
|
rgm_dagger_token = "dagger_token"
|
2023-05-03 13:56:02 -05:00
|
|
|
|
2023-09-07 11:26:43 -05:00
|
|
|
docker_username = "docker_username"
|
|
|
|
docker_password = "docker_password"
|
|
|
|
|
2023-08-17 09:43:26 -05:00
|
|
|
npm_token = "npm_token"
|
|
|
|
|
2021-05-12 08:30:05 -05:00
|
|
|
def from_secret(secret):
|
2023-01-30 03:27:11 -06:00
|
|
|
return {"from_secret": secret}
|
2021-05-12 08:30:05 -05:00
|
|
|
|
|
|
|
def vault_secret(name, path, key):
|
|
|
|
return {
|
2023-01-30 03:27:11 -06:00
|
|
|
"kind": "secret",
|
|
|
|
"name": name,
|
|
|
|
"get": {
|
|
|
|
"path": path,
|
|
|
|
"name": key,
|
2022-12-07 01:13:57 -06:00
|
|
|
},
|
2021-05-12 08:30:05 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
def secrets():
|
|
|
|
return [
|
2023-07-21 08:53:57 -05:00
|
|
|
vault_secret(gcp_grafanauploads, "infra/data/ci/grafana-release-eng/grafanauploads", "credentials.json"),
|
|
|
|
vault_secret(gcp_grafanauploads_base64, "infra/data/ci/grafana-release-eng/grafanauploads", "credentials_base64"),
|
2023-08-29 09:21:44 -05:00
|
|
|
vault_secret("grafana_api_key", "infra/data/ci/grafana-release-eng/grafanacom", "api_key"),
|
2024-01-19 11:29:49 -06:00
|
|
|
vault_secret(gcr_pull_secret, "secret/data/common/gcr", ".dockerconfigjson"),
|
|
|
|
vault_secret(gar_pull_secret, "secret/data/common/gar", ".dockerconfigjson"),
|
2023-01-30 03:27:11 -06:00
|
|
|
vault_secret("github_token", "infra/data/ci/github/grafanabot", "pat"),
|
|
|
|
vault_secret(drone_token, "infra/data/ci/drone", "machine-user-token"),
|
|
|
|
vault_secret(prerelease_bucket, "infra/data/ci/grafana/prerelease", "bucket"),
|
2023-09-07 11:26:43 -05:00
|
|
|
vault_secret(docker_username, "infra/data/ci/grafanaci-docker-hub", "username"),
|
|
|
|
vault_secret(docker_password, "infra/data/ci/grafanaci-docker-hub", "password"),
|
2022-12-07 01:13:57 -06:00
|
|
|
vault_secret(
|
|
|
|
gcp_upload_artifacts_key,
|
2023-01-30 03:27:11 -06:00
|
|
|
"infra/data/ci/grafana/releng/artifacts-uploader-service-account",
|
|
|
|
"credentials.json",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
2023-07-11 06:08:05 -05:00
|
|
|
vault_secret(
|
|
|
|
gcp_download_build_container_assets_key,
|
|
|
|
"infra/data/ci/grafana/assets-downloader-build-container-service-account",
|
|
|
|
"credentials.json",
|
|
|
|
),
|
2022-12-07 01:13:57 -06:00
|
|
|
vault_secret(
|
|
|
|
azure_sp_app_id,
|
2023-01-30 03:27:11 -06:00
|
|
|
"infra/data/ci/datasources/cpp-azure-resourcemanager-credentials",
|
|
|
|
"application_id",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
|
|
|
vault_secret(
|
|
|
|
azure_sp_app_pw,
|
2023-01-30 03:27:11 -06:00
|
|
|
"infra/data/ci/datasources/cpp-azure-resourcemanager-credentials",
|
|
|
|
"application_secret",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
|
|
|
vault_secret(
|
|
|
|
azure_tenant,
|
2023-01-30 03:27:11 -06:00
|
|
|
"infra/data/ci/datasources/cpp-azure-resourcemanager-credentials",
|
|
|
|
"tenant_id",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
2023-08-17 09:43:26 -05:00
|
|
|
vault_secret(
|
|
|
|
npm_token,
|
|
|
|
"infra/data/ci/grafana-release-eng/npm",
|
|
|
|
"token",
|
|
|
|
),
|
2022-09-01 06:13:44 -05:00
|
|
|
# Package publishing
|
2022-12-07 01:13:57 -06:00
|
|
|
vault_secret(
|
2023-01-30 03:27:11 -06:00
|
|
|
"packages_gpg_public_key",
|
|
|
|
"infra/data/ci/packages-publish/gpg",
|
|
|
|
"public-key-b64",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
|
|
|
vault_secret(
|
2023-01-30 03:27:11 -06:00
|
|
|
"packages_gpg_private_key",
|
|
|
|
"infra/data/ci/packages-publish/gpg",
|
|
|
|
"private-key-b64",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
|
|
|
vault_secret(
|
2023-01-30 03:27:11 -06:00
|
|
|
"packages_gpg_passphrase",
|
|
|
|
"infra/data/ci/packages-publish/gpg",
|
|
|
|
"passphrase",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
|
|
|
vault_secret(
|
2023-01-30 03:27:11 -06:00
|
|
|
"packages_service_account",
|
|
|
|
"infra/data/ci/packages-publish/service-account",
|
|
|
|
"credentials.json",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
|
|
|
vault_secret(
|
2023-01-30 03:27:11 -06:00
|
|
|
"packages_access_key_id",
|
|
|
|
"infra/data/ci/packages-publish/bucket-credentials",
|
|
|
|
"AccessID",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
|
|
|
vault_secret(
|
2023-01-30 03:27:11 -06:00
|
|
|
"packages_secret_access_key",
|
|
|
|
"infra/data/ci/packages-publish/bucket-credentials",
|
|
|
|
"Secret",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
2023-03-09 07:07:42 -06:00
|
|
|
vault_secret(
|
|
|
|
"static_asset_editions",
|
|
|
|
"infra/data/ci/grafana-release-eng/artifact-publishing",
|
|
|
|
"static_asset_editions",
|
|
|
|
),
|
2023-05-03 13:56:02 -05:00
|
|
|
vault_secret(
|
|
|
|
rgm_gcp_key_base64,
|
|
|
|
"infra/data/ci/grafana-release-eng/rgm",
|
2023-07-28 09:58:22 -05:00
|
|
|
"gcp_service_account_prod_base64",
|
2023-05-03 13:56:02 -05:00
|
|
|
),
|
|
|
|
vault_secret(
|
|
|
|
rgm_destination,
|
|
|
|
"infra/data/ci/grafana-release-eng/rgm",
|
2023-07-28 09:58:22 -05:00
|
|
|
"destination_prod",
|
2023-05-03 13:56:02 -05:00
|
|
|
),
|
2023-10-04 11:55:43 -05:00
|
|
|
vault_secret(
|
|
|
|
rgm_storybook_destination,
|
|
|
|
"infra/data/ci/grafana-release-eng/rgm",
|
|
|
|
"storybook_destination",
|
|
|
|
),
|
|
|
|
vault_secret(
|
|
|
|
rgm_cdn_destination,
|
|
|
|
"infra/data/ci/grafana-release-eng/rgm",
|
|
|
|
"cdn_destination",
|
|
|
|
),
|
|
|
|
vault_secret(
|
|
|
|
rgm_downloads_destination,
|
|
|
|
"infra/data/ci/grafana-release-eng/rgm",
|
|
|
|
"downloads_destination",
|
|
|
|
),
|
2023-05-17 12:19:53 -05:00
|
|
|
vault_secret(
|
|
|
|
rgm_dagger_token,
|
|
|
|
"infra/data/ci/grafana-release-eng/rgm",
|
|
|
|
"dagger_token",
|
|
|
|
),
|
2023-05-15 08:33:31 -05:00
|
|
|
# grafana-delivery-bot secrets
|
|
|
|
vault_secret(
|
|
|
|
"delivery-bot-app-id",
|
|
|
|
"infra/data/ci/grafana-release-eng/grafana-delivery-bot",
|
|
|
|
"app-id",
|
|
|
|
),
|
|
|
|
vault_secret(
|
|
|
|
"delivery-bot-app-installation-id",
|
|
|
|
"infra/data/ci/grafana-release-eng/grafana-delivery-bot",
|
|
|
|
"app-installation-id",
|
|
|
|
),
|
|
|
|
vault_secret(
|
|
|
|
"delivery-bot-app-private-key",
|
|
|
|
"infra/data/ci/grafana-release-eng/grafana-delivery-bot",
|
|
|
|
"app-private-key",
|
|
|
|
),
|
2023-08-28 06:52:08 -05:00
|
|
|
vault_secret(
|
|
|
|
"gcr_credentials",
|
|
|
|
"secret/data/common/gcr",
|
|
|
|
"service-account",
|
|
|
|
),
|
2021-05-12 08:30:05 -05:00
|
|
|
]
|