eventing-manager

module
v0.0.0-...-a7b4c27 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0

README

Eventing Manager

Status

REUSE status

GitHub tag checks state

Overview

Eventing Manager is a standard Kubernetes operator that observes the state of Eventing resources and reconciles their state according to the desired state. It uses Controllers, which provide a reconcile function responsible for synchronizing resources until the desired state is reached in the cluster.

This project is scaffolded using Kubebuilder.

Get Started

You need a Kubernetes cluster to run against. You can use k3d to get a local cluster for testing, or run against a remote cluster.

[!NOTE] Your controller automatically uses the current context in your kubeconfig file, that is, whatever cluster kubectl cluster-info shows.

Install

  1. To install the latest version of the Eventing Manager in your cluster, run:

    kubectl apply -f https://github.com/kyma-project/eventing-manager/releases/latest/download/eventing-manager.yaml
    
  2. To install the latest version of the default Eventing custom resource (CR) in your cluster, run:

    kubectl apply -f https://github.com/kyma-project/eventing-manager/releases/latest/download/eventing-default-cr.yaml
    

Development

Prerequisites
Run Eventing Manager Locally
  1. Install the CRDs into the cluster:

    make install
    
  2. Run Eventing Manager. It runs in the foreground, so if you want to leave it running, switch to a new terminal.

    make run
    

[!NOTE] You can also run this in one step with the command: make install run.

Run Tests

Run the unit and integration tests:

make generate-and-test
Linting
  1. Fix common lint issues:

    make imports
    make fmt
    make lint
    
Modify the API Definitions

If you are editing the API definitions, generate the manifests such as CRs or CRDs:

make manifests

[!NOTE] Run make --help for more information on all potential make targets.

For more information, see the Kubebuilder documentation.

Build Container Images

Build and push your image to the location specified by IMG:

make docker-build docker-push IMG=<container-registry>/eventing-manager:<tag> # If using docker, <container-registry> is your username.

NOTE: For MacBook M1 devices, run:

make docker-buildx IMG=<container-registry>/eventing-manager:<tag>

Deployment

You need a Kubernetes cluster to run against. You can use k3d to get a local cluster for testing, or run against a remote cluster.

[!NOTE] Your controller automatically uses the current context in your kubeconfig file, that is, whatever cluster kubectl cluster-info shows.

Deploy in the Cluster
  1. Download Go packages:

    go mod vendor && go mod tidy
    
  2. Install the CRDs to the cluster:

    make install
    
  3. Build and push your image to the location specified by IMG:

    make docker-build docker-push IMG=<container-registry>/eventing-manager:<tag>
    
  4. Deploy the eventing-manager controller to the cluster:

    make deploy IMG=<container-registry>/eventing-manager:<tag>
    
  5. [Optional] Install Eventing Custom Resource:

    kubectl apply -f config/samples/default.yaml
    
  6. For EventMesh backend, if the Kyma Kubernetes cluster is managed by Gardener, then the Eventing Manager reads the cluster public domain from the ConfigMap kube-system/shoot-info. Otherwise, set the spec.backend.config.domain to the cluster public domain in the eventing custom resource; for example:

    spec:
      backend:
        type: "EventMesh"
        config:
          domain: "example.domain.com"
          eventMeshSecret: "kyma-system/eventing-backend"
          eventTypePrefix: "sap.kyma.custom"
    
Undeploy Eventing Manager

Undeploy Eventing Manager from the cluster:

make undeploy
Uninstall CRDs

To delete the CRDs from the cluster:

make uninstall

End-to-End Tests

See hack/e2e/README.md

Contributing

See CONTRIBUTING.md

Code of Conduct

See CODE_OF_CONDUCT.md

Licensing

See the License file

Directories

Path Synopsis
api
eventing/v1alpha2
Package v1alpha2 contains API Schema definitions for the eventing v1alpha2 API group.
Package v1alpha2 contains API Schema definitions for the eventing v1alpha2 API group.
operator/v1alpha1
Package v1alpha1 contains API Schema definitions for the operator v1alpha1 API group +kubebuilder:object:generate=true +groupName=operator.kyma-project.io
Package v1alpha1 contains API Schema definitions for the operator v1alpha1 API group +kubebuilder:object:generate=true +groupName=operator.kyma-project.io
hack
internal
pkg
cloudevent
Package cloudevent provides an abstraction over the cloudvent sdk.
Package cloudevent provides an abstraction over the cloudvent sdk.
env
k8s

Jump to

Keyboard shortcuts

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