Documentation
¶
Overview ¶
Package api resolves the platform ClusterSecretStore name from the environment contract's secretStore provider declaration.
Keys are platform constants — they never change regardless of provider. Only the ClusterSecretStore name changes. All composed CR secret reconcilers accept the store name as an injected parameter.
Package api — secretstore.go provisions the ESO ClusterSecretStore or SecretStore backing an Environment's declared secretStore.provider.
One reconciler, dispatched by provider string — vault.go/aws.go/azure.go/ gcp.go each contribute only the provider-specific spec.provider.<x> block; the Get/apply/owner-ref orchestration below is identical across providers.
This reconciler owns the store *pointer* only. Secret values are populated into the backend by a separate, out-of-band process; nothing here reads or writes secret contents.
Index ¶
Constants ¶
const ( // StoreAWS is the ClusterSecretStore name for AWS Secrets Manager via ESO. StoreAWS = "blanketops-environments-aws" // StoreVault is the ClusterSecretStore name for HashiCorp Vault via ESO. StoreVault = "blanketops-environments-vault" // StoreGCP is the ClusterSecretStore name for GCP Secret Manager via ESO. StoreGCP = "blanketops-environments-gcp" // StoreAzure is the ClusterSecretStore name for Azure Key Vault via ESO. StoreAzure = "blanketops-environments-azure" // StoreFake is the ClusterSecretStore name for the local kind fake store. StoreFake = "blanketops-environments-fake" )
Variables ¶
This section is empty.
Functions ¶
func ResolveStoreName ¶
ResolveStoreName maps the secretStore.provider string from the environment contract to the corresponding ClusterSecretStore name. Unknown or empty provider falls back to the fake store — safe for local kind cluster development. Must not be used in production without a valid provider declared on the Environment CR.
Types ¶
type SecretStoreReconciler ¶
SecretStoreReconciler converges the ESO ClusterSecretStore/SecretStore for an Environment's declared secretStore.provider to its current desired state.
func NewSecretStoreReconciler ¶
func NewSecretStoreReconciler(c client.Client, log logr.Logger) *SecretStoreReconciler
NewSecretStoreReconciler constructs a SecretStoreReconciler.
func (*SecretStoreReconciler) Reconcile ¶
func (r *SecretStoreReconciler) Reconcile(ctx context.Context, resolved *environmentresolve.ResolvedEnvironment, storeKind string) error
Reconcile applies the ClusterSecretStore/SecretStore for the given resolved Environment's declared provider.
Unlike the composed-CR secret reconcilers under pkg/secrets (which create once and never revisit an existing object), this always server-side-applies the desired spec — matching the convergence pattern used for actual workload resources (see pkg/apis/deployment/api.K8SProvider.applyDeployment/applyService). The store's connection config is expected to track whatever the Environment currently declares, and the core CQRS engine (core/command) already gates *when* this is invoked via each Domain's CanUpdate predicate — so by the time Reconcile runs, the caller has already decided the change is worth applying. This reconciler's job is only to converge, not to second-guess that decision by silently ignoring an existing store.
storeKind must be StoreKindClusterSecretStore ("ClusterSecretStore") or StoreKindSecretStore ("SecretStore") — see pkg/apis/environment/query. ClusterSecretStore is cluster-scoped, so no owner reference is set on it (Kubernetes forbids a namespaced owner for a cluster-scoped object); SecretStore is namespaced to the Environment and owned by it.
A provider without a builder yet (aws, azure, gcp — stubs pending their own ResolvedXConfig in resolution/environment/resolve) returns an error rather than applying an incomplete store.