Closed errordeveloper closed 4 years ago
So it looks like adding Subscription
and OperatorGroup
to manifests dir during installation works just fine (hence bff9bc912c48ee479b30572fd0e648d716dfabd1 & 79476d859ebe1d3fea50d015ddb3ef8d504d94cf).
The OperatorGroup
is merely required to declare presence of an operator. The Subscription
is needed to define where to locate the operator, it's fine to create a subscription without the operator being published. It would just fail to resolve it initially a set conditions accordingly (see below).
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
creationTimestamp: "2020-10-23T10:04:32Z"
generation: 1
name: cilium-olm
namespace: cilium-olm
resourceVersion: "17276"
selfLink: /apis/operators.coreos.com/v1alpha1/namespaces/cilium-olm/subscriptions/cilium-olm
uid: 108e2a18-f711-487e-8a73-da1cebd6a1c3
spec:
channel: stable
installPlanApproval: Automatic
name: cilium-olm
source: certified-operators
sourceNamespace: openshift-marketplace
startingCSV: cilium.v1.8.5
status:
catalogHealth:
- catalogSourceRef:
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
name: community-operators
namespace: openshift-marketplace
resourceVersion: "17274"
uid: d1f6339f-6e58-4dc7-b101-a236390cd1e4
healthy: true
lastUpdated: "2020-10-23T10:19:14Z"
conditions:
- lastTransitionTime: "2020-10-23T10:19:14Z"
message: targeted catalogsource openshift-marketplace/certified-operators missing
reason: UnhealthyCatalogSourceFound
status: "True"
type: CatalogSourcesUnhealthy
lastUpdated: "2020-10-23T10:19:14Z"
New questions:
Failed: OwnNamespace InstallModeType not supported, cannot configure to watch own namespace
Let's assume that adding CSV manifest during the installation is the right thing to do (2c394a85ba5c2b9c96f75a468c5f89e2a47d63ea & 6ba48740feddb828f4ee0785d58f87c917e55f77). Also, per documentation, the CSV should be in the same namespaces as OG and using OwnNamespace
and SingleNamespace
install modes appears to make errors go away (hence 890bb24c4dfba4d8d73802f1dc7637323faf6ed9), albeit it's not entirely logical or representative of the end result.
Looks like use of cilium
and cilium-olm
was the cause of the issue with OLM, having flattened everything into one cilium
namespace (758871b26e73502d87fdd8e43cba74144c69f7ab) and fixed leader election role (78a733c58a02c6224748adbd8bc5f2d549a8e3b3), OLM appears to be happy with our CSV:
$ kubectl get csv -n cilium cilium.v1.9.0-rc2
NAME DISPLAY VERSION REPLACES PHASE
cilium.v1.9.0-rc2 Cilium 1.9.0-rc2 Succeeded
Right now the operator has manifests and a CSV, but after installing from manifests it will automatically move into OLM's realm. It needs to have
OperatorGroup
andSubscription
resources for that.What is not clear yes this:
Subscription
require the operator to be on OperatorHub?startingCSV
, but how is that meant to be linked?Subscription
andOperatorGroup
?Subscription
andOperatorGroup
be passed toopenshift-install
, or these must be to added to the cluster once it's installed?