Skip to content

Commit 794bf4d

Browse files
committed
Introduce OLMConfig CRD
1 parent f579141 commit 794bf4d

File tree

6 files changed

+388
-0
lines changed

6 files changed

+388
-0
lines changed

crds/defs.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,8 @@ func Subscription() *apiextensionsv1.CustomResourceDefinition {
104104
func OperatorCondition() *apiextensionsv1.CustomResourceDefinition {
105105
return getCRD("operators.coreos.com_operatorconditions.yaml").DeepCopy()
106106
}
107+
108+
// OLMConfig returns a copy of the CustomResourceDefinition for the latest version of the OLMConfig API.
109+
func OLMConfig() *apiextensionsv1.CustomResourceDefinition {
110+
return getCRD("operators.coreos.com_olmconfigs.yaml").DeepCopy()
111+
}
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
annotations:
5+
controller-gen.kubebuilder.io/version: v0.6.2
6+
creationTimestamp: null
7+
name: olmconfigs.operators.coreos.com
8+
spec:
9+
group: operators.coreos.com
10+
names:
11+
categories:
12+
- olm
13+
kind: OLMConfig
14+
listKind: OLMConfigList
15+
plural: olmconfigs
16+
singular: olmconfig
17+
scope: Cluster
18+
versions:
19+
- name: v1
20+
schema:
21+
openAPIV3Schema:
22+
description: OLMConfig is a resource responsible for configuring OLM.
23+
type: object
24+
required:
25+
- metadata
26+
properties:
27+
apiVersion:
28+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
29+
type: string
30+
kind:
31+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
32+
type: string
33+
metadata:
34+
type: object
35+
spec:
36+
description: OLMConfigSpec is the spec for an OLMConfig resource.
37+
type: object
38+
properties:
39+
features:
40+
description: Features contains the list of configurable OLM features.
41+
type: object
42+
properties:
43+
disableCopiedCSVs:
44+
description: DisableCopiedCSVs is used to disable OLM's "Copied CSV" feature for operators installed at the cluster scope, where a cluster scoped operator is one that has been installed in an OperatorGroup that targets all namespaces. When reenabled, OLM will recreate the "Copied CSVs" for each cluster scoped operator.
45+
type: boolean
46+
status:
47+
description: OLMConfigStatus is the status for an OLMConfig resource.
48+
type: object
49+
properties:
50+
conditions:
51+
type: array
52+
items:
53+
description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
54+
type: object
55+
required:
56+
- lastTransitionTime
57+
- message
58+
- reason
59+
- status
60+
- type
61+
properties:
62+
lastTransitionTime:
63+
description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
64+
type: string
65+
format: date-time
66+
message:
67+
description: message is a human readable message indicating details about the transition. This may be an empty string.
68+
type: string
69+
maxLength: 32768
70+
observedGeneration:
71+
description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
72+
type: integer
73+
format: int64
74+
minimum: 0
75+
reason:
76+
description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
77+
type: string
78+
maxLength: 1024
79+
minLength: 1
80+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
81+
status:
82+
description: status of the condition, one of True, False, Unknown.
83+
type: string
84+
enum:
85+
- "True"
86+
- "False"
87+
- Unknown
88+
type:
89+
description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
90+
type: string
91+
maxLength: 316
92+
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])$
93+
served: true
94+
storage: true
95+
subresources:
96+
status: {}

0 commit comments

Comments
 (0)