Skip to content
This repository was archived by the owner on Aug 2, 2019. It is now read-only.

Commit f35a955

Browse files
committed
Update to work with latest OLM
1 parent 899678c commit f35a955

8 files changed

+86
-42
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,21 @@
33
To install the operators in your cluster running the
44
[OLM](https://github.com/operator-framework/operator-lifecycle-manager):
55

6-
$ kubectl apply -f https://raw.githubusercontent.com/openshift-cloud-functions/knative-operators/master/knative-operators.catalogsource.yaml
6+
# Namespace should be what the OLM catalog operator is watching
7+
$ kubectl apply -n operator-lifecycle-manager -f https://raw.githubusercontent.com/openshift-cloud-functions/knative-operators/master/knative-operators.catalogsource.yaml
78

89
To regenerate the `CatalogSource` and its associated `ConfigMap` from
910
the source files beneath [olm-catalog/](olm-catalog/):
1011

1112
$ ./etc/scripts/catalog.sh >knative-operators.catalogsource.yaml
13+
14+
To install everything on a fresh minishift:
15+
16+
$ ./etc/scripts/install-on-minishift.sh
17+
18+
To install everything on any OpenShift cluster:
19+
20+
$ oc login <<< with plenty of admin creds >>>
21+
$ export KUBE_SSH_USER=ec2-user
22+
$ export KUBE_SSH_KEY=~/.ssh/ocp-workshop.pem
23+
$ ./etc/scripts/install.sh

etc/scripts/installation-functions.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ function install_olm {
119119
oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:kube-system:default
120120

121121
# knative catalog source
122-
oc apply -f "$ROOT_DIR/knative-operators.catalogsource.yaml"
123-
oc apply -f "$ROOT_DIR/maistra-operators.catalogsource.yaml"
122+
local OLM_NS=$(grep "catalog_namespace:" "$OLM_DIR/deploy/okd/values.yaml" | awk '{print $2}')
123+
oc apply -f "$ROOT_DIR/knative-operators.catalogsource.yaml" -n "$OLM_NS"
124+
oc apply -f "$ROOT_DIR/maistra-operators.catalogsource.yaml" -n "$OLM_NS"
124125
}
125126

126127
function install_istio {

knative-operators.catalogsource.yaml

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -69,24 +69,6 @@ data:
6969
plural: clusterbuildtemplates
7070
scope: Cluster
7171
version: v1alpha1
72-
- apiVersion: apiextensions.k8s.io/v1beta1
73-
kind: CustomResourceDefinition
74-
metadata:
75-
name: images.caching.internal.knative.dev
76-
spec:
77-
group: caching.internal.knative.dev
78-
names:
79-
categories:
80-
- all
81-
- knative-internal
82-
- caching
83-
kind: Image
84-
plural: images
85-
shortNames:
86-
- img
87-
singular: image
88-
scope: Namespaced
89-
version: v1alpha1
9072
- apiVersion: apiextensions.k8s.io/v1beta1
9173
kind: CustomResourceDefinition
9274
metadata:
@@ -783,6 +765,16 @@ data:
783765
maturity: alpha
784766
replaces: knative-build.v0.1.2
785767
768+
installModes:
769+
- supported: true
770+
type: OwnNamespace
771+
- supported: true
772+
type: SingleNamespace
773+
- supported: true
774+
type: MultiNamespace
775+
- supported: true
776+
type: AllNamespaces
777+
786778
install:
787779
strategy: deployment
788780
spec:
@@ -1157,6 +1149,16 @@ data:
11571149
maturity: alpha
11581150
replaces: knative-eventing.v0.2.0
11591151
1152+
installModes:
1153+
- supported: true
1154+
type: OwnNamespace
1155+
- supported: true
1156+
type: SingleNamespace
1157+
- supported: true
1158+
type: MultiNamespace
1159+
- supported: true
1160+
type: AllNamespaces
1161+
11601162
install:
11611163
strategy: deployment
11621164
spec:
@@ -2282,6 +2284,16 @@ data:
22822284
maturity: alpha
22832285
replaces: knative-serving.v0.2.1
22842286
2287+
installModes:
2288+
- supported: true
2289+
type: OwnNamespace
2290+
- supported: true
2291+
type: SingleNamespace
2292+
- supported: true
2293+
type: MultiNamespace
2294+
- supported: true
2295+
type: AllNamespaces
2296+
22852297
install:
22862298
strategy: deployment
22872299
spec:

maistra-operators.catalogsource.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ kind: ConfigMap
22
apiVersion: v1
33
metadata:
44
name: maistra-operators
5-
namespace: openshift-operator-lifecycle-manager
65

76
data:
87
customResourceDefinitions: |-
@@ -36,6 +35,15 @@ data:
3635
links:
3736
- name: Documentation
3837
url: https://maistra.io
38+
installModes:
39+
- supported: true
40+
type: OwnNamespace
41+
- supported: true
42+
type: SingleNamespace
43+
- supported: true
44+
type: MultiNamespace
45+
- supported: true
46+
type: AllNamespaces
3947
install:
4048
strategy: deployment
4149
spec:
@@ -135,7 +143,6 @@ apiVersion: operators.coreos.com/v1alpha1
135143
kind: CatalogSource
136144
metadata:
137145
name: maistra-operators
138-
namespace: openshift-operator-lifecycle-manager
139146
spec:
140147
sourceType: internal
141148
configMap: maistra-operators

olm-catalog/knative-build.crd.yaml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
apiVersion: apiextensions.k8s.io/v1beta1
23
kind: CustomResourceDefinition
34
metadata:
@@ -63,22 +64,3 @@ spec:
6364
plural: clusterbuildtemplates
6465
scope: Cluster
6566
version: v1alpha1
66-
---
67-
apiVersion: apiextensions.k8s.io/v1beta1
68-
kind: CustomResourceDefinition
69-
metadata:
70-
name: images.caching.internal.knative.dev
71-
spec:
72-
group: caching.internal.knative.dev
73-
names:
74-
categories:
75-
- all
76-
- knative-internal
77-
- caching
78-
kind: Image
79-
plural: images
80-
shortNames:
81-
- img
82-
singular: image
83-
scope: Namespaced
84-
version: v1alpha1

olm-catalog/knative-build.v0.2.0.clusterserviceversion.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ spec:
1010
maturity: alpha
1111
replaces: knative-build.v0.1.2
1212

13+
installModes:
14+
- supported: true
15+
type: OwnNamespace
16+
- supported: true
17+
type: SingleNamespace
18+
- supported: true
19+
type: MultiNamespace
20+
- supported: true
21+
type: AllNamespaces
22+
1323
install:
1424
strategy: deployment
1525
spec:

olm-catalog/knative-eventing.v0.2.1.clusterserviceversion.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ spec:
1010
maturity: alpha
1111
replaces: knative-eventing.v0.2.0
1212

13+
installModes:
14+
- supported: true
15+
type: OwnNamespace
16+
- supported: true
17+
type: SingleNamespace
18+
- supported: true
19+
type: MultiNamespace
20+
- supported: true
21+
type: AllNamespaces
22+
1323
install:
1424
strategy: deployment
1525
spec:

olm-catalog/knative-serving.v0.2.2.clusterserviceversion.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ spec:
1010
maturity: alpha
1111
replaces: knative-serving.v0.2.1
1212

13+
installModes:
14+
- supported: true
15+
type: OwnNamespace
16+
- supported: true
17+
type: SingleNamespace
18+
- supported: true
19+
type: MultiNamespace
20+
- supported: true
21+
type: AllNamespaces
22+
1323
install:
1424
strategy: deployment
1525
spec:

0 commit comments

Comments
 (0)