From 689af8d25296f8deaff354fbf17e89d007452ec7 Mon Sep 17 00:00:00 2001 From: Tiago de Freitas Lima Date: Thu, 25 Apr 2024 11:30:08 -0300 Subject: [PATCH] Fixing some descriptions on CRD config fields --- deploy/crds/pulumi.com_stacks.yaml | 68 +++++++++++++-------------- docs/stacks.md | 52 ++++++++++---------- pkg/apis/pulumi/shared/stack_types.go | 10 ++-- 3 files changed, 66 insertions(+), 64 deletions(-) diff --git a/deploy/crds/pulumi.com_stacks.yaml b/deploy/crds/pulumi.com_stacks.yaml index 13d116e9..a447d498 100644 --- a/deploy/crds/pulumi.com_stacks.yaml +++ b/deploy/crds/pulumi.com_stacks.yaml @@ -84,11 +84,13 @@ spec: additionalProperties: description: ConfigRef identifies a resource from which config information can be loaded. Environment variables, files on the filesystem, - Kubernetes Secrets, ConfigMap, structured and config literal values - strings are currently supported. + Kubernetes Secrets, ConfigMaps, structured and config literal + values strings are currently supported. properties: configmap: - description: ConfigMapRef refers to a Kubernetes ConfigMap + description: ConfigMapRef refers to a Kubernetes ConfigMap It + will be assumed the ConfigMap key content is the stack config + in YAML format. properties: key: description: Key within the ConfigMap to use. @@ -154,7 +156,8 @@ spec: - name type: object structured: - description: StructuredRef refers to a structured value + description: StructuredRef refers to a structured value in YAML + format. properties: value: description: Value to load @@ -171,8 +174,10 @@ spec: - type type: object description: (optional) ConfigRefs is the configuration for this stack, - which can be specified through ConfigRef. is omitted, configuration + which can be specified through ConfigRef. If this is omitted, configuration is assumed to be checked in and taken from the source repository. + If present, ConfigRefs values will be merged with values passed + through Config type: object continueResyncOnCommitMatch: description: (optional) ContinueResyncOnCommitMatch - when true - @@ -244,7 +249,7 @@ spec: type: object type: description: 'SelectorType is required and signifies the type - of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal' + of selector. Must be one of: Env, FS, Secret, Literal' type: string required: - type @@ -363,8 +368,7 @@ spec: type: object type: description: 'SelectorType is required and signifies the type - of selector. Must be one of: Env, FS, Secret, ConfigMap, - Literal' + of selector. Must be one of: Env, FS, Secret, Literal' type: string required: - type @@ -431,8 +435,7 @@ spec: type: object type: description: 'SelectorType is required and signifies the - type of selector. Must be one of: Env, FS, Secret, ConfigMap, - Literal' + type of selector. Must be one of: Env, FS, Secret, Literal' type: string required: - type @@ -494,8 +497,7 @@ spec: type: object type: description: 'SelectorType is required and signifies the - type of selector. Must be one of: Env, FS, Secret, ConfigMap, - Literal' + type of selector. Must be one of: Env, FS, Secret, Literal' type: string required: - type @@ -565,8 +567,7 @@ spec: type: object type: description: 'SelectorType is required and signifies the - type of selector. Must be one of: Env, FS, Secret, ConfigMap, - Literal' + type of selector. Must be one of: Env, FS, Secret, Literal' type: string required: - type @@ -628,8 +629,7 @@ spec: type: object type: description: 'SelectorType is required and signifies the - type of selector. Must be one of: Env, FS, Secret, ConfigMap, - Literal' + type of selector. Must be one of: Env, FS, Secret, Literal' type: string required: - type @@ -790,7 +790,7 @@ spec: type: object type: description: 'SelectorType is required and signifies the type - of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal' + of selector. Must be one of: Env, FS, Secret, Literal' type: string required: - type @@ -1001,11 +1001,13 @@ spec: additionalProperties: description: ConfigRef identifies a resource from which config information can be loaded. Environment variables, files on the filesystem, - Kubernetes Secrets, ConfigMap, structured and config literal values - strings are currently supported. + Kubernetes Secrets, ConfigMaps, structured and config literal + values strings are currently supported. properties: configmap: - description: ConfigMapRef refers to a Kubernetes ConfigMap + description: ConfigMapRef refers to a Kubernetes ConfigMap It + will be assumed the ConfigMap key content is the stack config + in YAML format. properties: key: description: Key within the ConfigMap to use. @@ -1071,7 +1073,8 @@ spec: - name type: object structured: - description: StructuredRef refers to a structured value + description: StructuredRef refers to a structured value in YAML + format. properties: value: description: Value to load @@ -1088,8 +1091,10 @@ spec: - type type: object description: (optional) ConfigRefs is the configuration for this stack, - which can be specified through ConfigRef. is omitted, configuration + which can be specified through ConfigRef. If this is omitted, configuration is assumed to be checked in and taken from the source repository. + If present, ConfigRefs values will be merged with values passed + through Config type: object continueResyncOnCommitMatch: description: (optional) ContinueResyncOnCommitMatch - when true - @@ -1161,7 +1166,7 @@ spec: type: object type: description: 'SelectorType is required and signifies the type - of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal' + of selector. Must be one of: Env, FS, Secret, Literal' type: string required: - type @@ -1280,8 +1285,7 @@ spec: type: object type: description: 'SelectorType is required and signifies the type - of selector. Must be one of: Env, FS, Secret, ConfigMap, - Literal' + of selector. Must be one of: Env, FS, Secret, Literal' type: string required: - type @@ -1348,8 +1352,7 @@ spec: type: object type: description: 'SelectorType is required and signifies the - type of selector. Must be one of: Env, FS, Secret, ConfigMap, - Literal' + type of selector. Must be one of: Env, FS, Secret, Literal' type: string required: - type @@ -1411,8 +1414,7 @@ spec: type: object type: description: 'SelectorType is required and signifies the - type of selector. Must be one of: Env, FS, Secret, ConfigMap, - Literal' + type of selector. Must be one of: Env, FS, Secret, Literal' type: string required: - type @@ -1482,8 +1484,7 @@ spec: type: object type: description: 'SelectorType is required and signifies the - type of selector. Must be one of: Env, FS, Secret, ConfigMap, - Literal' + type of selector. Must be one of: Env, FS, Secret, Literal' type: string required: - type @@ -1545,8 +1546,7 @@ spec: type: object type: description: 'SelectorType is required and signifies the - type of selector. Must be one of: Env, FS, Secret, ConfigMap, - Literal' + type of selector. Must be one of: Env, FS, Secret, Literal' type: string required: - type @@ -1707,7 +1707,7 @@ spec: type: object type: description: 'SelectorType is required and signifies the type - of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal' + of selector. Must be one of: Env, FS, Secret, Literal' type: string required: - type diff --git a/docs/stacks.md b/docs/stacks.md index e52aaba5..23a8f803 100644 --- a/docs/stacks.md +++ b/docs/stacks.md @@ -130,7 +130,7 @@ StackSpec defines the desired state of Pulumi Stack being managed by this operat configRefs map[string]object - (optional) ConfigRefs is the configuration for this stack, which can be specified through ConfigRef. is omitted, configuration is assumed to be checked in and taken from the source repository.
+ (optional) ConfigRefs is the configuration for this stack, which can be specified through ConfigRef. If this is omitted, configuration is assumed to be checked in and taken from the source repository. If present, ConfigRefs values will be merged with values passed through Config
false @@ -291,7 +291,7 @@ StackSpec defines the desired state of Pulumi Stack being managed by this operat -ConfigRef identifies a resource from which config information can be loaded. Environment variables, files on the filesystem, Kubernetes Secrets, ConfigMap, structured and config literal values strings are currently supported. +ConfigRef identifies a resource from which config information can be loaded. Environment variables, files on the filesystem, Kubernetes Secrets, ConfigMaps, structured and config literal values strings are currently supported. @@ -313,7 +313,7 @@ ConfigRef identifies a resource from which config information can be loaded. Env @@ -348,7 +348,7 @@ ConfigRef identifies a resource from which config information can be loaded. Env @@ -360,7 +360,7 @@ ConfigRef identifies a resource from which config information can be loaded. Env -ConfigMapRef refers to a Kubernetes ConfigMap +ConfigMapRef refers to a Kubernetes ConfigMap It will be assumed the ConfigMap key content is the stack config in YAML format.
configmap object - ConfigMapRef refers to a Kubernetes ConfigMap
+ ConfigMapRef refers to a Kubernetes ConfigMap It will be assumed the ConfigMap key content is the stack config in YAML format.
false
structured object - StructuredRef refers to a structured value
+ StructuredRef refers to a structured value in YAML format.
false
@@ -523,7 +523,7 @@ SecretRef refers to a Kubernetes Secret -StructuredRef refers to a structured value +StructuredRef refers to a structured value in YAML format.
@@ -565,7 +565,7 @@ ResourceRef identifies a resource from which information can be loaded. Environm @@ -858,7 +858,7 @@ ResourceRef identifies a resource from which information can be loaded. Environm @@ -1069,7 +1069,7 @@ ResourceRef identifies a resource from which information can be loaded. Environm @@ -1246,7 +1246,7 @@ ResourceRef identifies a resource from which information can be loaded. Environm @@ -1457,7 +1457,7 @@ ResourceRef identifies a resource from which information can be loaded. Environm @@ -1634,7 +1634,7 @@ ResourceRef identifies a resource from which information can be loaded. Environm @@ -1899,7 +1899,7 @@ ResourceRef identifies a resource from which information can be loaded. Environm @@ -2364,7 +2364,7 @@ StackSpec defines the desired state of Pulumi Stack being managed by this operat @@ -2525,7 +2525,7 @@ StackSpec defines the desired state of Pulumi Stack being managed by this operat -ConfigRef identifies a resource from which config information can be loaded. Environment variables, files on the filesystem, Kubernetes Secrets, ConfigMap, structured and config literal values strings are currently supported. +ConfigRef identifies a resource from which config information can be loaded. Environment variables, files on the filesystem, Kubernetes Secrets, ConfigMaps, structured and config literal values strings are currently supported.
type string - SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal
+ SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, Literal
true
type string - SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal
+ SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, Literal
true
type string - SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal
+ SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, Literal
true
type string - SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal
+ SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, Literal
true
type string - SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal
+ SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, Literal
true
type string - SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal
+ SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, Literal
true
type string - SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal
+ SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, Literal
true
configRefs map[string]object - (optional) ConfigRefs is the configuration for this stack, which can be specified through ConfigRef. is omitted, configuration is assumed to be checked in and taken from the source repository.
+ (optional) ConfigRefs is the configuration for this stack, which can be specified through ConfigRef. If this is omitted, configuration is assumed to be checked in and taken from the source repository. If present, ConfigRefs values will be merged with values passed through Config
false
@@ -2547,7 +2547,7 @@ ConfigRef identifies a resource from which config information can be loaded. Env @@ -2582,7 +2582,7 @@ ConfigRef identifies a resource from which config information can be loaded. Env @@ -2594,7 +2594,7 @@ ConfigRef identifies a resource from which config information can be loaded. Env -ConfigMapRef refers to a Kubernetes ConfigMap +ConfigMapRef refers to a Kubernetes ConfigMap It will be assumed the ConfigMap key content is the stack config in YAML format.
configmap object - ConfigMapRef refers to a Kubernetes ConfigMap
+ ConfigMapRef refers to a Kubernetes ConfigMap It will be assumed the ConfigMap key content is the stack config in YAML format.
false
structured object - StructuredRef refers to a structured value
+ StructuredRef refers to a structured value in YAML format.
false
@@ -2757,7 +2757,7 @@ SecretRef refers to a Kubernetes Secret -StructuredRef refers to a structured value +StructuredRef refers to a structured value in YAML format.
@@ -2799,7 +2799,7 @@ ResourceRef identifies a resource from which information can be loaded. Environm @@ -3092,7 +3092,7 @@ ResourceRef identifies a resource from which information can be loaded. Environm @@ -3303,7 +3303,7 @@ ResourceRef identifies a resource from which information can be loaded. Environm @@ -3480,7 +3480,7 @@ ResourceRef identifies a resource from which information can be loaded. Environm @@ -3691,7 +3691,7 @@ ResourceRef identifies a resource from which information can be loaded. Environm @@ -3868,7 +3868,7 @@ ResourceRef identifies a resource from which information can be loaded. Environm @@ -4133,7 +4133,7 @@ ResourceRef identifies a resource from which information can be loaded. Environm diff --git a/pkg/apis/pulumi/shared/stack_types.go b/pkg/apis/pulumi/shared/stack_types.go index 0462aee5..bb788ed2 100644 --- a/pkg/apis/pulumi/shared/stack_types.go +++ b/pkg/apis/pulumi/shared/stack_types.go @@ -47,7 +47,8 @@ type StackSpec struct { // is omitted, configuration is assumed to be checked in and taken from the source repository. Config map[string]string `json:"config,omitempty"` // (optional) ConfigRefs is the configuration for this stack, which can be specified through ConfigRef. - // is omitted, configuration is assumed to be checked in and taken from the source repository. + // If this is omitted, configuration is assumed to be checked in and taken from the source repository. + // If present, ConfigRefs values will be merged with values passed through Config ConfigRefs map[string]ConfigRef `json:"configRefs,omitempty"` // (optional) Secrets is the secret configuration for this stack, which can be optionally specified inline. If this // is omitted, secrets configuration is assumed to be checked in and taken from the source repository. @@ -232,13 +233,13 @@ type FluxSourceReference struct { // strings are currently supported. type ResourceRef struct { // SelectorType is required and signifies the type of selector. Must be one of: - // Env, FS, Secret, ConfigMap, Literal + // Env, FS, Secret, Literal SelectorType ResourceSelectorType `json:"type"` ResourceSelector `json:",inline"` } // ConfigRef identifies a resource from which config information can be loaded. -// Environment variables, files on the filesystem, Kubernetes Secrets, ConfigMap, structured and config literal values +// Environment variables, files on the filesystem, Kubernetes Secrets, ConfigMaps, structured and config literal values // strings are currently supported. type ConfigRef struct { // SelectorType is required and signifies the type of selector. Must be one of: @@ -253,8 +254,9 @@ type ConfigResourceSelector struct { ResourceSelector `json:",inline"` // ConfigMapRef refers to a Kubernetes ConfigMap + // It will be assumed the ConfigMap key content is the stack config in YAML format. ConfigMapRef *ConfigMapSelector `json:"configmap,omitempty"` - // StructuredRef refers to a structured value + // StructuredRef refers to a structured value in YAML format. StructuredRef *StructuredRef `json:"structured,omitempty"` }
type string - SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal
+ SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, Literal
true
type string - SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal
+ SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, Literal
true
type string - SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal
+ SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, Literal
true
type string - SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal
+ SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, Literal
true
type string - SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal
+ SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, Literal
true
type string - SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal
+ SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, Literal
true
type string - SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, ConfigMap, Literal
+ SelectorType is required and signifies the type of selector. Must be one of: Env, FS, Secret, Literal
true