-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support structured config #575
base: master
Are you sure you want to change the base?
Changes from 7 commits
20eb3c7
d62e4b0
d637e40
8c8d103
79cadf2
483bec5
98559a9
b76e8b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -80,6 +80,101 @@ spec: | |||||||||||
which can be optionally specified inline. If this is omitted, configuration | ||||||||||||
is assumed to be checked in and taken from the source repository. | ||||||||||||
type: object | ||||||||||||
configRefs: | ||||||||||||
description: (optional) ConfigRefs is an optional list of configuration | ||||||||||||
values for this stack, which can be specified through each 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 the ones passed through Config field (ConfigRefs | ||||||||||||
values have precedence, and configs will the same key name will | ||||||||||||
be overwritten). | ||||||||||||
items: | ||||||||||||
additionalProperties: | ||||||||||||
description: 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. | ||||||||||||
properties: | ||||||||||||
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. | ||||||||||||
type: string | ||||||||||||
name: | ||||||||||||
description: Name of the ConfigMap | ||||||||||||
type: string | ||||||||||||
namespace: | ||||||||||||
description: Namespace where the ConfigMap is stored. | ||||||||||||
Deprecated; non-empty values will be considered invalid | ||||||||||||
unless namespace isolation is disabled in the controller. | ||||||||||||
type: string | ||||||||||||
Comment on lines
+109
to
+113
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's not add new things that are already deprecated.
Suggested change
|
||||||||||||
required: | ||||||||||||
- key | ||||||||||||
- name | ||||||||||||
type: object | ||||||||||||
env: | ||||||||||||
description: Env selects an environment variable set on the | ||||||||||||
operator process | ||||||||||||
Comment on lines
+119
to
+120
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like this was copy-pasted, let's make sure the doc strings are accurate. |
||||||||||||
properties: | ||||||||||||
name: | ||||||||||||
description: Name of the environment variable | ||||||||||||
type: string | ||||||||||||
required: | ||||||||||||
- name | ||||||||||||
type: object | ||||||||||||
filesystem: | ||||||||||||
description: FileSystem selects a file on the operator's file | ||||||||||||
system | ||||||||||||
properties: | ||||||||||||
path: | ||||||||||||
description: Path on the filesystem to use to load information | ||||||||||||
from. | ||||||||||||
type: string | ||||||||||||
required: | ||||||||||||
- path | ||||||||||||
type: object | ||||||||||||
literal: | ||||||||||||
description: ConfigLiteralRef refers to a literal config value. | ||||||||||||
It could be both a single or a structured (in YAML format) | ||||||||||||
ones. | ||||||||||||
properties: | ||||||||||||
value: | ||||||||||||
description: Value to load | ||||||||||||
x-kubernetes-preserve-unknown-fields: true | ||||||||||||
required: | ||||||||||||
- value | ||||||||||||
type: object | ||||||||||||
secret: | ||||||||||||
description: SecretRef refers to a Kubernetes Secret | ||||||||||||
properties: | ||||||||||||
key: | ||||||||||||
description: Key within the Secret to use. | ||||||||||||
type: string | ||||||||||||
name: | ||||||||||||
description: Name of the Secret | ||||||||||||
type: string | ||||||||||||
namespace: | ||||||||||||
description: Namespace where the Secret is stored. Deprecated; | ||||||||||||
non-empty values will be considered invalid unless namespace | ||||||||||||
isolation is disabled in the controller. | ||||||||||||
type: string | ||||||||||||
required: | ||||||||||||
- key | ||||||||||||
- name | ||||||||||||
type: object | ||||||||||||
type: | ||||||||||||
description: 'SelectorType is required and signifies the type | ||||||||||||
of selector. Must be one of: Env, FS, Secret, ConfigMap, | ||||||||||||
Structured, Literal' | ||||||||||||
Comment on lines
+152
to
+153
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Or just ConfigMap/Literal if you scope it down to those two. |
||||||||||||
type: string | ||||||||||||
required: | ||||||||||||
- type | ||||||||||||
type: object | ||||||||||||
type: object | ||||||||||||
type: array | ||||||||||||
continueResyncOnCommitMatch: | ||||||||||||
description: (optional) ContinueResyncOnCommitMatch - when true - | ||||||||||||
informs the operator to continue trying to update stacks even if | ||||||||||||
|
@@ -898,6 +993,101 @@ spec: | |||||||||||
which can be optionally specified inline. If this is omitted, configuration | ||||||||||||
is assumed to be checked in and taken from the source repository. | ||||||||||||
type: object | ||||||||||||
configRefs: | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was suggested that we keep this limited to an alpha version like this before adding it to v1. That way we aren't immediately locked in to the API. |
||||||||||||
description: (optional) ConfigRefs is an optional list of configuration | ||||||||||||
values for this stack, which can be specified through each 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 the ones passed through Config field (ConfigRefs | ||||||||||||
values have precedence, and configs will the same key name will | ||||||||||||
be overwritten). | ||||||||||||
items: | ||||||||||||
additionalProperties: | ||||||||||||
description: 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. | ||||||||||||
properties: | ||||||||||||
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. | ||||||||||||
type: string | ||||||||||||
name: | ||||||||||||
description: Name of the ConfigMap | ||||||||||||
type: string | ||||||||||||
namespace: | ||||||||||||
description: Namespace where the ConfigMap is stored. | ||||||||||||
Deprecated; non-empty values will be considered invalid | ||||||||||||
unless namespace isolation is disabled in the controller. | ||||||||||||
type: string | ||||||||||||
required: | ||||||||||||
- key | ||||||||||||
- name | ||||||||||||
type: object | ||||||||||||
env: | ||||||||||||
description: Env selects an environment variable set on the | ||||||||||||
operator process | ||||||||||||
properties: | ||||||||||||
name: | ||||||||||||
description: Name of the environment variable | ||||||||||||
type: string | ||||||||||||
required: | ||||||||||||
- name | ||||||||||||
type: object | ||||||||||||
filesystem: | ||||||||||||
description: FileSystem selects a file on the operator's file | ||||||||||||
system | ||||||||||||
properties: | ||||||||||||
path: | ||||||||||||
description: Path on the filesystem to use to load information | ||||||||||||
from. | ||||||||||||
type: string | ||||||||||||
required: | ||||||||||||
- path | ||||||||||||
type: object | ||||||||||||
literal: | ||||||||||||
description: ConfigLiteralRef refers to a literal config value. | ||||||||||||
It could be both a single or a structured (in YAML format) | ||||||||||||
ones. | ||||||||||||
properties: | ||||||||||||
value: | ||||||||||||
description: Value to load | ||||||||||||
x-kubernetes-preserve-unknown-fields: true | ||||||||||||
required: | ||||||||||||
- value | ||||||||||||
type: object | ||||||||||||
secret: | ||||||||||||
description: SecretRef refers to a Kubernetes Secret | ||||||||||||
properties: | ||||||||||||
key: | ||||||||||||
description: Key within the Secret to use. | ||||||||||||
type: string | ||||||||||||
name: | ||||||||||||
description: Name of the Secret | ||||||||||||
type: string | ||||||||||||
namespace: | ||||||||||||
description: Namespace where the Secret is stored. Deprecated; | ||||||||||||
non-empty values will be considered invalid unless namespace | ||||||||||||
isolation is disabled in the controller. | ||||||||||||
type: string | ||||||||||||
required: | ||||||||||||
- key | ||||||||||||
- name | ||||||||||||
type: object | ||||||||||||
type: | ||||||||||||
description: 'SelectorType is required and signifies the type | ||||||||||||
of selector. Must be one of: Env, FS, Secret, ConfigMap, | ||||||||||||
Structured, Literal' | ||||||||||||
type: string | ||||||||||||
required: | ||||||||||||
- type | ||||||||||||
type: object | ||||||||||||
type: object | ||||||||||||
type: array | ||||||||||||
continueResyncOnCommitMatch: | ||||||||||||
description: (optional) ContinueResyncOnCommitMatch - when true - | ||||||||||||
informs the operator to continue trying to update stacks even if | ||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean we over-write in-repo configs entirely? Why not overlay these configs on top of source?
It seems surprising to be able to commit some changes to config, deploy it, but then not see the new config take effect. Is this the existing behavior of the operator?