Ryan Draga
04/24/2024, 6:49 PMvalues.yaml stored in Key Vault secrets which are delivered to the cluster by way of External Secrets. For some reason though it seems like the resulting yaml inside the secret is either corrupt or I've formatted it wrong, and I can't tell which it is.PePe Amengual
04/24/2024, 7:24 PMPePe Amengual
04/24/2024, 7:25 PMRyan Draga
04/24/2024, 7:49 PMenvironmentSecrets in values.yaml to specify environment variables. this is what that looks like:Ryan Draga
04/24/2024, 7:49 PMenvironmentSecrets:
- name: ATLANTIS_GH_USER
secretKeyRef:
name: atlantis
key: atlantis-github-user
- name: ATLANTIS_GH_TOKEN
secretKeyRef:
name: atlantis
key: atlantis-github-token
- name: ATLANTIS_GH_WEBHOOK_SECRET
secretKeyRef:
name: atlantis
key: atlantis-github-webhook-secret
- name: ATLANTIS_WEB_USERNAME
secretKeyRef:
name: atlantis
key: atlantis-web-username
- name: ATLANTIS_WEB_PASSWORD
secretKeyRef:
name: atlantis-basicauth
key: password
- name: ATLANTIS_API_SECRET
secretKeyRef:
name: atlantis
key: atlantis-api-secretRyan Draga
04/24/2024, 7:50 PMRyan Draga
04/24/2024, 7:51 PMRyan Draga
04/24/2024, 7:51 PMRyan Draga
04/24/2024, 7:51 PMPePe Amengual
04/24/2024, 7:53 PMname: atlantisRyan Draga
04/24/2024, 7:53 PMRyan Draga
04/24/2024, 7:54 PMPePe Amengual
04/24/2024, 7:54 PMPePe Amengual
04/24/2024, 7:55 PMPePe Amengual
04/24/2024, 7:55 PMRyan Draga
04/24/2024, 7:58 PMGabriel Martinez
04/25/2024, 10:47 AMenv do you see these env variables defined there?Gabriel Martinez
04/25/2024, 10:49 AMRyan Draga
04/25/2024, 12:58 PMRyan Draga
04/25/2024, 1:00 PMvalues.yamlRyan Draga
04/25/2024, 1:00 PMenvironmentSecrets:
- name: ATLANTIS_GH_USER
secretKeyRef:
name: atlantis
key: atlantis-github-user
- name: ATLANTIS_GH_TOKEN
secretKeyRef:
name: atlantis
key: atlantis-github-token
- name: ATLANTIS_GH_WEBHOOK_SECRET
secretKeyRef:
name: atlantis
key: atlantis-github-webhook-secret
- name: ATLANTIS_WEB_USERNAME
secretKeyRef:
name: atlantis
key: atlantis-web-username
- name: ATLANTIS_WEB_PASSWORD
secretKeyRef:
name: atlantis-basicauth
key: password
- name: ATLANTIS_API_SECRET
secretKeyRef:
name: atlantis
key: atlantis-api-secretRyan Draga
04/25/2024, 1:01 PMRyan Draga
04/25/2024, 1:02 PMapiVersion: v1
data:
atlantis-api-secret: [REDACTED]
atlantis-gitconfig: [REDACTED]
atlantis-github-token: [REDACTED]
atlantis-github-user: [REDACTED]
atlantis-github-webhook-secret: [REDACTED]
atlantis-web-password: [REDACTED]
atlantis-web-username: [REDACTED]
immutable: false
kind: Secret
metadata:
annotations:
<http://kubectl.kubernetes.io/last-applied-configuration|kubectl.kubernetes.io/last-applied-configuration>: |
{"apiVersion":"<http://external-secrets.io/v1beta1|external-secrets.io/v1beta1>","kind":"ExternalSecret","metadata":{"annotations":{},"name":"atlantis","namespace":"atlantis"},"spec":{"data":[{"remoteRef":{"key":"secret/atlantis-github-user"},"secretKey":"atlantis-github-user"},{"remoteRef":{"key":"secret/atlantis-github-token"},"secretKey":"atlantis-github-token"},{"remoteRef":{"key":"secret/atlantis-github-webhook-secret"},"secretKey":"atlantis-github-webhook-secret"},{"remoteRef":{"key":"secret/atlantis-api-secret"},"secretKey":"atlantis-api-secret"},{"remoteRef":{"key":"secret/atlantis-web-username"},"secretKey":"atlantis-web-username"},{"remoteRef":{"key":"secret/atlantis-web-password"},"secretKey":"atlantis-web-password"},{"remoteRef":{"key":"secret/atlantis-gitconfig"},"secretKey":"atlantis-gitconfig"}],"refreshInterval":"1m","secretStoreRef":{"kind":"ClusterSecretStore","name":"mi-infra-worker-extsec"},"target":{"name":"atlantis"}}}
<http://reconcile.external-secrets.io/data-hash|reconcile.external-secrets.io/data-hash>: 32d77666fd0e3c172f24aa68ac294aae
creationTimestamp: "2024-04-24T19:29:09Z"
labels:
<http://reconcile.external-secrets.io/created-by|reconcile.external-secrets.io/created-by>: 19ff3c0e100bcc589760c06d99fdccf6
name: atlantis
namespace: atlantis
ownerReferences:
- apiVersion: <http://external-secrets.io/v1beta1|external-secrets.io/v1beta1>
blockOwnerDeletion: true
controller: true
kind: ExternalSecret
name: atlantis
uid: 7558f3dd-1421-47b1-8843-a5b139e50819
resourceVersion: "319569919"
uid: 27d76e5c-151e-4731-9522-d8d7c6ed3d98
type: OpaqueGabriel Martinez
04/25/2024, 1:04 PMRyan Draga
04/25/2024, 1:05 PMGabriel Martinez
04/25/2024, 1:07 PMRyan Draga
04/25/2024, 1:08 PMRyan Draga
04/25/2024, 1:09 PMEnvironment:
ATLANTIS_DEFAULT_TF_VERSION: 1.7.4
ATLANTIS_LOG_LEVEL: info
ATLANTIS_SSL_CERT_FILE: /etc/tls/tls.crt
ATLANTIS_SSL_KEY_FILE: /etc/tls/tls.key
ATLANTIS_DATA_DIR: /atlantis-data
ATLANTIS_REPO_ALLOWLIST: [REDACTED]
ATLANTIS_PORT: 4141
ATLANTIS_ATLANTIS_URL: [REDACTED]Ryan Draga
04/25/2024, 1:10 PMenvironmentSecrets, why isn't the chart pulling it in?Gabriel Martinez
04/25/2024, 1:10 PMGabriel Martinez
04/25/2024, 1:11 PMGabriel Martinez
04/25/2024, 1:12 PMGabriel Martinez
04/25/2024, 1:14 PMRyan Draga
04/25/2024, 1:15 PMapiVersion: v1
appVersion: v0.27.2
description: A Helm chart for Atlantis <https://www.runatlantis.io>
home: <https://www.runatlantis.io>
icon: <https://www.runatlantis.io/hero.png>
keywords:
- terraform
maintainers:
- name: lkysow
- name: jamengual
- name: chenrui333
- name: nitrocode
- name: genpage
- name: gmartinez-sisti
name: atlantis
sources:
- <https://github.com/runatlantis/atlantis>
version: 4.25.0Gabriel Martinez
04/25/2024, 1:15 PMRyan Draga
04/25/2024, 1:16 PMRyan Draga
04/25/2024, 1:16 PMGabriel Martinez
04/25/2024, 1:17 PMRyan Draga
04/25/2024, 1:18 PMGabriel Martinez
04/25/2024, 1:18 PMGabriel Martinez
04/25/2024, 1:24 PM→ cat test.yaml
environmentSecrets:
- name: ATLANTIS_GH_USER
secretKeyRef:
name: atlantis
key: atlantis-github-user
- name: ATLANTIS_GH_TOKEN
secretKeyRef:
name: atlantis
key: atlantis-github-token
- name: ATLANTIS_GH_WEBHOOK_SECRET
secretKeyRef:
name: atlantis
key: atlantis-github-webhook-secret
- name: ATLANTIS_WEB_USERNAME
secretKeyRef:
name: atlantis
key: atlantis-web-username
- name: ATLANTIS_WEB_PASSWORD
secretKeyRef:
name: atlantis-basicauth
key: password
- name: ATLANTIS_API_SECRET
secretKeyRef:
name: atlantis
key: atlantis-api-secret
→ helm template atlantis . -f test.yaml -s templates/statefulset.yaml | yq .spec.template.spec.containers[0].env
- name: ATLANTIS_GH_USER
valueFrom:
secretKeyRef:
name: atlantis
key: atlantis-github-user
- name: ATLANTIS_GH_TOKEN
valueFrom:
secretKeyRef:
name: atlantis
key: atlantis-github-token
- name: ATLANTIS_GH_WEBHOOK_SECRET
valueFrom:
secretKeyRef:
name: atlantis
key: atlantis-github-webhook-secret
- name: ATLANTIS_WEB_USERNAME
valueFrom:
secretKeyRef:
name: atlantis
key: atlantis-web-username
- name: ATLANTIS_WEB_PASSWORD
valueFrom:
secretKeyRef:
name: atlantis-basicauth
key: password
- name: ATLANTIS_API_SECRET
valueFrom:
secretKeyRef:
name: atlantis
key: atlantis-api-secret
- name: ATLANTIS_DATA_DIR
value: /atlantis-data
- name: ATLANTIS_REPO_ALLOWLIST
value: "<replace-me>"
- name: ATLANTIS_PORT
value: "4141"
- name: ATLANTIS_ATLANTIS_URL
value: http://
looks like your values file is not being correctly sourced.Ryan Draga
04/25/2024, 1:24 PMGabriel Martinez
04/25/2024, 1:25 PMRyan Draga
04/25/2024, 1:25 PMhelm install atlantis runatlantis/atlantis -f values.yaml ?Ryan Draga
04/25/2024, 1:27 PMRyan Draga
04/25/2024, 1:27 PMRyan Draga
04/25/2024, 1:42 PMRyan Draga
04/25/2024, 1:43 PMenvironmentSecrets block, and a couple of autoco-wrecked-ed secret namesRyan Draga
04/25/2024, 1:43 PMGabriel Martinez
04/25/2024, 1:47 PMRyan Draga
04/25/2024, 2:38 PMClusterIP instead of NodePort for the service block?Ryan Draga
04/25/2024, 2:38 PMRyan Draga
04/25/2024, 2:38 PMGabriel Martinez
04/25/2024, 11:08 PM