Skip to content

Commit 820e285

Browse files
authored
Merge pull request #74 from awgreene/condition-crd
Introduce new OperatorCondition CRD
2 parents 73aea49 + 775018b commit 820e285

6 files changed

+1348
-200
lines changed

crds/operators.coreos.com_clusterserviceversions.yaml

Lines changed: 687 additions & 140 deletions
Large diffs are not rendered by default.
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
annotations:
5+
controller-gen.kubebuilder.io/version: v0.3.0
6+
creationTimestamp: null
7+
name: operatorconditions.operators.coreos.com
8+
spec:
9+
group: operators.coreos.com
10+
names:
11+
kind: OperatorCondition
12+
listKind: OperatorConditionList
13+
plural: operatorconditions
14+
singular: operatorcondition
15+
scope: Namespaced
16+
versions:
17+
- name: v1
18+
schema:
19+
openAPIV3Schema:
20+
description: OperatorCondition is a Custom Resource of type `OperatorCondition`
21+
which is used to convey information to OLM about the state of an operator.
22+
type: object
23+
required:
24+
- metadata
25+
properties:
26+
apiVersion:
27+
description: 'APIVersion defines the versioned schema of this representation
28+
of an object. Servers should convert recognized schemas to the latest
29+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
30+
type: string
31+
kind:
32+
description: 'Kind is a string value representing the REST resource this
33+
object represents. Servers may infer this from the endpoint the client
34+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
35+
type: string
36+
metadata:
37+
type: object
38+
spec:
39+
description: OperatorConditionSpec allows a cluster admin to convey information
40+
about the state of an operator to OLM, potentially overriding state
41+
reported by the operator.
42+
type: object
43+
properties:
44+
overrides:
45+
type: array
46+
items:
47+
description: "Condition contains details for one aspect of the current
48+
state of this API Resource. --- This struct is intended for direct
49+
use as an array at the field path .status.conditions. For example,
50+
type FooStatus struct{ // Represents the observations of a
51+
foo's current state. // Known .status.conditions.type are:
52+
\"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type
53+
\ // +patchStrategy=merge // +listType=map // +listMapKey=type
54+
\ Conditions []metav1.Condition `json:\"conditions,omitempty\"
55+
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`
56+
\n // other fields }"
57+
type: object
58+
required:
59+
- lastTransitionTime
60+
- message
61+
- reason
62+
- status
63+
- type
64+
properties:
65+
lastTransitionTime:
66+
description: lastTransitionTime is the last time the condition
67+
transitioned from one status to another. This should be when
68+
the underlying condition changed. If that is not known, then
69+
using the time when the API field changed is acceptable.
70+
type: string
71+
format: date-time
72+
message:
73+
description: message is a human readable message indicating
74+
details about the transition. This may be an empty string.
75+
type: string
76+
maxLength: 32768
77+
observedGeneration:
78+
description: observedGeneration represents the .metadata.generation
79+
that the condition was set based upon. For instance, if .metadata.generation
80+
is currently 12, but the .status.conditions[x].observedGeneration
81+
is 9, the condition is out of date with respect to the current
82+
state of the instance.
83+
type: integer
84+
format: int64
85+
minimum: 0
86+
reason:
87+
description: reason contains a programmatic identifier indicating
88+
the reason for the condition's last transition. Producers
89+
of specific condition types may define expected values and
90+
meanings for this field, and whether the values are considered
91+
a guaranteed API. The value should be a CamelCase string.
92+
This field may not be empty.
93+
type: string
94+
maxLength: 1024
95+
minLength: 1
96+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
97+
status:
98+
description: status of the condition, one of True, False, Unknown.
99+
type: string
100+
enum:
101+
- "True"
102+
- "False"
103+
- Unknown
104+
type:
105+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
106+
--- Many .condition.type values are consistent across resources
107+
like Available, but because arbitrary conditions can be useful
108+
(see .node.status.conditions), the ability to deconflict is
109+
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
110+
type: string
111+
maxLength: 316
112+
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])$
113+
status:
114+
description: OperatorConditionStatus allows an operator to convey information
115+
its state to OLM. The status may trail the actual state of a system.
116+
type: object
117+
properties:
118+
conditions:
119+
type: array
120+
items:
121+
description: "Condition contains details for one aspect of the current
122+
state of this API Resource. --- This struct is intended for direct
123+
use as an array at the field path .status.conditions. For example,
124+
type FooStatus struct{ // Represents the observations of a
125+
foo's current state. // Known .status.conditions.type are:
126+
\"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type
127+
\ // +patchStrategy=merge // +listType=map // +listMapKey=type
128+
\ Conditions []metav1.Condition `json:\"conditions,omitempty\"
129+
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`
130+
\n // other fields }"
131+
type: object
132+
required:
133+
- lastTransitionTime
134+
- message
135+
- reason
136+
- status
137+
- type
138+
properties:
139+
lastTransitionTime:
140+
description: lastTransitionTime is the last time the condition
141+
transitioned from one status to another. This should be when
142+
the underlying condition changed. If that is not known, then
143+
using the time when the API field changed is acceptable.
144+
type: string
145+
format: date-time
146+
message:
147+
description: message is a human readable message indicating
148+
details about the transition. This may be an empty string.
149+
type: string
150+
maxLength: 32768
151+
observedGeneration:
152+
description: observedGeneration represents the .metadata.generation
153+
that the condition was set based upon. For instance, if .metadata.generation
154+
is currently 12, but the .status.conditions[x].observedGeneration
155+
is 9, the condition is out of date with respect to the current
156+
state of the instance.
157+
type: integer
158+
format: int64
159+
minimum: 0
160+
reason:
161+
description: reason contains a programmatic identifier indicating
162+
the reason for the condition's last transition. Producers
163+
of specific condition types may define expected values and
164+
meanings for this field, and whether the values are considered
165+
a guaranteed API. The value should be a CamelCase string.
166+
This field may not be empty.
167+
type: string
168+
maxLength: 1024
169+
minLength: 1
170+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
171+
status:
172+
description: status of the condition, one of True, False, Unknown.
173+
type: string
174+
enum:
175+
- "True"
176+
- "False"
177+
- Unknown
178+
type:
179+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
180+
--- Many .condition.type values are consistent across resources
181+
like Available, but because arbitrary conditions can be useful
182+
(see .node.status.conditions), the ability to deconflict is
183+
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
184+
type: string
185+
maxLength: 316
186+
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])$
187+
served: true
188+
storage: true
189+
subresources:
190+
status: {}

0 commit comments

Comments
 (0)