-
Notifications
You must be signed in to change notification settings - Fork 30
managing osmo configs with k8s configmap #822
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
Open
vvnpn-nv
wants to merge
24
commits into
main
Choose a base branch
from
vpan/configs-to-k8s-configmap
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 14 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
48a9a5d
feat: add ConfigMap-sourced dynamic configuration loader
vvnpn-nv fe33738
fix: address bugs and code quality issues in configmap_loader
vvnpn-nv ec56c17
test: add comprehensive tests for ConfigMap config loader
vvnpn-nv 67ce147
fix: address review findings, add config watcher, fix test failures
vvnpn-nv 2ddcda3
simplify: consolidate singleton config functions, fix advisory lock
vvnpn-nv 71bb8a6
feat: add drift reconciliation for configmap-mode configs
vvnpn-nv d0db789
feat: add UX improvements — managed_by visibility, immediate re-apply…
vvnpn-nv 7c8d00f
feat: reject CLI writes to configmap-managed configs with 409 Conflict
vvnpn-nv 1a9c887
refactor: extract configmap_guard module, fix circular import, cover …
vvnpn-nv 230f8b3
chore: remove debug print, dead code, stale comment
vvnpn-nv e493ec7
fix: rollback guard referenced removed configmap_loader.reject_if_man…
vvnpn-nv 975635e
docs: add design doc for ConfigMap-sourced dynamic configuration
vvnpn-nv b2f0cee
fix: guard watcher startup to avoid service boot abort
vvnpn-nv 452c4bb
feat: extend secret file references to all config credential fields
vvnpn-nv 42a2253
feat: auto-detect Docker registry .dockerconfigjson secret format
vvnpn-nv a11c049
refactor: redesign ConfigMap config to in-memory + watchdog + global …
vvnpn-nv 25dcec2
docs: rewrite design doc for v2 architecture
vvnpn-nv 2890e97
feat: authz_sidecar reads roles from ConfigMap file instead of DB
vvnpn-nv fa3705b
feat: authz_sidecar uses --roles-file when dynamicConfig enabled
vvnpn-nv 5f98c4b
feat: move product defaults to chart values, auto-derive service_base…
vvnpn-nv bc5bd00
feat: add default backend and pool to chart defaults
vvnpn-nv 670fb18
docs: update design doc for v3 — authz file-backed, chart defaults
vvnpn-nv c0caafe
refactor: eliminate remaining DB deps in ConfigMap mode
vvnpn-nv 321ddae
chore: fix medium review findings — remove stale docs and dead code
vvnpn-nv 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
30 changes: 30 additions & 0 deletions
30
deployments/charts/service/templates/dynamic-config-secrets.yaml
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 |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| {{- if and .Values.services.dynamicConfig.enabled .Values.services.dynamicConfig.secrets }} | ||
| {{- range $name, $data := .Values.services.dynamicConfig.secrets }} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: {{ $.Values.services.service.serviceName }}-dynamic-secret-{{ $name }} | ||
| labels: | ||
| app: {{ $.Values.services.service.serviceName }} | ||
| type: Opaque | ||
| stringData: | ||
| {{ $name }}.yaml: | | ||
| {{- toYaml $data | nindent 4 }} | ||
| {{- 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| {{- if .Values.services.dynamicConfig.enabled }} | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: {{ .Values.services.service.serviceName }}-dynamic-config | ||
| labels: | ||
| app: {{ .Values.services.service.serviceName }} | ||
| data: | ||
| config.yaml: | | ||
| managed_configs: | ||
| {{- $dc := .Values.services.dynamicConfig }} | ||
| {{- if $dc.service }} | ||
| service: | ||
| {{- $service := deepCopy $dc.service }} | ||
| {{- if $service.config }} | ||
| {{- include "osmo.resolve-secret-names-in-config" $service.config }} | ||
| {{- end }} | ||
| {{- toYaml $service | nindent 8 }} | ||
| {{- end }} | ||
| {{- if $dc.workflow }} | ||
| workflow: | ||
| {{- $workflow := deepCopy $dc.workflow }} | ||
| {{- if $workflow.config }} | ||
| {{- include "osmo.resolve-secret-names-in-config" $workflow.config }} | ||
| {{- end }} | ||
| {{- toYaml $workflow | nindent 8 }} | ||
| {{- end }} | ||
| {{- if $dc.dataset }} | ||
| dataset: | ||
| {{- $dataset := deepCopy $dc.dataset }} | ||
| {{- if $dataset.config }} | ||
| {{- range $bucketName, $bucketConfig := $dataset.config.buckets }} | ||
| {{- if and (kindIs "map" $bucketConfig) $bucketConfig.default_credential }} | ||
| {{- if $bucketConfig.default_credential.credentialSecretName }} | ||
| {{- $secretName := $bucketConfig.default_credential.credentialSecretName }} | ||
| {{- $_ := set $bucketConfig.default_credential "secret_file" (printf "/etc/osmo/secrets/%s/cred.yaml" $secretName) }} | ||
| {{- $_ := unset $bucketConfig.default_credential "credentialSecretName" }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- toYaml $dataset | nindent 8 }} | ||
| {{- end }} | ||
| {{- if $dc.pools }} | ||
| pools: | ||
| {{- toYaml $dc.pools | nindent 8 }} | ||
| {{- end }} | ||
| {{- if $dc.podTemplates }} | ||
| pod_templates: | ||
| {{- toYaml $dc.podTemplates | nindent 8 }} | ||
| {{- end }} | ||
| {{- if $dc.resourceValidations }} | ||
| resource_validations: | ||
| {{- toYaml $dc.resourceValidations | nindent 8 }} | ||
| {{- end }} | ||
| {{- if $dc.backends }} | ||
| backends: | ||
| {{- toYaml $dc.backends | nindent 8 }} | ||
| {{- end }} | ||
| {{- if $dc.backendTests }} | ||
| backend_tests: | ||
| {{- toYaml $dc.backendTests | nindent 8 }} | ||
| {{- end }} | ||
| {{- if $dc.groupTemplates }} | ||
| group_templates: | ||
| {{- toYaml $dc.groupTemplates | nindent 8 }} | ||
| {{- end }} | ||
| {{- if $dc.roles }} | ||
| roles: | ||
| {{- toYaml $dc.roles | nindent 8 }} | ||
| {{- end }} | ||
| {{- end }} |
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.
Map-only traversal misses valid
secretNamelocations.These helpers stop after four map levels and never descend into lists. A
secretNameunder something likefoo[0].credentialsor any fifth-level object will be skipped, so the rendered config keeps the unresolved reference and the later secret-mount generation never sees that Secret name. That breaks the PR’s “any nesting level” contract.🤖 Prompt for AI Agents