|
21 | 21 | "type": "boolean" |
22 | 22 | }, |
23 | 23 | "disableResolveMessage": { |
| 24 | + "description": "Deprecated: define the receiver under .spec.receivers[]\nWill be removed in a later version", |
24 | 25 | "type": "boolean" |
25 | 26 | }, |
| 27 | + "editable": { |
| 28 | + "description": "Whether to enable or disable editing of the contact point in Grafana UI", |
| 29 | + "type": "boolean", |
| 30 | + "x-kubernetes-validations": [ |
| 31 | + { |
| 32 | + "message": "spec.editable is immutable", |
| 33 | + "rule": "self == oldSelf" |
| 34 | + } |
| 35 | + ] |
| 36 | + }, |
26 | 37 | "instanceSelector": { |
27 | 38 | "description": "Selects Grafana instances for import", |
28 | 39 | "properties": { |
|
77 | 88 | "additionalProperties": false |
78 | 89 | }, |
79 | 90 | "name": { |
80 | | - "type": "string" |
| 91 | + "description": "Receivers are grouped under the same ContactPoint using the Name\nDefaults to the name of the CR", |
| 92 | + "type": "string", |
| 93 | + "x-kubernetes-validations": [ |
| 94 | + { |
| 95 | + "message": "spec.name is immutable", |
| 96 | + "rule": "self == oldSelf" |
| 97 | + } |
| 98 | + ] |
| 99 | + }, |
| 100 | + "receivers": { |
| 101 | + "description": "List of receivers that Grafana will fan out notifications to", |
| 102 | + "items": { |
| 103 | + "description": "Represents an integration to external services that receive Grafana notifications", |
| 104 | + "properties": { |
| 105 | + "disableResolveMessage": { |
| 106 | + "type": "boolean" |
| 107 | + }, |
| 108 | + "settings": { |
| 109 | + "x-kubernetes-preserve-unknown-fields": true |
| 110 | + }, |
| 111 | + "type": { |
| 112 | + "minLength": 1, |
| 113 | + "type": "string" |
| 114 | + }, |
| 115 | + "uid": { |
| 116 | + "description": "Manually specify the UID the Contact Point is created with. Can be any string consisting of alphanumeric characters, - and _ with a maximum length of 40", |
| 117 | + "maxLength": 40, |
| 118 | + "pattern": "^[a-zA-Z0-9-_]+$", |
| 119 | + "type": "string" |
| 120 | + }, |
| 121 | + "valuesFrom": { |
| 122 | + "items": { |
| 123 | + "properties": { |
| 124 | + "targetPath": { |
| 125 | + "type": "string" |
| 126 | + }, |
| 127 | + "valueFrom": { |
| 128 | + "properties": { |
| 129 | + "configMapKeyRef": { |
| 130 | + "description": "Selects a key of a ConfigMap.", |
| 131 | + "properties": { |
| 132 | + "key": { |
| 133 | + "description": "The key to select.", |
| 134 | + "type": "string" |
| 135 | + }, |
| 136 | + "name": { |
| 137 | + "default": "", |
| 138 | + "description": "Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", |
| 139 | + "type": "string" |
| 140 | + }, |
| 141 | + "optional": { |
| 142 | + "description": "Specify whether the ConfigMap or its key must be defined", |
| 143 | + "type": "boolean" |
| 144 | + } |
| 145 | + }, |
| 146 | + "required": [ |
| 147 | + "key" |
| 148 | + ], |
| 149 | + "type": "object", |
| 150 | + "x-kubernetes-map-type": "atomic", |
| 151 | + "additionalProperties": false |
| 152 | + }, |
| 153 | + "secretKeyRef": { |
| 154 | + "description": "Selects a key of a Secret.", |
| 155 | + "properties": { |
| 156 | + "key": { |
| 157 | + "description": "The key of the secret to select from. Must be a valid secret key.", |
| 158 | + "type": "string" |
| 159 | + }, |
| 160 | + "name": { |
| 161 | + "default": "", |
| 162 | + "description": "Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", |
| 163 | + "type": "string" |
| 164 | + }, |
| 165 | + "optional": { |
| 166 | + "description": "Specify whether the Secret or its key must be defined", |
| 167 | + "type": "boolean" |
| 168 | + } |
| 169 | + }, |
| 170 | + "required": [ |
| 171 | + "key" |
| 172 | + ], |
| 173 | + "type": "object", |
| 174 | + "x-kubernetes-map-type": "atomic", |
| 175 | + "additionalProperties": false |
| 176 | + } |
| 177 | + }, |
| 178 | + "type": "object", |
| 179 | + "x-kubernetes-validations": [ |
| 180 | + { |
| 181 | + "message": "Either configMapKeyRef or secretKeyRef must be set", |
| 182 | + "rule": "(has(self.configMapKeyRef) && !has(self.secretKeyRef)) || (!has(self.configMapKeyRef) && has(self.secretKeyRef))" |
| 183 | + } |
| 184 | + ], |
| 185 | + "additionalProperties": false |
| 186 | + } |
| 187 | + }, |
| 188 | + "required": [ |
| 189 | + "targetPath", |
| 190 | + "valueFrom" |
| 191 | + ], |
| 192 | + "type": "object", |
| 193 | + "additionalProperties": false |
| 194 | + }, |
| 195 | + "maxItems": 99, |
| 196 | + "type": "array" |
| 197 | + } |
| 198 | + }, |
| 199 | + "required": [ |
| 200 | + "settings", |
| 201 | + "type" |
| 202 | + ], |
| 203 | + "type": "object", |
| 204 | + "additionalProperties": false |
| 205 | + }, |
| 206 | + "maxItems": 99, |
| 207 | + "type": "array" |
81 | 208 | }, |
82 | 209 | "resyncPeriod": { |
83 | | - "default": "10m0s", |
84 | 210 | "description": "How often the resource is synced, defaults to 10m0s if not set", |
85 | 211 | "pattern": "^([0-9]+(\\.[0-9]+)?(ns|us|\u00b5s|ms|s|m|h))+$", |
86 | 212 | "type": "string" |
87 | 213 | }, |
88 | 214 | "settings": { |
| 215 | + "description": "Deprecated: define the receiver under .spec.receivers[]\nWill be removed in a later version", |
89 | 216 | "x-kubernetes-preserve-unknown-fields": true |
90 | 217 | }, |
91 | 218 | "suspend": { |
92 | 219 | "description": "Suspend pauses synchronizing attempts and tells the operator to ignore changes", |
93 | 220 | "type": "boolean" |
94 | 221 | }, |
95 | 222 | "type": { |
| 223 | + "description": "Deprecated: define the receiver under .spec.receivers[]\nWill be removed in a later version", |
96 | 224 | "minLength": 1, |
97 | 225 | "type": "string" |
98 | 226 | }, |
99 | 227 | "uid": { |
100 | | - "description": "Manually specify the UID the Contact Point is created with. Can be any string consisting of alphanumeric characters, - and _ with a maximum length of 40", |
| 228 | + "description": "Deprecated: define the receiver under .spec.receivers[]\nManually specify the UID the Contact Point is created with. Can be any string consisting of alphanumeric characters, - and _ with a maximum length of 40", |
101 | 229 | "maxLength": 40, |
102 | 230 | "pattern": "^[a-zA-Z0-9-_]+$", |
103 | 231 | "type": "string", |
|
109 | 237 | ] |
110 | 238 | }, |
111 | 239 | "valuesFrom": { |
| 240 | + "description": "Deprecated: define the receiver under .spec.receivers[]\nWill be removed in a later version", |
112 | 241 | "items": { |
113 | 242 | "properties": { |
114 | 243 | "targetPath": { |
|
187 | 316 | } |
188 | 317 | }, |
189 | 318 | "required": [ |
190 | | - "instanceSelector", |
191 | | - "name", |
192 | | - "settings", |
193 | | - "type" |
| 319 | + "instanceSelector" |
194 | 320 | ], |
195 | 321 | "type": "object", |
196 | 322 | "x-kubernetes-validations": [ |
197 | 323 | { |
198 | | - "message": "spec.uid is immutable", |
199 | | - "rule": "((!has(oldSelf.uid) && !has(self.uid)) || (has(oldSelf.uid) && has(self.uid)))" |
| 324 | + "message": "spec.name is immutable", |
| 325 | + "rule": "((!has(oldSelf.name) && !has(self.name)) || (has(oldSelf.name) && has(self.name)))" |
| 326 | + }, |
| 327 | + { |
| 328 | + "message": "spec.editable is immutable", |
| 329 | + "rule": "((!has(oldSelf.editable) && !has(self.editable)) || (has(oldSelf.editable) && has(self.editable)))" |
200 | 330 | }, |
201 | 331 | { |
202 | 332 | "message": "disabling spec.allowCrossNamespaceImport requires a recreate to ensure desired state", |
|
0 commit comments