Skip to content

Commit 156f991

Browse files
author
Per Goncalves da Silva
committed
Update experimental manifest and code generation
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
1 parent 1d8e200 commit 156f991

File tree

11 files changed

+610
-73
lines changed

11 files changed

+610
-73
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ BINARIES=operator-controller catalogd
380380

381381
.PHONY: $(BINARIES)
382382
$(BINARIES):
383-
go build $(GO_BUILD_FLAGS) $(GO_BUILD_EXTRA_FLAGS) -tags '$(GO_BUILD_TAGS)' -ldflags '$(GO_BUILD_LDFLAGS)' -gcflags '$(GO_BUILD_GCFLAGS)' -asmflags '$(GO_BUILD_ASMFLAGS)' -o $(BUILDBIN)/$@ ./cmd/$@
383+
go build $(GO_BUILD_FLAGS) $(GO_BUILD_EXTRA_FLAGS) -tags '$(GO_BUILD_TAGS),experimental' -ldflags '$(GO_BUILD_LDFLAGS)' -gcflags '$(GO_BUILD_GCFLAGS)' -asmflags '$(GO_BUILD_ASMFLAGS)' -o $(BUILDBIN)/$@ ./cmd/$@
384384

385385
.PHONY: build-deps
386386
build-deps: manifests generate fmt

api/v1/zz_generated.deepcopy.go

Lines changed: 5 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
resources:
22
- olm.operatorframework.io_clusterextensions.yaml
3+
- olm.operatorframework.io_clusterextensionrevisions.yaml
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.18.0
7+
olm.operatorframework.io/generator: experimental
8+
name: clusterextensionrevisions.olm.operatorframework.io
9+
spec:
10+
group: olm.operatorframework.io
11+
names:
12+
kind: ClusterExtensionRevision
13+
listKind: ClusterExtensionRevisionList
14+
plural: clusterextensionrevisions
15+
singular: clusterextensionrevision
16+
scope: Cluster
17+
versions:
18+
- name: v1
19+
schema:
20+
openAPIV3Schema:
21+
description: ClusterExtensionRevision is the Schema for the clusterextensionrevisions
22+
API
23+
properties:
24+
apiVersion:
25+
description: |-
26+
APIVersion defines the versioned schema of this representation of an object.
27+
Servers should convert recognized schemas to the latest internal value, and
28+
may reject unrecognized values.
29+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
30+
type: string
31+
kind:
32+
description: |-
33+
Kind is a string value representing the REST resource this object represents.
34+
Servers may infer this from the endpoint the client submits requests to.
35+
Cannot be updated.
36+
In CamelCase.
37+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
38+
type: string
39+
metadata:
40+
type: object
41+
spec:
42+
description: spec is an optional field that defines the desired state
43+
of the ClusterExtension.
44+
properties:
45+
lifecycleState:
46+
default: Active
47+
description: Specifies the lifecycle state of the ClusterExtensionRevision.
48+
enum:
49+
- Active
50+
- Paused
51+
- Archived
52+
type: string
53+
x-kubernetes-validations:
54+
- message: can not un-archive
55+
rule: oldSelf == 'Active' || oldSelf == 'Paused' || oldSelf == 'Archived'
56+
&& oldSelf == self
57+
phases:
58+
items:
59+
properties:
60+
name:
61+
type: string
62+
objects:
63+
items:
64+
properties:
65+
object:
66+
type: object
67+
x-kubernetes-embedded-resource: true
68+
x-kubernetes-preserve-unknown-fields: true
69+
required:
70+
- object
71+
type: object
72+
type: array
73+
slices:
74+
items:
75+
type: string
76+
type: array
77+
required:
78+
- name
79+
- objects
80+
type: object
81+
type: array
82+
x-kubernetes-validations:
83+
- message: phases is immutable
84+
rule: self == oldSelf || oldSelf.size() == 0
85+
previous:
86+
items:
87+
properties:
88+
name:
89+
type: string
90+
uid:
91+
description: |-
92+
UID is a type that holds unique ID values, including UUIDs. Because we
93+
don't ONLY use UUIDs, this is an alias to string. Being a type captures
94+
intent and helps make sure that UIDs and names do not get conflated.
95+
type: string
96+
required:
97+
- name
98+
- uid
99+
type: object
100+
type: array
101+
x-kubernetes-validations:
102+
- message: previous is immutable
103+
rule: self == oldSelf
104+
revision:
105+
format: int64
106+
type: integer
107+
x-kubernetes-validations:
108+
- message: revision is immutable
109+
rule: self == oldSelf
110+
required:
111+
- phases
112+
- revision
113+
type: object
114+
status:
115+
description: status is an optional field that defines the observed state
116+
of the ClusterExtension.
117+
properties:
118+
conditions:
119+
items:
120+
description: Condition contains details for one aspect of the current
121+
state of this API Resource.
122+
properties:
123+
lastTransitionTime:
124+
description: |-
125+
lastTransitionTime is the last time the condition transitioned from one status to another.
126+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
127+
format: date-time
128+
type: string
129+
message:
130+
description: |-
131+
message is a human readable message indicating details about the transition.
132+
This may be an empty string.
133+
maxLength: 32768
134+
type: string
135+
observedGeneration:
136+
description: |-
137+
observedGeneration represents the .metadata.generation that the condition was set based upon.
138+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
139+
with respect to the current state of the instance.
140+
format: int64
141+
minimum: 0
142+
type: integer
143+
reason:
144+
description: |-
145+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
146+
Producers of specific condition types may define expected values and meanings for this field,
147+
and whether the values are considered a guaranteed API.
148+
The value should be a CamelCase string.
149+
This field may not be empty.
150+
maxLength: 1024
151+
minLength: 1
152+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
153+
type: string
154+
status:
155+
description: status of the condition, one of True, False, Unknown.
156+
enum:
157+
- "True"
158+
- "False"
159+
- Unknown
160+
type: string
161+
type:
162+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
163+
maxLength: 316
164+
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])$
165+
type: string
166+
required:
167+
- lastTransitionTime
168+
- message
169+
- reason
170+
- status
171+
- type
172+
type: object
173+
type: array
174+
x-kubernetes-list-map-keys:
175+
- type
176+
x-kubernetes-list-type: map
177+
type: object
178+
type: object
179+
served: true
180+
storage: true
181+
subresources:
182+
status: {}

config/base/operator-controller/rbac/experimental/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ kind: Kustomization
33
namespace: olmv1-system
44
namePrefix: operator-controller-
55
resources:
6-
- ../common
7-
- role.yaml
6+
- ../common
7+
- role.yaml

config/base/operator-controller/rbac/experimental/role.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ rules:
2727
- apiGroups:
2828
- olm.operatorframework.io
2929
resources:
30-
- clusterextensions
30+
- clusterextensionrevisions
3131
verbs:
32+
- create
33+
- delete
3234
- get
3335
- list
3436
- patch
@@ -37,16 +39,28 @@ rules:
3739
- apiGroups:
3840
- olm.operatorframework.io
3941
resources:
42+
- clusterextensionrevisions/finalizers
4043
- clusterextensions/finalizers
4144
verbs:
4245
- update
4346
- apiGroups:
4447
- olm.operatorframework.io
4548
resources:
49+
- clusterextensionrevisions/status
4650
- clusterextensions/status
4751
verbs:
4852
- patch
4953
- update
54+
- apiGroups:
55+
- olm.operatorframework.io
56+
resources:
57+
- clusterextensions
58+
verbs:
59+
- get
60+
- list
61+
- patch
62+
- update
63+
- watch
5064
- apiGroups:
5165
- rbac.authorization.k8s.io
5266
resources:

config/samples/olm_v1_clusterextension.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ rules:
3333
resources: [clusterextensions/finalizers]
3434
verbs: [update]
3535
resourceNames: [argocd]
36+
# Allow ClusterExtensionRevisions to set blockOwnerDeletion ownerReferences
37+
- apiGroups: [olm.operatorframework.io]
38+
resources: [clusterextensionrevisions/finalizers]
39+
verbs: [update]
3640
# Manage ArgoCD CRDs
3741
- apiGroups: [apiextensions.k8s.io]
3842
resources: [customresourcedefinitions]

docs/api-reference/crd-ref-docs-gen-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
processor:
2-
ignoreTypes: []
2+
ignoreTypes: [ClusterExtensionRevision, ClusterExtensionRevisionList]
33
ignoreFields: []
44

55
render:

hack/tools/update-crds.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ set -e
77
# The names of the generated CRDs
88
CE="olm.operatorframework.io_clusterextensions.yaml"
99
CC="olm.operatorframework.io_clustercatalogs.yaml"
10+
CR="olm.operatorframework.io_clusterextensionrevisions.yaml"
1011

1112
# order for modules and crds must match
1213
# each item in crds must be unique, and should be associated with a module
13-
modules=("operator-controller" "catalogd")
14-
crds=("${CE}" "${CC}")
14+
modules=("operator-controller" "catalogd" "operator-controller")
15+
crds=("${CE}" "${CC}" "${CR}")
1516

1617
# Channels must much those in the generator
1718
channels=("standard" "experimental")

0 commit comments

Comments
 (0)