Skip to content

Commit cc40b09

Browse files
committed
fix: alerting crds missing from kustomize base crds
1 parent 33fa7f9 commit cc40b09

File tree

3 files changed

+769
-0
lines changed

3 files changed

+769
-0
lines changed

config/kustomization.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ resources:
66
- grafana.integreatly.org_grafanadashboards.yaml
77
- grafana.integreatly.org_grafanadatasources.yaml
88
- grafana.integreatly.org_grafanafolders.yaml
9+
- grafana.integreatly.org_grafanaalertrulegroups.yaml
910
#+kubebuilder:scaffold:crdkustomizeresource

deploy/kustomize/base/crds.yaml

+275
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,280 @@
11
apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
3+
metadata:
4+
annotations:
5+
controller-gen.kubebuilder.io/version: v0.12.0
6+
name: grafanaalertrulegroups.grafana.integreatly.org
7+
spec:
8+
group: grafana.integreatly.org
9+
names:
10+
kind: GrafanaAlertRuleGroup
11+
listKind: GrafanaAlertRuleGroupList
12+
plural: grafanaalertrulegroups
13+
singular: grafanaalertrulegroup
14+
scope: Namespaced
15+
versions:
16+
- name: v1beta1
17+
schema:
18+
openAPIV3Schema:
19+
description: GrafanaAlertRuleGroup is the Schema for the grafanaalertrulegroups
20+
API
21+
properties:
22+
apiVersion:
23+
description: 'APIVersion defines the versioned schema of this representation
24+
of an object. Servers should convert recognized schemas to the latest
25+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
26+
type: string
27+
kind:
28+
description: 'Kind is a string value representing the REST resource this
29+
object represents. Servers may infer this from the endpoint the client
30+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
31+
type: string
32+
metadata:
33+
type: object
34+
spec:
35+
description: GrafanaAlertRuleGroupSpec defines the desired state of GrafanaAlertRuleGroup
36+
properties:
37+
allowCrossNamespaceImport:
38+
type: boolean
39+
folderRef:
40+
description: Match GrafanaFolders CRs to infer the uid
41+
type: string
42+
folderUID:
43+
description: UID of the folder containing this rule group Overrides
44+
the FolderSelector
45+
type: string
46+
instanceSelector:
47+
description: selects Grafanas for import
48+
properties:
49+
matchExpressions:
50+
description: matchExpressions is a list of label selector requirements.
51+
The requirements are ANDed.
52+
items:
53+
description: A label selector requirement is a selector that
54+
contains values, a key, and an operator that relates the key
55+
and values.
56+
properties:
57+
key:
58+
description: key is the label key that the selector applies
59+
to.
60+
type: string
61+
operator:
62+
description: operator represents a key's relationship to
63+
a set of values. Valid operators are In, NotIn, Exists
64+
and DoesNotExist.
65+
type: string
66+
values:
67+
description: values is an array of string values. If the
68+
operator is In or NotIn, the values array must be non-empty.
69+
If the operator is Exists or DoesNotExist, the values
70+
array must be empty. This array is replaced during a strategic
71+
merge patch.
72+
items:
73+
type: string
74+
type: array
75+
required:
76+
- key
77+
- operator
78+
type: object
79+
type: array
80+
matchLabels:
81+
additionalProperties:
82+
type: string
83+
description: matchLabels is a map of {key,value} pairs. A single
84+
{key,value} in the matchLabels map is equivalent to an element
85+
of matchExpressions, whose key field is "key", the operator
86+
is "In", and the values array contains only "value". The requirements
87+
are ANDed.
88+
type: object
89+
type: object
90+
x-kubernetes-map-type: atomic
91+
interval:
92+
format: duration
93+
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
94+
type: string
95+
resyncPeriod:
96+
default: 10m
97+
format: duration
98+
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
99+
type: string
100+
rules:
101+
items:
102+
description: AlertRule defines a specific rule to be evaluated.
103+
It is based on the upstream model with some k8s specific type
104+
mappings
105+
properties:
106+
annotations:
107+
additionalProperties:
108+
type: string
109+
type: object
110+
condition:
111+
type: string
112+
data:
113+
items:
114+
properties:
115+
datasourceUid:
116+
description: Grafana data source unique identifier; it
117+
should be '__expr__' for a Server Side Expression operation.
118+
type: string
119+
model:
120+
description: JSON is the raw JSON query and includes the
121+
above properties as well as custom properties.
122+
x-kubernetes-preserve-unknown-fields: true
123+
queryType:
124+
description: QueryType is an optional identifier for the
125+
type of query. It can be used to distinguish different
126+
types of queries.
127+
type: string
128+
refId:
129+
description: RefID is the unique identifier of the query,
130+
set by the frontend call.
131+
type: string
132+
relativeTimeRange:
133+
description: relative time range
134+
properties:
135+
from:
136+
description: from
137+
format: int64
138+
type: integer
139+
to:
140+
description: to
141+
format: int64
142+
type: integer
143+
type: object
144+
type: object
145+
type: array
146+
execErrState:
147+
enum:
148+
- OK
149+
- Alerting
150+
- Error
151+
type: string
152+
for:
153+
format: duration
154+
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
155+
type: string
156+
isPaused:
157+
type: boolean
158+
labels:
159+
additionalProperties:
160+
type: string
161+
type: object
162+
noDataState:
163+
enum:
164+
- Alerting
165+
- NoData
166+
- OK
167+
type: string
168+
title:
169+
example: Always firing
170+
maxLength: 190
171+
minLength: 1
172+
type: string
173+
uid:
174+
pattern: ^[a-zA-Z0-9-_]+$
175+
type: string
176+
required:
177+
- condition
178+
- data
179+
- execErrState
180+
- for
181+
- noDataState
182+
- title
183+
- uid
184+
type: object
185+
type: array
186+
required:
187+
- instanceSelector
188+
- interval
189+
- rules
190+
type: object
191+
x-kubernetes-validations:
192+
- message: Only one of FolderUID or FolderRef can be set
193+
rule: (has(self.folderUID) && !(has(self.folderRef))) || (has(self.folderRef)
194+
&& !(has(self.folderUID)))
195+
status:
196+
description: GrafanaAlertRuleGroupStatus defines the observed state of
197+
GrafanaAlertRuleGroup
198+
properties:
199+
conditions:
200+
items:
201+
description: "Condition contains details for one aspect of the current
202+
state of this API Resource. --- This struct is intended for direct
203+
use as an array at the field path .status.conditions. For example,
204+
\n type FooStatus struct{ // Represents the observations of a
205+
foo's current state. // Known .status.conditions.type are: \"Available\",
206+
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
207+
// +listType=map // +listMapKey=type Conditions []metav1.Condition
208+
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
209+
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
210+
properties:
211+
lastTransitionTime:
212+
description: lastTransitionTime is the last time the condition
213+
transitioned from one status to another. This should be when
214+
the underlying condition changed. If that is not known, then
215+
using the time when the API field changed is acceptable.
216+
format: date-time
217+
type: string
218+
message:
219+
description: message is a human readable message indicating
220+
details about the transition. This may be an empty string.
221+
maxLength: 32768
222+
type: string
223+
observedGeneration:
224+
description: observedGeneration represents the .metadata.generation
225+
that the condition was set based upon. For instance, if .metadata.generation
226+
is currently 12, but the .status.conditions[x].observedGeneration
227+
is 9, the condition is out of date with respect to the current
228+
state of the instance.
229+
format: int64
230+
minimum: 0
231+
type: integer
232+
reason:
233+
description: reason contains a programmatic identifier indicating
234+
the reason for the condition's last transition. Producers
235+
of specific condition types may define expected values and
236+
meanings for this field, and whether the values are considered
237+
a guaranteed API. The value should be a CamelCase string.
238+
This field may not be empty.
239+
maxLength: 1024
240+
minLength: 1
241+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
242+
type: string
243+
status:
244+
description: status of the condition, one of True, False, Unknown.
245+
enum:
246+
- "True"
247+
- "False"
248+
- Unknown
249+
type: string
250+
type:
251+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
252+
--- Many .condition.type values are consistent across resources
253+
like Available, but because arbitrary conditions can be useful
254+
(see .node.status.conditions), the ability to deconflict is
255+
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
256+
maxLength: 316
257+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
258+
type: string
259+
required:
260+
- lastTransitionTime
261+
- message
262+
- reason
263+
- status
264+
- type
265+
type: object
266+
type: array
267+
required:
268+
- conditions
269+
type: object
270+
type: object
271+
served: true
272+
storage: true
273+
subresources:
274+
status: {}
275+
---
276+
apiVersion: apiextensions.k8s.io/v1
277+
kind: CustomResourceDefinition
3278
metadata:
4279
annotations:
5280
controller-gen.kubebuilder.io/version: v0.12.0

0 commit comments

Comments
 (0)