Skip to content
This repository was archived by the owner on Jun 24, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -142,3 +142,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