Skip to content

Commit e2b30f9

Browse files
committed
(fix) Admission Webhook names must be unique
Problem: OLM currently creates all ValidatingWebhookConfigurations and MutatingWebhookConfigurations using the name provided in the WebhookDescription. This causes an issue when an operator that defines an admission webhook in the CSV is installed in multiple namespaces, causes the two operators to fight over the admission webhook. Solution: Generate a unique name for each webhook using the GenerateName field in the Object Metadata.
1 parent a947685 commit e2b30f9

File tree

68 files changed

+36957
-12060
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+36957
-12060
lines changed

deploy/chart/crds/0000_50_olm_00-catalogsources.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.2.8
5+
controller-gen.kubebuilder.io/version: v0.3.0
66
creationTimestamp: null
77
name: catalogsources.operators.coreos.com
88
spec:

deploy/chart/crds/0000_50_olm_00-clusterserviceversions.yaml

Lines changed: 37 additions & 64 deletions
Large diffs are not rendered by default.

deploy/chart/crds/0000_50_olm_00-installplans.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.2.8
5+
controller-gen.kubebuilder.io/version: v0.3.0
66
creationTimestamp: null
77
name: installplans.operators.coreos.com
88
spec:

deploy/chart/crds/0000_50_olm_00-operatorgroups.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.2.8
5+
controller-gen.kubebuilder.io/version: v0.3.0
66
creationTimestamp: null
77
name: operatorgroups.operators.coreos.com
88
spec:

deploy/chart/crds/0000_50_olm_00-subscriptions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.2.8
5+
controller-gen.kubebuilder.io/version: v0.3.0
66
creationTimestamp: null
77
name: subscriptions.operators.coreos.com
88
spec:
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
---
2+
# Source: olm/crds/0000_50_olm_00-catalogsources.yaml
3+
apiVersion: apiextensions.k8s.io/v1
4+
kind: CustomResourceDefinition
5+
metadata:
6+
annotations:
7+
controller-gen.kubebuilder.io/version: v0.3.0
8+
creationTimestamp: null
9+
name: catalogsources.operators.coreos.com
10+
spec:
11+
group: operators.coreos.com
12+
names:
13+
categories:
14+
- olm
15+
kind: CatalogSource
16+
listKind: CatalogSourceList
17+
plural: catalogsources
18+
shortNames:
19+
- catsrc
20+
singular: catalogsource
21+
scope: Namespaced
22+
versions:
23+
- additionalPrinterColumns:
24+
- description: The pretty name of the catalog
25+
jsonPath: .spec.displayName
26+
name: Display
27+
type: string
28+
- description: The type of the catalog
29+
jsonPath: .spec.sourceType
30+
name: Type
31+
type: string
32+
- description: The publisher of the catalog
33+
jsonPath: .spec.publisher
34+
name: Publisher
35+
type: string
36+
- jsonPath: .metadata.creationTimestamp
37+
name: Age
38+
type: date
39+
name: v1alpha1
40+
schema:
41+
openAPIV3Schema:
42+
description: CatalogSource is a repository of CSVs, CRDs, and operator packages.
43+
type: object
44+
required:
45+
- metadata
46+
- spec
47+
properties:
48+
apiVersion:
49+
description: 'APIVersion defines the versioned schema of this representation
50+
of an object. Servers should convert recognized schemas to the latest
51+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
52+
type: string
53+
kind:
54+
description: 'Kind is a string value representing the REST resource this
55+
object represents. Servers may infer this from the endpoint the client
56+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
57+
type: string
58+
metadata:
59+
type: object
60+
spec:
61+
type: object
62+
required:
63+
- sourceType
64+
properties:
65+
address:
66+
description: 'Address is a host that OLM can use to connect to a pre-existing
67+
registry. Format: <registry-host or ip>:<port> Only used when SourceType
68+
= SourceTypeGrpc. Ignored when the Image field is set.'
69+
type: string
70+
configMap:
71+
description: ConfigMap is the name of the ConfigMap to be used to
72+
back a configmap-server registry. Only used when SourceType = SourceTypeConfigmap
73+
or SourceTypeInternal.
74+
type: string
75+
description:
76+
type: string
77+
displayName:
78+
description: Metadata
79+
type: string
80+
icon:
81+
type: object
82+
required:
83+
- base64data
84+
- mediatype
85+
properties:
86+
base64data:
87+
type: string
88+
mediatype:
89+
type: string
90+
image:
91+
description: Image is an operator-registry container image to instantiate
92+
a registry-server with. Only used when SourceType = SourceTypeGrpc.
93+
If present, the address field is ignored.
94+
type: string
95+
publisher:
96+
type: string
97+
secrets:
98+
description: Secrets represent set of secrets that can be used to
99+
access the contents of the catalog. It is best to keep this list
100+
small, since each will need to be tried for every catalog entry.
101+
type: array
102+
items:
103+
type: string
104+
sourceType:
105+
description: SourceType is the type of source
106+
type: string
107+
updateStrategy:
108+
description: UpdateStrategy defines how updated catalog source images
109+
can be discovered Consists of an interval that defines polling duration
110+
and an embedded strategy type
111+
type: object
112+
properties:
113+
registryPoll:
114+
type: object
115+
properties:
116+
interval:
117+
description: Interval is used to determine the time interval
118+
between checks of the latest catalog source version. The
119+
catalog operator polls to see if a new version of the catalog
120+
source is available. If available, the latest image is pulled
121+
and gRPC traffic is directed to the latest catalog source.
122+
type: string
123+
status:
124+
type: object
125+
properties:
126+
configMapReference:
127+
type: object
128+
required:
129+
- name
130+
- namespace
131+
properties:
132+
lastUpdateTime:
133+
type: string
134+
format: date-time
135+
name:
136+
type: string
137+
namespace:
138+
type: string
139+
resourceVersion:
140+
type: string
141+
uid:
142+
description: UID is a type that holds unique ID values, including
143+
UUIDs. Because we don't ONLY use UUIDs, this is an alias to
144+
string. Being a type captures intent and helps make sure that
145+
UIDs and names do not get conflated.
146+
type: string
147+
connectionState:
148+
type: object
149+
required:
150+
- lastObservedState
151+
properties:
152+
address:
153+
type: string
154+
lastConnect:
155+
type: string
156+
format: date-time
157+
lastObservedState:
158+
type: string
159+
latestImageRegistryPoll:
160+
description: The last time the CatalogSource image registry has been
161+
polled to ensure the image is up-to-date
162+
type: string
163+
format: date-time
164+
message:
165+
description: A human readable message indicating details about why
166+
the CatalogSource is in this condition.
167+
type: string
168+
reason:
169+
description: Reason is the reason the CatalogSource was transitioned
170+
to its current state.
171+
type: string
172+
registryService:
173+
type: object
174+
properties:
175+
createdAt:
176+
type: string
177+
format: date-time
178+
port:
179+
type: string
180+
protocol:
181+
type: string
182+
serviceName:
183+
type: string
184+
serviceNamespace:
185+
type: string
186+
served: true
187+
storage: true
188+
subresources:
189+
status: {}
190+
status:
191+
acceptedNames:
192+
kind: ""
193+
plural: ""
194+
conditions: []
195+
storedVersions: []
196+

0 commit comments

Comments
 (0)