feat: rename configmap to config and add binary value support#377
Open
feat: rename configmap to config and add binary value support#377
Conversation
Rename the internal configmap package/schema/resolvers to config, since configmap is a Kubernetes implementation detail. Add encoding field to ConfigValue and ConfigValueInput to support binary data (BASE64), mirroring the existing secret binary value support. Key changes: - Rename internal/workload/configmap/ -> internal/workload/config/ - Rename schema/configmap.graphqls -> config.graphqls - Rename graph/configmap.resolvers.go -> config.resolvers.go - Add encoding: ValueEncoding! to ConfigValue type - Add encoding: ValueEncoding = PLAIN_TEXT to ConfigValueInput - Add encode/decode helpers for binary config values - Update all CRUD operations to handle binary encoding - Store binary values as base64 in ConfigMap data field - Track binary keys via nais.io/binary-keys annotation
thokra-nav
approved these changes
Mar 27, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
configmapreferences toconfig(package, schema, resolvers, watchers) since "configmap" is a Kubernetes implementation detailencoding: ValueEncoding!toConfigValueandencoding: ValueEncoding = PLAIN_TEXTtoConfigValueInputfor binary data supportDetails
Rename scope:
internal/workload/configmap/→internal/workload/config/internal/graph/schema/configmap.graphqls→config.graphqlsinternal/graph/configmap.resolvers.go→config.resolvers.goConfigMapWatcher→ConfigWatcherin watchers and http.goBinary value support:
datafield (unlike secrets where K8s handles base64 natively)nais.io/binary-keysannotation (comma-separated)utf8.Valid()heuristicencodeValueForStorage()/decodeValueFromStorage()helpersCompanion CLI PR: https://github.com/nais/cli/pull/new/binary-config-values