Skip to content

Commit a621296

Browse files
Merge pull request #978 from tkashem/bz-1737057
Bug 1737057: Sub CRD does not validate config
2 parents 414ead1 + f0436eb commit a621296

File tree

2 files changed

+222
-0
lines changed

2 files changed

+222
-0
lines changed

deploy/chart/templates/0000_50_olm_05-subscription.crd.yaml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,114 @@ spec:
7171
enum:
7272
- Manual
7373
- Automatic
74+
config:
75+
type: object
76+
description: Operator Pod configuration, it is applied to the operator during install. It has higher precedence than the same configuration specified in a ClusterServiveVersion.
77+
properties:
78+
env:
79+
type: array
80+
description: List of environment variables to set in the container
81+
items:
82+
type: object
83+
description: EnvVar represents an environment variable present in a Container
84+
required:
85+
- name
86+
properties:
87+
name:
88+
type: string
89+
description: EnvVar represents an environment variable present in a Container
90+
value:
91+
type: string
92+
description: Value of the environment variable specified
93+
valueFrom:
94+
type: object
95+
description: Source for the environment variable's value. Cannot be used if value is not empty
96+
properties:
97+
configMapKeyRef:
98+
type: object
99+
description: Selects a key of a ConfigMap
100+
required:
101+
- key
102+
properties:
103+
key:
104+
type: string
105+
description: The key to select
106+
name:
107+
type: string
108+
description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"
109+
optional:
110+
type: boolean
111+
description: Specify whether the ConfigMap or its key must be defined
112+
fieldRef:
113+
type: object
114+
description: "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP"
115+
required:
116+
- fieldPath
117+
properties:
118+
apiVersion:
119+
type: string
120+
description: Version of the schema the FieldPath is written in terms of, defaults to v1
121+
fieldPath:
122+
type: string
123+
description: Path of the field to select in the specified API version
124+
resourceFieldRef:
125+
type: object
126+
description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported."
127+
required:
128+
- resource
129+
properties:
130+
containerName:
131+
type: string
132+
description: "Container name: required for volumes, optional for env vars"
133+
divisor:
134+
type: string
135+
description: Specifies the output format of the exposed resources, defaults to 1
136+
resource:
137+
type: string
138+
description: "Required: resource to select"
139+
secretKeyRef:
140+
type: object
141+
description: Selects a key of a secret in the pod's namespace
142+
required:
143+
- key
144+
properties:
145+
key:
146+
type: string
147+
description: The key of the secret to select from. Must be a valid secret key
148+
name:
149+
type: string
150+
description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"
151+
optional:
152+
type: boolean
153+
description: Specify whether the Secret or its key must be defined
154+
envFrom:
155+
type: array
156+
description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated"
157+
items:
158+
type: object
159+
description: EnvFromSource represents the source of a set of ConfigMaps
160+
properties:
161+
configMapRef:
162+
type: object
163+
description: "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables"
164+
properties:
165+
name:
166+
type: string
167+
description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"
168+
optional:
169+
type: boolean
170+
description: Specify whether the ConfigMap must be defined
171+
prefix:
172+
type: string
173+
description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER
174+
secretRef:
175+
type: object
176+
description: "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables"
177+
properties:
178+
name:
179+
type: string
180+
description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"
181+
optional:
182+
type: boolean
183+
description: Specify whether the Secret must be defined
184+

manifests/0000_50_olm_05-subscription.crd.yaml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,114 @@ spec:
7171
enum:
7272
- Manual
7373
- Automatic
74+
config:
75+
type: object
76+
description: Operator Pod configuration, it is applied to the operator during install. It has higher precedence than the same configuration specified in a ClusterServiveVersion.
77+
properties:
78+
env:
79+
type: array
80+
description: List of environment variables to set in the container
81+
items:
82+
type: object
83+
description: EnvVar represents an environment variable present in a Container
84+
required:
85+
- name
86+
properties:
87+
name:
88+
type: string
89+
description: EnvVar represents an environment variable present in a Container
90+
value:
91+
type: string
92+
description: Value of the environment variable specified
93+
valueFrom:
94+
type: object
95+
description: Source for the environment variable's value. Cannot be used if value is not empty
96+
properties:
97+
configMapKeyRef:
98+
type: object
99+
description: Selects a key of a ConfigMap
100+
required:
101+
- key
102+
properties:
103+
key:
104+
type: string
105+
description: The key to select
106+
name:
107+
type: string
108+
description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"
109+
optional:
110+
type: boolean
111+
description: Specify whether the ConfigMap or its key must be defined
112+
fieldRef:
113+
type: object
114+
description: "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP"
115+
required:
116+
- fieldPath
117+
properties:
118+
apiVersion:
119+
type: string
120+
description: Version of the schema the FieldPath is written in terms of, defaults to v1
121+
fieldPath:
122+
type: string
123+
description: Path of the field to select in the specified API version
124+
resourceFieldRef:
125+
type: object
126+
description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported."
127+
required:
128+
- resource
129+
properties:
130+
containerName:
131+
type: string
132+
description: "Container name: required for volumes, optional for env vars"
133+
divisor:
134+
type: string
135+
description: Specifies the output format of the exposed resources, defaults to 1
136+
resource:
137+
type: string
138+
description: "Required: resource to select"
139+
secretKeyRef:
140+
type: object
141+
description: Selects a key of a secret in the pod's namespace
142+
required:
143+
- key
144+
properties:
145+
key:
146+
type: string
147+
description: The key of the secret to select from. Must be a valid secret key
148+
name:
149+
type: string
150+
description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"
151+
optional:
152+
type: boolean
153+
description: Specify whether the Secret or its key must be defined
154+
envFrom:
155+
type: array
156+
description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated"
157+
items:
158+
type: object
159+
description: EnvFromSource represents the source of a set of ConfigMaps
160+
properties:
161+
configMapRef:
162+
type: object
163+
description: "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables"
164+
properties:
165+
name:
166+
type: string
167+
description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"
168+
optional:
169+
type: boolean
170+
description: Specify whether the ConfigMap must be defined
171+
prefix:
172+
type: string
173+
description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER
174+
secretRef:
175+
type: object
176+
description: "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables"
177+
properties:
178+
name:
179+
type: string
180+
description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"
181+
optional:
182+
type: boolean
183+
description: Specify whether the Secret must be defined
184+

0 commit comments

Comments
 (0)