Overview
The Secret Env Var Syncer (SEVS) is a cron workload that keeps environment variables in step with Control Plane dictionary secrets. On every run it reads each configured entry, lists the keys of the named dictionary secret, and makes sure the target GVC or workload container has one environment variable per key whose value is the referencecpln://secret/SECRET_NAME.KEY_NAME. It then exits until the next scheduled run.
SEVS writes references, not values. Adding a key to a secret gives every target a matching env var on the next run, but changing the value of an existing key changes nothing SEVS manages, so it does not redeploy anything when you rotate a secret (see Rotating a Synced Secret).
This template deploys into an existing GVC that you already have. It does not create a GVC. Its targets can be in that GVC or any other GVC in the same org.
What Gets Created
Prerequisites
Three things must exist before a sync can succeed. SEVS creates none of them; it resolves them on every run.1
Create the dictionary secret to sync
Only Set
dictionary secrets are accepted as sources, and each one must have at least one key. Every key becomes an env var name on the target, so use names that are valid environment variables:sevsConfig.entries[].secret to this name.2
Make sure the target exists
A
gvc target names an existing GVC. A workload target names an existing workload, the GVC it lives in, and the exact name of one of its containers. Set sevsConfig.entries[].target accordingly.3
Let the target read the secret
SEVS writes Save it to a file and apply it with
cpln://secret/... references, and a reference is resolved by the target workload, not by SEVS. Each workload that receives one needs an identity with reveal on that secret. A policy shaped like the one this template creates, scoped to a single secret:cpln apply -f. IDENTITY_NAME is the identity already linked to the target workload.Installation
The defaultsevsConfig points at placeholder names (my-gvc, my-dictionary-secret), so every run fails until you replace it. Install with your first entry set. Setting any field of sevsConfig.entries[0] replaces the whole default list, so set every field of the entry, including type:
sevsConfig.entries list in your values instead of individual --set flags.
To install, follow the instructions for your preferred method:
UI
Browse, install, and manage templates visually
CLI
Manage templates from your terminal
Terraform
Declare templates in your Terraform configurations
Pulumi
Declare templates in your Pulumi programs
Configuration
Image and Resources
resources.cpu and resources.memory are the limits for the syncer container. Leave image alone unless you are deliberately moving to another syncer release.
Schedule and Timeout
Sync Entries
A
gvc target gets the env vars in the GVC’s own environment list. A workload target gets them in the named container’s env list only; other containers are left alone.
For every key, SEVS sets an env var with that name and the value cpln://secret/SECRET_NAME.KEY_NAME. An existing env var with the same name is overwritten. Env vars with other names are kept, and the list is stored sorted by name. When the target already matches, SEVS does not write to it.
Connecting
There is no endpoint. SEVS is a scheduled job with no inbound access. You confirm it works from its logs and from the target.
Check that runs complete, using a server-side filter:
entry.success line carries updated: true when SEVS changed the target and updated: false when it was already in sync. Then confirm the env vars landed on a workload target:
gvc target, read the GVC’s environment list instead:
Operations
Changing the Entries
Changingschedule, timeoutSeconds or sevsConfig is a normal upgrade with the full values you want to keep:
Running a Sync Now
To run once without waiting for the schedule, start the cron job by hand:cpln workload cron get RELEASE_NAME-sevs --gvc GVC_NAME.
Rotating a Synced Secret
Changing the value of an existing key does not change the reference SEVS wrote, so SEVS sees nothing to update and the targets keep running with the old value. Rotate the secret, then force a redeployment of every workload that uses it:Removing a Key from a Secret
SEVS only adds and overwrites; it never deletes env vars. After you remove a key from a dictionary secret, the target still referencescpln://secret/SECRET_NAME.KEY_NAME. Remove that env var from the target (or from the GVC for a gvc target) yourself.
Uninstalling
Troubleshooting
A run fails and later entries are not processed
A run fails and later entries are not processed
Symptom: the logs show an
entry.error line and no job.completed for that run.Cause: a run stops at the first entry that fails, so every entry after it is skipped too. The error field names the problem, for example Secret "SECRET_NAME" is not a dictionary secret, Secret "SECRET_NAME" did not expose any dictionary keys to sync, or Workload "WORKLOAD_NAME" does not contain a container named "CONTAINER_NAME".Fix: correct the entry (or create the missing secret or target) and upgrade the release. Find the error with a server-side filter:Every run fails right after install
Every run fails right after install
Symptom:
entry.error on every run against my-gvc or my-dictionary-secret.Cause: the release is still using the placeholder entry from the default values.Fix: upgrade with your real entries as shown in Changing the Entries.The run fails with a config error about target.gvc
The run fails with a config error about target.gvc
Symptom: the run exits with
entries[0].target.gvc must be provided for workload targets (or the same message for target.container).Cause: a workload target needs both gvc and container, even when the workload is in the same GVC as SEVS.Fix: add both fields to the entry and upgrade.A target stopped rolling out after a sync
A target stopped rolling out after a sync
Symptom: the target workload keeps running an older version and
status.versions[].message says it is not allowed to reveal the secret, or that the secret no longer exists.Cause: the target cannot resolve a reference SEVS wrote, either because its identity lacks reveal on the secret or because the key or secret was removed.Fix: grant reveal as in Prerequisites, or remove the stale env var from the target, then run cpln workload force-redeployment WORKLOAD_NAME --gvc GVC_NAME.A rotated secret value is not picked up
A rotated secret value is not picked up
Symptom: the target still uses the old value after a rotation, and SEVS logs
updated: false.Cause: expected. The reference did not change, so SEVS has nothing to write, and the platform does not restart running workloads on rotation.Fix: force a redeployment of the target, as in Rotating a Synced Secret.Important Notes
- The identity can reveal every secret and edit every GVC and workload in the org; treat the release as privileged.
- Source secrets must be
dictionarysecrets with at least one key. - Every
workloadtarget needs bothtarget.gvcandtarget.container. - Each target workload needs
revealon the synced secret, or it stops rolling out once the reference is added. - Rotating a value requires a forced redeployment of the targets; SEVS does not trigger one.
- Env vars SEVS wrote are never removed by SEVS, by deleting an entry, or by uninstalling.