-
Notifications
You must be signed in to change notification settings - Fork 2
feat: ingress configurations + external secrets #35
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
jsbroks
merged 7 commits into
ctrlplanedev:main
from
zachspar:spar/feat/ingress-and-secrets
Feb 17, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e457d21
feat: ingress configurations + external secrets
zachspar 41c265f
chore: bump minor version
zachspar 50fcedd
Merge branch 'main' into spar/feat/ingress-and-secrets
zachspar f6332ba
chore: align with patterns + incorporate suggestions
zachspar 0c5828f
chore: add ingress + secret unit tests
zachspar 8634d74
chore: apply suggestions from code review
zachspar 03c6298
Merge branch 'main' into spar/feat/ingress-and-secrets
zachspar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,16 @@ | ||
| {{- $secretName := (include "api.fullname" .) }} | ||
| {{- $secret := (lookup "v1" "Secret" .Release.Namespace $secretName) }} | ||
| {{- if not (include "ctrlplane.isValueFrom" .Values.global.secrets.authSecret) }} | ||
| {{- $secretName := (include "api.fullname" .) }} | ||
| {{- $existing := (lookup "v1" "Secret" .Release.Namespace $secretName) }} | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: {{ $secretName }} | ||
| labels: | ||
| {{- include "api.labels" . | nindent 4 }} | ||
| data: | ||
| {{- if $secret }} | ||
| AUTH_SECRET: {{ $secret.data.AUTH_SECRET }} | ||
| {{- if and $existing (hasKey $existing.data "AUTH_SECRET") }} | ||
| AUTH_SECRET: {{ index $existing.data "AUTH_SECRET" }} | ||
| {{- else }} | ||
| AUTH_SECRET: {{ randAlphaNum 64 | b64enc }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,16 @@ | ||
| {{- $secretName := (include "web.fullname" .) }} | ||
| {{- $secret := (lookup "v1" "Secret" .Release.Namespace $secretName) }} | ||
| {{- if not (include "ctrlplane.isValueFrom" .Values.global.secrets.authSecret) }} | ||
| {{- $secretName := (include "web.fullname" .) }} | ||
| {{- $existing := (lookup "v1" "Secret" .Release.Namespace $secretName) }} | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: {{ $secretName }} | ||
| labels: | ||
| {{- include "web.labels" . | nindent 4 }} | ||
| data: | ||
| {{- if $secret }} | ||
| AUTH_SECRET: {{ $secret.data.AUTH_SECRET }} | ||
| {{- if and $existing (hasKey $existing.data "AUTH_SECRET") }} | ||
| AUTH_SECRET: {{ index $existing.data "AUTH_SECRET" }} | ||
| {{- else }} | ||
| AUTH_SECRET: {{ randAlphaNum 64 | b64enc }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secret reuse and generation logic is correct; minor style inconsistency with
| quote.index $existing.data "AUTH_SECRET"correctly returns the already-base64-encoded value from the live Secret, safe to assign directly todata:. The short-circuitandsafely handles thenilcase whenlookupreturns nothing (e.g., first install or--dry-run).Minor:
{{ randAlphaNum 64 | b64enc }}(line 14) omits| quote, whilecharts/ctrlplane/templates/secrets.yamluses{{ randAlphaNum 64 | b64enc | quote }}. Both produce valid YAML since base64 is YAML-safe, but aligning would improve consistency.🤖 Prompt for AI Agents