Documentation
¶
Overview ¶
Package resources provides resource factories for the extraction-and-guards example.
Index ¶
- func BaseConfigMap(owner *app.ExampleApp) *corev1.ConfigMap
- func BaseSecret(owner *app.ExampleApp) *corev1.Secret
- func NewConfigMapResource(owner *app.ExampleApp, dbHost *concepts.Data[string]) (component.Resource, error)
- func NewSecretResource(owner *app.ExampleApp, dbHost *concepts.Data[string]) (component.Resource, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseConfigMap ¶
func BaseConfigMap(owner *app.ExampleApp) *corev1.ConfigMap
BaseConfigMap returns the desired-state ConfigMap representing database connection config.
func BaseSecret ¶
func BaseSecret(owner *app.ExampleApp) *corev1.Secret
BaseSecret returns the desired-state Secret representing database credentials.
func NewConfigMapResource ¶
func NewConfigMapResource(owner *app.ExampleApp, dbHost *concepts.Data[string]) (component.Resource, error)
NewConfigMapResource constructs a ConfigMap for database config. The declared extraction captures the db-host value into the provided cell so downstream resources can guard on it and read it.
func NewSecretResource ¶
func NewSecretResource(owner *app.ExampleApp, dbHost *concepts.Data[string]) (component.Resource, error)
NewSecretResource constructs a Secret for database credentials. A declared data guard blocks it until the db-host cell has been extracted from the preceding ConfigMap, and a mutation copies the extracted host into the Secret so the credentials and endpoint travel together.
Types ¶
This section is empty.