Skip to content

init-secrets job #142

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

Merged
merged 28 commits into from
Feb 5, 2025
Merged

init-secrets job #142

merged 28 commits into from
Feb 5, 2025

Conversation

gaelgatelement
Copy link
Member

@gaelgatelement gaelgatelement commented Jan 30, 2025

This job is dedicated to initializing secrets when they are missing from the chart.

The job is enabled by default. It makes some secrets optional as they are going to be handled automatically during initial chart setup.

So far this PR makes the following secret optional :

  • synapse.macaroon

The PR adds 2 new helpers to include secrets in matrix-tools init containers.

@gaelgatelement gaelgatelement requested a review from a team as a code owner January 30, 2025 16:40
Copy link
Member

@benbz benbz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good and matches what I had in mind.

I think I'd like initSecrets.enabled: true (or omitted as the default) on the <component>-minimal-values.yaml as those are our examples of what is minimally required. I imagine there's issues with the manifest tests though?

@gaelgatelement gaelgatelement force-pushed the gaelg/matrix-tools-write-secret branch from 7614e69 to 2dbe596 Compare January 31, 2025 11:37
@gaelgatelement gaelgatelement changed the title Draft : init-secrets job init-secrets job Jan 31, 2025
@gaelgatelement gaelgatelement force-pushed the gaelg/matrix-tools-write-secret branch 7 times, most recently from 042bdd5 to f520581 Compare January 31, 2025 14:18
@gaelgatelement gaelgatelement force-pushed the gaelg/matrix-tools-write-secret branch from f520581 to 3a5aec6 Compare January 31, 2025 14:24
@gaelgatelement gaelgatelement force-pushed the gaelg/matrix-tools-write-secret branch 8 times, most recently from e0a1c43 to 409294f Compare February 4, 2025 14:42
- Add secret labels parameter to GenerateSecret function
- Update secret creation and update logic to use new parameter
- Validate if secret is managed by matrix-tools-init-secrets before updating
- Adjust test cases to reflect new functionality
- Refactor test case structure for clarity
- Validate secrets with new rules
- Update job to pass generated secrets as labels
- Modify service account conditionally based on secret generation
- Simplify secret path resolution templates
- Ensure consistent secret property checks across components
- Clarify required context properties in credentials template
- Ensure init secrets are included when initSecrets enabled
- Correctly reference postgres password secret property
- Remove unnecessary job from service account test case
- Simplify synapse statefulset init container configuration
@gaelgatelement gaelgatelement force-pushed the gaelg/matrix-tools-write-secret branch 5 times, most recently from b351657 to 8722622 Compare February 5, 2025 09:40
@gaelgatelement gaelgatelement force-pushed the gaelg/matrix-tools-write-secret branch from 8722622 to 960e15a Compare February 5, 2025 09:53
@gaelgatelement gaelgatelement merged commit 52ba97c into main Feb 5, 2025
12 of 13 checks passed
@gaelgatelement gaelgatelement deleted the gaelg/matrix-tools-write-secret branch February 5, 2025 09:59
Comment on lines +7 to +11
matrixTools:
image:
pullPolicy: Never
digest: ""

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed in the EW integration test values?

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