operator

command module
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

README

Instaclustr Operator

The Instaclustr Operator allows users to deploy, scale and manage any one of data layer technologies deployed on the Instaclustr platform from Kubernetes.

Description

The Instaclustr Operator provides all the same functionality as the Instaclustr API, Instaclustr Console and Instaclustr terraform provider.

  • Removes the need to write custom code integration directly with the Instaclustr API
  • Use of existing Instaclustr authentication methodologies
  • Declare Instaclustr infrastructure up front
  • Scale, modify and change Instaclustr infrastructure with existing Kubernetes management tools / workflows
  • Simplify Kubernetes native development workflow patterns (CI/CD integrations, production deployments etc).

C4 model diagrams

Context diagram Container diagram Component diagram
Context diagram Container diagram Component diagram
CRDs Relations
CRD Relations

Getting Started

You’ll need a Kubernetes cluster to run against. You can use KIND to get a local cluster for testing, or run against a remote cluster. Note: Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster kubectl cluster-info shows).

Running on the cluster
  1. Create the .env file, copy all content from the .env.tmpl and fill variables. When the operator deploys, it will create the secret from these variables to access the Instaclustr API. Create the config/manager/kustomization.yaml file and copy all content from the config/manager/kustomization.yaml.tmpl.

  2. Deploy the cert-manager:

make cert-deploy
  1. Build and push your image to the location specified by IMG:
make docker-build docker-push IMG=<some-registry>/operator:tag
  1. Deploy the controller to the cluster with the image specified by IMG:
make deploy IMG=<some-registry>/operator:tag
  1. Install needed instances of Custom Resources:
kubectl apply -f config/samples/<resource-group>/<resource-name.yaml>

NOTE: You can also run IMG=<some-registry>/operator:tag make to simply install the controller

Uninstall CRDs

To delete all CRDs from the cluster:

make uninstall
Undeploy controller

Undeploy the controller from the cluster:

make undeploy
Undeploy cert-manager

Undeploy the cert manager:

make cert-undeploy

Contributing

We welcome all contributors. Please see our public contributing guidelines.

How it works

This project aims to follow the Kubernetes Operator pattern

It uses Controllers which provides a reconcile function responsible for synchronizing resources untile the desired state is reached on the cluster

Test It Out
  1. Run the controller tests:
make test
Modifying the API definitions

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

make manifests

NOTE: Run make --help for more information on all potential make targets

More information can be found via the Kubebuilder Documentation

Support Contact

Please reach out to support@instaclustr.com for issues with this Instaclustr Operator. Please note that we've disabled the issues feature on this repository.

The support status of this project is available through https://www.instaclustr.com/support/documentation/announcements/instaclustr-open-source-project-status/.

License

Apache2 - See the included LICENSE file for more details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
apis
clusterresources/v1beta1
Package v1beta1 contains API Schema definitions for the clusterresources v1beta1 API group +kubebuilder:object:generate=true +groupName=clusterresources.instaclustr.com
Package v1beta1 contains API Schema definitions for the clusterresources v1beta1 API group +kubebuilder:object:generate=true +groupName=clusterresources.instaclustr.com
clusters/v1beta1
Package v1beta1 contains API Schema definitions for the clusters v1beta1 API group +kubebuilder:object:generate=true +groupName=clusters.instaclustr.com
Package v1beta1 contains API Schema definitions for the clusters v1beta1 API group +kubebuilder:object:generate=true +groupName=clusters.instaclustr.com
kafkamanagement/v1beta1
Package v1beta1 contains API Schema definitions for the kafkamanagement v1beta1 API group +kubebuilder:object:generate=true +groupName=kafkamanagement.instaclustr.com
Package v1beta1 contains API Schema definitions for the kafkamanagement v1beta1 API group +kubebuilder:object:generate=true +groupName=kafkamanagement.instaclustr.com
controllers
pkg
apiextensions
Package apiextensions provides helpers structs which can be used anywhere +kubebuilder:object:generate:=true
Package apiextensions provides helpers structs which can be used anywhere +kubebuilder:object:generate:=true
utils/dcomparison
Package dcomparison provides a solution for deeply comparing two maps, including their nested maps and slices.
Package dcomparison provides a solution for deeply comparing two maps, including their nested maps and slices.

Jump to

Keyboard shortcuts

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