Skip to content
This repository has been archived by the owner on Sep 4, 2023. It is now read-only.

Commit

Permalink
OLM metadata fixes knative#261 (knative#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
aliok authored and knative-prow-robot committed Jan 23, 2020
1 parent 4ef2e1b commit 68d322f
Show file tree
Hide file tree
Showing 6 changed files with 472 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Temporary Build Files
build/_output
build/_test
# Scratch dir used by hack/generate-olm-catalog-source.sh
.crds/
# Goland
.idea

Expand Down
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,39 @@ output of the above `ko publish` command.
The image should match what's in [config/operator.yaml](config/operator.yaml)
and the `$VERSION` should match [version.go](version/version.go) and correspond
to the contents of [config/](config/).

## Operator Lifecycle Manager and OperatorHub

Knative Serving operator has the metadata in Operator Lifecycle Manager (OLM)
checked in at `deploy/olm-catalog`. Files in there are for reference purposes
and also for testing and tooling.

In order to install the operator `CatalogSource` to a
[cluster with OLM](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/install/install.md),
run these commands:

```
OLM_NS=$(kubectl get deploy --all-namespaces | grep olm-operator | awk '{print $1}')
./hack/generate-olm-catalog-source.sh | kubectl apply -n $OLM_NS -f -
```

Then install the operator by creating a subscription:

```
OLM_NS=$(kubectl get operatorgroups --all-namespaces | grep olm-operators | awk '{print $1}')
OPERATOR_NS=$(kubectl get operatorgroups --all-namespaces | grep global-operators | awk '{print $1}')
cat <<-EOF | kubectl apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: knative-serving-operator-sub
generateName: knative-serving-operator-
namespace: $OPERATOR_NS
spec:
source: knative-serving-operator
sourceNamespace: $OLM_NS
name: knative-serving-operator
channel: alpha
EOF
```
Loading

0 comments on commit 68d322f

Please sign in to comment.