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

Mount helm login secret in arbitrary location to prevent conflict with default helm behaviour #1049

Merged
merged 9 commits into from
Dec 4, 2024

Conversation

rain-on
Copy link
Contributor

@rain-on rain-on commented Dec 2, 2024

Background

The agent upgrade credentials secret is mounted directly into /root/.config/helm/registry/config.json.

This makes the container directory READ ONLY.

Thus - if a job attempts to manually perform a "helm registry login" - it fails, as the config.json file is also readonly (regardless of if the secret is defined or not).

This change mounts the secret in an arbitrary location (/root/agent_upgrade/config.json), such that default helm operations continue to operate as expected.

For tasks to use the mounted secret, they are expected to export "HELM_REGISTRY_CONFIG=/root/agent_upgrade/config.json" prior to making a helm call.

Results

Fixes https://github.com/OctopusDeploy/Issues/issues/... (optional public issue)

Fixes https://github.com/OctopusDeploy/ResearchAndDevelopment/issues/... (optional private issue)

See How we use GitHub Issues (including this flowchart

How to review this PR

Quality ✔️

Pre-requisites

  • I have read How we use GitHub Issues for help deciding when and where it's appropriate to make an issue.
  • I have considered informing or consulting the right people, according to the ownership map.
  • I have considered appropriate testing for my change.

@rain-on rain-on changed the title Helm Login file to be copied into position, not mounted there Mount helm login secret in arbitrary location to prevent conflict with default helm behaviour Dec 4, 2024
@rain-on rain-on marked this pull request as ready for review December 4, 2024 00:49
@rain-on rain-on requested a review from a team as a code owner December 4, 2024 00:49
@rain-on rain-on merged commit 6cecead into main Dec 4, 2024
52 of 53 checks passed
@rain-on rain-on deleted the tmm/init_container branch December 4, 2024 03:58
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