Git Product home page Git Product logo

eventing-operator's Introduction

Knative Eventing Operator

Go Report Card Releases LICENSE Slack Status

Knative Eventing Operator is a project aiming to deploy and manage Knative Eventing in an automated way.

The following steps will install Knative Eventing and configure it appropriately for your cluster in the knative-eventing namespace. Please make sure the prerequisites are installed first.

  1. Install the operator

    To install from source code, run the command:

    ko apply -f config/
    

    To install from an existing image, change the value of image into quay.io/openshift-knative/knative-eventing-operator:v0.6.0 or any other valid operator image in the file config/operator.yaml, and run the following command:

    kubectl apply -f config/
    
  2. Install the Eventing custom resource

cat <<-EOF | kubectl apply -f -
apiVersion: v1
kind: Namespace
metadata:
 name: knative-eventing
---
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeEventing
metadata:
  name: knative-eventing
  namespace: knative-eventing
EOF

Please refer to Building the Operator Image to build your own image.

Prerequisites

  • ko

    Install ko with the following command, if it is not available on your machine:

    go get -u github.com/google/ko/cmd/ko
    

The KnativeEventing Custom Resource

The installation of Knative Eventing is triggered by the creation of a KnativeEventing custom resource (CR) as defined by this CRD. The operator will deploy Knative Eventing in the same namespace containing the KnativeEventing CR, and this CR will trigger the installation, reconfiguration, or removal of the knative eventing resources.

The following are all equivalent:

kubectl get knativeeventings.operator.knative.dev
kubectl get knativeeventing

To uninstall Knative Eventing, simply delete the KnativeEventing resource.

kubectl delete knativeeventings --all

Pass --help for further details on the various subcommands

Building the Operator Image

To build the operator with ko, configure your an environment variable KO_DOCKER_REPO as the docker repository to which developer images should be pushed (e.g. gcr.io/[gcloud-project], docker.io/[username], quay.io/[repo-name], etc).

Then, build the operator image:

ko publish knative.dev/eventing-operator/cmd/manager -t $VERSION

You need to access the image by the name KO_DOCKER_REPO/manager-[md5]:$VERSION, which you are able to find in the output of the above ko publish command.

The image should match what's in config/operator.yaml and the $VERSION should match version.go and correspond to the contents of config/.

Upgrade

Please refer to the upgrade guide for a safe upgrade process.

Operator Lifecycle Manager and OperatorHub

Knative Eventing 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, 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-eventing-operator-sub
  generateName: knative-eventing-operator-
  namespace: $OPERATOR_NS
spec:
  source: knative-eventing-operator
  sourceNamespace: $OLM_NS
  name: knative-eventing-operator
  channel: alpha
EOF

eventing-operator's People

Contributors

adrcunha avatar aliok avatar cardil avatar chaodaig avatar jcrossley3 avatar k4leung4 avatar knative-prow-robot avatar mattmoor avatar matzew avatar n3wscott avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.