eventing-operator

module
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2019 License: Apache-2.0

README

Knative Eventing Operator

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: Eventing
metadata:
  name: knative-eventing
  namespace: knative-eventing
EOF

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

The Eventing Custom Resource

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

The following are all equivalent:

kubectl get eventings.operator.knative.dev -oyaml
kubectl get eventing -oyaml

To uninstall Knative Eventing, simply delete the Eventing resource.

kubectl delete ke --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).

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

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

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/.

Directories

Path Synopsis
cmd
pkg
apis/eventing/v1alpha1
Package v1alpha1 contains API Schema definitions for the eventing v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=operator.knative.dev Copyright 2019 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
Package v1alpha1 contains API Schema definitions for the eventing v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=operator.knative.dev Copyright 2019 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/eventing/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/eventing/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
e2e

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL