feat(config): add named config instances API #261
Open
johnride
wants to merge 1 commits from
feat/named-config-instances into master
pull from: feat/named-config-instances
merge into: NationTech:master
NationTech:master
NationTech:feat/iot-walking-skeleton
NationTech:feat/disableDadScore
NationTech:feat/removesideeffect
NationTech:feat/test-alert-receivers-sttest
NationTech:feat/brocade-client-add-vlans
NationTech:feat/agent-desired-state
NationTech:feat/opnsense-dns-implementation
NationTech:worktree-bridge-cse_012j1jB37XfjXvDGHUjHrKSj
NationTech:chore/leftover-adr
NationTech:feat/config_e2e_zitadel_openbao
NationTech:example/vllm
NationTech:feat/config_sqlite
NationTech:chore/roadmap
NationTech:feature/kvm-module
NationTech:feat/rustfs
NationTech:feat/harmony_assets
NationTech:feat/brocade_assisted_setup
NationTech:feat/cluster_alerting_score
NationTech:e2e-tests-multicluster
NationTech:fix/refactor_alert_receivers
NationTech:feat/change-node-readiness-strategy
NationTech:feat/zitadel
NationTech:feat/improve-inventory-discovery
NationTech:fix/monitoring_abstractions_openshift
NationTech:feat/nats-jetstream
NationTech:adr-nats-creds
NationTech:feat/st_test
NationTech:feat/dockerAutoinstall
NationTech:chore/cleanup_hacluster
NationTech:doc/cert-management
NationTech:feat/certificate_management
NationTech:adr/017-staleness-failover
NationTech:fix/nats_non_root
NationTech:feat/rebuild_inventory
NationTech:fix/opnsense_update
NationTech:feat/unshedulable_control_planes
NationTech:feat/worker_okd_install
NationTech:doc-and-braindump
NationTech:fix/pxe_install
NationTech:switch-client
NationTech:okd_enable_user_workload_monitoring
NationTech:configure-switch
NationTech:fix/clippy
NationTech:feat/gen-ca-cert
NationTech:feat/okd_default_ingress_class
NationTech:fix/add_routes_to_domain
NationTech:secrets-prompt-editor
NationTech:feat/multisiteApplication
NationTech:feat/ceph-install-score
NationTech:feat/ceph-osd-score
NationTech:feat/ceph_validate_health
NationTech:better-indicatif-progress-grouped
NationTech:feat/crd-alertmanager-configs
NationTech:better-cli
NationTech:opnsense_upgrade
NationTech:feat/monitoring-application-feature
NationTech:dev/postgres
NationTech:feat/cd/localdeploymentdemo
NationTech:feat/webhook_receiver
NationTech:feat/kube-prometheus
NationTech:feat/init_k8s_tenant
NationTech:feat/discord-webhook-receiver
NationTech:feat/kube-prometheus-monitor
NationTech:feat/tenantScore
NationTech:feat/teams-integration
NationTech:feat/slack-notifs
NationTech:monitoring
NationTech:runtime-profiles
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "feat/named-config-instances"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds get_named/set_named/get_or_prompt_named to ConfigManager so
multiple instances of the same config type can coexist (e.g., separate
API credentials for primary and backup of a firewall pair).
Key format: {T::KEY}/{instance_name}. EnvSource maps slashes and
hyphens to underscores so the env var name remains valid (e.g.,
HARMONY_CONFIG_TestConfig_fw_primary). LocalFileSource creates
parent directories for nested keys.
The firewall_pair.rs TODO comment is updated to reference the new
API; the actual migration is deferred until Config is implemented
on the credential types.
Adds get_named/set_named/get_or_prompt_named to ConfigManager so multiple instances of the same config type can coexist (e.g., separate API credentials for primary and backup of a firewall pair). Key format: {T::KEY}/{instance_name}. EnvSource maps slashes and hyphens to underscores so the env var name remains valid (e.g., HARMONY_CONFIG_TestConfig_fw_primary). LocalFileSource creates parent directories for nested keys. The firewall_pair.rs TODO comment is updated to reference the new API; the actual migration is deferred until Config is implemented on the credential types.I think this should converge to a single opinionated way, either we are named or we're not. I think named only would be better, but the name should be a strong type that restricts the name to only acceptable values (alphanumeric 1-100 characters maybe?) . I don`t think it's complicated at all, actually very simple, but has to be robust. Maybe we could treat the no-name variant as the default?
It would be practical but we need to keep in mind that it has to be obvious when debugging where the value comes from exactly. this can get messy fast with overrides and defaults everywhere.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.