Page MenuHomePhabricator

[cookbooks.wmcs.toolforge.component.deploy] Add secrets support when deploying
Closed, ResolvedPublic

Description

Currently the wmcs.toolforge.component.deploy just runs deploy.sh script from the git url passed, that does not allow us to inject somehow secrets to the deployed k8s elements.

Some examples of secrets we currently need:

  • User/pass of the account to push images to harbor (for the toolforge build service)
  • (add more if you find more)

This task is to brainstorm ways on how to get those secrets there, will create a decision task once we have a few ideas (and no clear consensus arises here first).

Feel free to add comment/change the task to add ideas etc.

Puppet + helmfile

One way is to use the current puppet private repo to store the secrets as hiera values, then have a puppet module that creates a values.yaml file that helmfile would include when generating the k8s objects (exact process to be investigated/defined).

K8s manually entered secrets

We could use k8s secrets for it, and manually create and maintain them.

Helm-secrets

Commit encrypted secret files to the Git repositories and provision decryption keys to the control nodes via Puppet. Helmfile supports integration with the helm-secrets plugin.

Add more ideas here

Details

TitleReferenceAuthorSource BranchDest Branch
[builds-api]: add protocol to harborRepository urlrepos/cloud/toolforge/toolforge-deploy!72raymond-ndibeadd_protocol_to_harbor_repository_urlmain
builds-api: add harbor user and passwordrepos/cloud/toolforge/toolforge-deploy!69dcarobuilds_api_add_secretsmain
Customize query in GitLab

Event Timeline

I think the first option puppet+helmfile may be what the other SREs are using. But I may be wrong, I didn't check or confirmed in any way.

Change 948566 had a related patch set uploaded (by David Caro; author: David Caro):

[operations/puppet@production] toolforge: add deployer module with the secrets

https://gerrit.wikimedia.org/r/948566

Change 948566 merged by David Caro:

[operations/puppet@production] toolforge: add deployer module with the secrets

https://gerrit.wikimedia.org/r/948566