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

Backport of [NET-11567] Update Helm Chart to allow snapshotagent to support extraVolumes and extraEnvionmentVars into release/1.6.x #4475

Open
wants to merge 2 commits into
base: release/1.6.x
Choose a base branch
from

Conversation

hc-github-team-consul-core
Copy link
Collaborator

Backport

This PR is auto-generated from #4471 to be assessed for backporting due to the inclusion of the label backport/1.6.x.

The below text is copied from the body of the original PR.


Changes proposed in this PR

  • Add support for server.snapshotAgent.extraEnvironment and server.snapshotAgent.extraVolume in the helm chart to allow for configuring google application credentials

How I've tested this PR

  • Running locally against a kind cluster with the snapshot agent configured to point at a google bucket

Using the following config

Google application credentials loaded into cluster with the following secret name/secret key

   name: snapshot-agent-google-app-creds
   key: creds.json

configSecret

kubectl create secret generic snapshot-config --from-file=snapshot-agent=<path-to-config-below>/snapshotagentconfig.yaml
{
  "snapshot_agent": {
    "http_addr": "127.0.0.1:8500",
    "token": "",
    "datacenter": "",
    "ca_file": "",
    "ca_path": "",
    "cert_file": "",
    "key_file": "",
    "license_path": "",
    "tls_server_name": "",
    "login": {
      "auth_method": "",
      "bearer_token": "",
      "bearer_token_file": "",
      "meta": {}
    },
    "log": {
      "level": "INFO",
      "enable_syslog": false,
      "syslog_facility": "LOCAL0"
    },
    "snapshot": {
      "interval": "5m",
      "retain": 30,
      "stale": false,
      "service": "consul-snapshot",
      "deregister_after": "76h",
      "lock_key": "consul-snapshot/lock",
      "max_failures": 3,
      "local_scratch_path": "/home/consul"
    },
    "backup_destinations": {
      "google_storage": [
        {
          "bucket": "snapshot-test-bucket-2-4-2025"
        }
      ]
    }
  }
}

config.yaml

---
global:
  image: 'hashicorp/consul-enterprise:1.20.0-ent'
  enterpriseLicense:
    secretName: 'consul-ent-license'
    secretKey: 'key'

server:
  snapshotAgent:
    enabled: true
    interval: "30s"
    fakevalue: false
    configSecret:
      secretName: snapshot-config
      secretKey: snapshot-agent
    extraEnvironmentVars:
      GOOGLE_APPLICATION_CREDENTIALS: /consul/userconfig/snapshot-agent-google-app-creds/creds.json
    extraVolumes:
      - type: secret
        name: snapshot-agent-google-app-creds
Screenshot 2025-02-04 at 3 22 34 PM Screenshot 2025-02-04 at 3 22 51 PM

How I expect reviewers to test this PR

  • Read and verify screenshots

Checklist


Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core requested a review from a team as a code owner February 5, 2025 17:50
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/NET-11567-credentials-for-gcs-bucket-in-k-8-s-deployment/duly-relevant-arachnid branch from de01d91 to 6b51749 Compare February 5, 2025 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants