Skip to content
ModuleM2 — Install, upgrade and roll back
After this session you canWrite Northwind’s values and secrets so the chart renders cleanly, with nothing secret in the file you commit, and say in advance which mistakes the chart will catch and which it will not.
TimeFacilitated: 42 min · On your own: 42 min
Before you startM1-S1: pack-values.yaml, the osos/ chart folder, your inventory. The lab cluster from M0-S2.
Go deeperHelm chart: install and upgrade · Configuration reference: required secrets

◆ Orientation (1 min) — The values file is the deployment

Section titled “◆ Orientation (1 min) — The values file is the deployment”

Everything that makes the release Northwind’s (its address, its datastores, its keys, its mail server) is a value. The chart turns values into ConfigMaps and Secrets, and the services read them as environment variables when they start. So the values file is not paperwork: it is the deployment, and a mistake in it is either caught by the chart at once or found by your users later. This session is about knowing which.

▤ Concept (8 min) — From values to running pods

Section titled “▤ Concept (8 min) — From values to running pods”
flowchart LR
  V["Your values files"] --> H["helm template / install"]
  H -->|"settings"| CM["ConfigMaps"]
  H -->|"passwords, keys"| S["Secrets"]
  CM --> P["Pods read them as<br/>environment variables at start"]
  S --> P

What to notice: pods read their environment only when they start. The chart stamps a checksum of each ConfigMap and Secret on most Deployments, so a changed value rolls the pods that read it on the next upgrade.

There is no configuration file inside a running service to edit. If you change a ConfigMap by hand, nothing happens until the pod restarts, and the next helm upgrade overwrites your change. The values files are the only source of truth.

FileHoldsCommitted to Git?
nw-values.yamlEvery setting: addresses, datastores, which services run, sizesYes. It contains no secret.
nw-secrets.yamlEvery password and key, generated once (in production: from your secret manager)Never
pack-values.yamlThe license values from your vendor’s evaluation packNever

You pass all three to Helm, settings first: -f nw-values.yaml -f nw-secrets.yaml -f pack-values.yaml. When two files set the same key, the later one wins.

The license step. A license is required to activate Administration. Your vendor gives you the values; you do not create or edit them. Put them in pack-values.yaml: license.clientId, license.tokenUrl (an https:// address the gateway pods must reach) and the private key, held in your own Secret named by license.existingSecret and license.existingSecretKey. A multi-tenant cell adds license.cellId. You install them with the release in M2-S2 and renew them in M2-S3; the job aid has the commands. There is no license screen: ask your vendor.

Some values are checked while the chart is rendered. If one is missing or malformed, helm template and helm install stop before anything reaches the cluster, with a message naming the problem:

ValueMessage or behaviour
secrets.sharedKeyA valid shared key should be provided.
core.mongoUrlTemplateStops when empty, or when it lacks the literal {db}
web.config.clientIdweb.config.clientId is required
altcha.config.altchaHMACKey (while altcha.enabled)A valid altcha HMAC key should be provided.
core.enabled: falseRefused: the combined pods are the only shape

A render-time failure is the cheapest failure there is. Always render (helm template) and lint (helm lint) before you install or upgrade.

Other mistakes render perfectly and fail later, sometimes much later:

MistakeWhen you find out
A MongoDB, RabbitMQ or Redis address that is wrong or unreachablePods start, never become ready, and log connection errors
identity.config.recoveryCodePepper left emptyThe install succeeds; the first time someone uses a two-factor recovery code, it fails
core.mongoUrlTemplate composing a database name that does not existNothing fails: the application connects to a new, empty database, and the data seems to be missing
The message-bus set-up Job cannot reach RabbitMQ’s management addressThe install hangs on that Job, then fails
ValueWhy you never change it casually
data.config.fieldEncryptionMasterKeyIt protects the key that encrypts every encrypted field. Change it and those fields become permanently unreadable. Back it up outside the cluster (M4-S3).
identity.config.recoveryCodePepperRotating it invalidates every two-factor recovery code already issued.
identity.config.totpEncryptionKeyIt encrypts the stored two-factor secrets; a new key cannot read the old ones.
secrets.sharedKeyRotation is a planned procedure, not an edit (M3-S2).
identity.oidc.cookieKeys, storage.linkSigning.keyLeft empty, the chart generates them once and keeps them. If you render with helm template (for example from Argo CD), set them explicitly, or a new key on every render signs everyone out and breaks every file link.

Generate keys with openssl rand -hex 32 (32 bytes, 64 hexadecimal characters). That is the form the encryption and pepper values expect.

⛏ Lab (16 min) — Northwind’s values, rendered clean

Section titled “⛏ Lab (16 min) — Northwind’s values, rendered clean”

Goal. Three values files that render without error, with every secret in the two files you never commit.

Before you start. Your working folder with osos/ and pack-values.yaml. Add nw-secrets.yaml to .gitignore next to pack-values.yaml.

  1. Create nw-values.yaml. Replace <registry from your vendor> with the registry from your pack; nothing else in it is secret.

    # nw-values.yaml: Northwind lab release. Settings only; no secret belongs here.
    rootHost: localhost
    image:
    repository: <registry from your vendor>/
    imageCredentials:
    enabled: true
    registry: <registry from your vendor>
    ingress:
    className: nginx
    hosts:
    - host: localhost
    web:
    config:
    clientId: nw-web
    identity:
    ingress:
    enabled: false # sign-in served under localhost, not on its own host name
    config:
    mongodb:
    url: "mongodb://mongo-0.mongo.datastores.svc.cluster.local:27017/nw-identity?replicaSet=rs0"
    core:
    mongoUrlTemplate: "mongodb://mongo-0.mongo.datastores.svc.cluster.local:27017/nw-{db}?replicaSet=rs0"
    storage:
    config:
    storageType: disk
    mongodb:
    url: "mongodb://mongo-0.mongo.datastores.svc.cluster.local:27017/nw-storage?replicaSet=rs0"
    scheduler:
    config:
    mongodb:
    url: "mongodb://mongo-0.mongo.datastores.svc.cluster.local:27017/nw-scheduler?replicaSet=rs0"
    translation:
    deployment:
    config:
    mongodb:
    url: "mongodb://mongo-0.mongo.datastores.svc.cluster.local:27017/nw-translation?replicaSet=rs0"
    rabbitmq:
    vhostManagement:
    managementUrl: "http://rabbitmq.datastores.svc.cluster.local:15672"
    vhost: nw
    image:
    repository: docker.io/
    redis:
    host: redis.datastores.svc.cluster.local
    port: "6379"
    database: "1"
    email:
    deployment:
    enabled: true # the lab has no shared email function: run the sender here
    config:
    smtp:
    host: mailpit.datastores.svc.cluster.local
    port: "1025"
    secure: "false"
    migration:
    config:
    superAdminEmail: operator@northwind.example.com
    superAdminUsername: nwoperator
  2. Generate nw-secrets.yaml. The heredoc runs openssl once per key, so every key is new and none is typed by hand. Replace the two registry placeholders with your pack’s values when the file is written, in an editor, not on the command line.

    Terminal window
    cat > nw-secrets.yaml <<EOF
    # nw-secrets.yaml: NEVER COMMIT. Lab secrets generated $(date +%F).
    imageCredentials:
    username: "<user from your vendor>"
    password: "<token from your vendor>"
    secrets:
    sharedKey: "$(openssl rand -hex 24)"
    backendClientId: nw-backend
    backendClientSecret: "$(openssl rand -hex 24)"
    rabbitmq:
    url: "amqp://lab:lab-only-rabbit@rabbitmq.datastores.svc.cluster.local:5672/nw"
    vhostManagement:
    credentials: "lab:lab-only-rabbit"
    redis:
    password: "lab-only-redis"
    identity:
    config:
    expressSessionKey: "$(openssl rand -hex 32)"
    totpEncryptionKey: "$(openssl rand -hex 32)"
    recoveryCodePepper: "$(openssl rand -hex 32)"
    data:
    config:
    fieldEncryptionMasterKey: "$(openssl rand -hex 32)"
    altcha:
    config:
    altchaHMACKey: "$(openssl rand -hex 32)"
    EOF
  3. Copy nw-secrets.yaml and pack-values.yaml into your password manager now. The field-encryption key in particular has no other copy.

  4. Lint, then render:

    Terminal window
    values="-f nw-values.yaml -f nw-secrets.yaml -f pack-values.yaml"
    helm lint ./osos $values
    helm template nw ./osos -n northwind $values > rendered.yaml && echo RENDER-OK
  5. Confirm the field-encryption key went into a Secret and not a ConfigMap: grep -n "FIELD_ENCRYPTION_MASTER_KEY" rendered.yaml and read the kind: above each hit.

  6. Confirm the committed file holds no secret: grep -n -i -E "password|secret|key:" nw-values.yaml. Only clientId lines and comments may appear.

Check.

  • helm lint reports 0 chart(s) failed.
  • The render prints RENDER-OK.
  • Every FIELD_ENCRYPTION_MASTER_KEY hit sits in a kind: Secret.
  • nw-values.yaml contains no password, token or key.
  • nw-secrets.yaml and pack-values.yaml are listed in .gitignore and saved in your password manager.
  • The super-administrator email is at northwind.example.com, not a vendor address.

Pass condition. All six checks hold. These three files are what you install from in M2-S2.

If something goes wrong

What you seeWhat to do
... is required or should be providedA render-time value is missing. The message names it; check its spelling and indentation against step 1 or 2.
A YAML error with a line numberUsually indentation. Two spaces per level, no tabs.
helm lint warns about an icon or missing Chart.yaml fieldsWarnings about the chart itself are not yours to fix; only [ERROR] lines matter.
FIELD_ENCRYPTION_MASTER_KEY also appears in a ConfigMapReport it to your vendor; never work around it by editing rendered files.
openssl is not foundInstall it (it ships with Git for Windows, macOS and most Linux distributions), or generate the keys in your password manager as 64 hexadecimal characters.
Model answer

A clean result looks like this:

  • helm lint ends with 1 chart(s) linted, 0 chart(s) failed.
  • RENDER-OK is printed and rendered.yaml is several thousand lines long.
  • FIELD_ENCRYPTION_MASTER_KEY appears in the identity and data Secrets: both need it, because the identity server stores its own keys encrypted with the same root key.
  • The grep of nw-values.yaml shows only clientId: nw-web and the comment lines.

Why the split matters: nw-values.yaml can now be reviewed, diffed and committed like code, and the two secret files can be replaced by your secret manager in production without touching it.

⛏ Lab (10 min) — Render-time or runtime?

Section titled “⛏ Lab (10 min) — Render-time or runtime?”

Goal. See the chart’s guards fire, and recognize the mistake that slips through.

Before you start. Lab A passed. values is still set in your shell.

Run each command, read the result, and write in inventory.md whether the chart caught it.

  1. helm template nw ./osos $values --set secrets.sharedKey= > /dev/null
  2. helm template nw ./osos $values --set core.mongoUrlTemplate="mongodb://mongo-0.mongo.datastores.svc.cluster.local:27017/nw-data" > /dev/null
  3. helm template nw ./osos $values --set core.enabled=false > /dev/null
  4. helm template nw ./osos $values --set identity.config.recoveryCodePepper= > /dev/null && echo render-ok
  5. For case 4, write what would happen after an install, and who would notice first.

Check.

  • Cases 1 to 3 stop with a message, and you copied each message.
  • Case 4 prints render-ok.
  • Your note on case 4 names the symptom (a recovery code fails) and that it appears only when someone uses one.

Pass condition. You classified all four correctly: three render-time, one runtime.

If something goes wrong

What you seeWhat to do
Case 1 rendersYour shell may have quoted the empty value away. Use --set "secrets.sharedKey=".
Case 4 also failsCheck the rest of the command: it must differ from Lab A only by the --set.
Model answer
CaseCaught at render?What you see
1 Empty shared keyYesA valid shared key should be provided.
2 Template without {db}YesThe render stops, naming core.mongoUrlTemplate and the missing {db}
3 core.enabled=falseYesRefused: the combined pods are the only way the twelve applications run
4 Empty recovery-code pepperNoRenders and installs. The first person who signs in with a two-factor recovery code is refused, and the identity server logs that the pepper is required.

The lesson: a clean render proves the chart’s guards passed, not that the release works. M2-S2 adds the second half, the smoke test.

✓ Practice (6 min) — Check your understanding

Section titled “✓ Practice (6 min) — Check your understanding”
PracticeChoose one answer.

A teammate edits a ConfigMap of the release with kubectl edit to raise a log level. An hour later the change has had no effect, and after the next upgrade it is gone. What should they have done?

  1. Explanation for A

    ✗ Incorrect

    Not this one: pods read Secrets at start too, and Helm overwrites hand edits to them as well. See Where a value goes.

  2. Explanation for B

    ✓ Correct

    Correct: the values files are the only source of truth; the upgrade re-renders the ConfigMap and the checksum rolls the pods. See Where a value goes.

  3. Explanation for C

    ✗ Incorrect

    Not this one: it would work until someone forgets, and the release would no longer match its values. See Where a value goes.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

PracticeChoose one answer.

helm install succeeds and every pod is ready. A week later, encrypted fields show errors after an operator “tidied up” data.config.fieldEncryptionMasterKey to a new value. What is the way back?

  1. Explanation for A

    ✗ Incorrect

    Not this one: the stored data key can only be unwrapped by the key that wrapped it; nothing re-encrypts it from the new one. See Values you set once.

  2. Explanation for B

    ✓ Correct

    Correct: only the original value can read the data again, which is why you saved it outside the cluster. See Values you set once.

  3. Explanation for C

    ✗ Incorrect

    Not this one: the data is intact; it is the key that is wrong. A restore would lose a day of work and still not read with the new key. See Values you set once.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

PracticeChoose one answer.

Which of these mistakes does helm template catch?

  1. Explanation for A

    ✗ Incorrect

    Not this one: the chart cannot know your server’s password; pods fail to connect at runtime. See What only fails once pods start.

  2. Explanation for B

    ✗ Incorrect

    Not this one: it renders, and the application quietly connects to an empty database. See What only fails once pods start.

  3. Explanation for C

    ✓ Correct

    Correct: the chart refuses to render without it. See What the chart refuses to render.

Check your answer

The correct answer is C. Open the explanation under each option to see why.

PracticeChoose one answer.

After an install, the portal shows an error page with a Retry button instead of the sign-in page. The private key lives in your own Secret, and pack-values.yaml was copied from an old email. What do you do?

  1. Explanation for A

    ✗ Incorrect

    Not this one: you never edit the vendor’s values; you supply them exactly as given. See Three files, one release.

  2. Explanation for B

    ✓ Correct

    Correct: supplying the vendor’s values is your whole part, and the gateway only reads a changed Secret when it restarts. See the job aid.

  3. Explanation for C

    ✗ Incorrect

    Not this one: the gateway uses the license, so the identity server’s restart changes nothing. See Three files, one release.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

PracticeChoose one answer.

Your platform team deploys with Argo CD, which renders charts with helm template. Which values must they set explicitly that a plain helm install would have generated?

  1. Explanation for A

    ✗ Incorrect

    Not this one: those are required either way; the chart never generates them. See What the chart refuses to render.

  2. Explanation for B

    ✓ Correct

    Correct: left empty they are generated once and kept, which a render-only tool cannot do, so every render would invent new ones. See Values you set once.

  3. Explanation for C

    ✗ Incorrect

    Not this one: the chart never generates it; it is required for every install. See Values you set once.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

↺ Recap (1 min) — Values you can trust

Section titled “↺ Recap (1 min) — Values you can trust”

You have three values files that render cleanly, with nothing secret in the one you commit, and you know which mistakes the chart catches and which ones wait for your users.

Next. In M2-S2 you install from them, watch Helm’s hooks run in order, and prove the release works with a smoke test that ends with the operator signed in to Administration.