operator

module
v0.0.0-...-de9510f Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: Apache-2.0

README

operator

// TODO(user): Add simple overview of use/purpose

Description

// TODO(user): An in-depth paragraph about your project and overview of use

Getting Started

Prerequisites
  • go version v1.24.0+
  • docker version 17.03+.
  • kubectl version v1.11.3+.
  • Access to a Kubernetes v1.11.3+ cluster.
To Deploy on the cluster

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

make docker-build docker-push IMG=<some-registry>/operator:tag

NOTE: This image ought to be published in the personal registry you specified. And it is required to have access to pull the image from the working environment. Make sure you have the proper permission to the registry if the above commands don’t work.

Install the CRDs into the cluster:

make install

Deploy the Manager to the cluster with the image specified by IMG:

make deploy IMG=<some-registry>/operator:tag

NOTE: If you encounter RBAC errors, you may need to grant yourself cluster-admin privileges or be logged in as admin.

Create instances of your solution You can apply the samples (examples) from the config/sample:

kubectl apply -k config/samples/

NOTE: Ensure that the samples has default values to test it out.

To Uninstall

Delete the instances (CRs) from the cluster:

kubectl delete -k config/samples/

Delete the APIs(CRDs) from the cluster:

make uninstall

UnDeploy the controller from the cluster:

make undeploy

Project Distribution

Following the options to release and provide this solution to the users.

By providing a bundle with all YAML files
  1. Build the installer for the image built and published in the registry:
make build-installer IMG=<some-registry>/operator:tag

NOTE: The makefile target mentioned above generates an 'install.yaml' file in the dist directory. This file contains all the resources built with Kustomize, which are necessary to install this project without its dependencies.

  1. Using the installer

Users can just run 'kubectl apply -f ' to install the project, i.e.:

kubectl apply -f https://raw.githubusercontent.com/<org>/operator/<tag or branch>/dist/install.yaml
By providing a Helm Chart
  1. Build the chart using the optional helm plugin
kubebuilder edit --plugins=helm/v1-alpha
  1. See that a chart was generated under 'dist/chart', and users can obtain this solution from there.

NOTE: If you change the project, you need to update the Helm Chart using the same command above to sync the latest changes. Furthermore, if you create webhooks, you need to use the above command with the '--force' flag and manually ensure that any custom configuration previously added to 'dist/chart/values.yaml' or 'dist/chart/manager/manager.yaml' is manually re-applied afterwards.

Contributing

// TODO(user): Add detailed information on how you would like others to contribute to this project

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

More information can be found via the Kubebuilder Documentation

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the klio v1alpha1 API group.
Package v1alpha1 contains API Schema definitions for the klio v1alpha1 API group.
Package main is the entry point for the operator command-line interface (CLI).
Package main is the entry point for the operator command-line interface (CLI).
internal
cnpgi
Package cnpgi provides the implementation of the CNPG-I interfaces for the operator.
Package cnpgi provides the implementation of the CNPG-I interfaces for the operator.
controller
Package controller provides the implementation of the operator's controller logic.
Package controller provides the implementation of the operator's controller logic.
discovery
Package discovery provides cluster capability detection utilities.
Package discovery provides cluster capability detection utilities.
klioconfig
Package klioconfig provides shared configuration logic for building and managing Klio config data across the operator and reconcilers.
Package klioconfig provides shared configuration logic for building and managing Klio config data across the operator and reconcilers.
opentelemetry
Package opentelemetry provides OpenTelemetry instrumentation for the operator.
Package opentelemetry provides OpenTelemetry instrumentation for the operator.
podtemplate
Package podtemplate contain the code needed to merge two Pod templates allowing the user to override how we generate Pods
Package podtemplate contain the code needed to merge two Pod templates allowing the user to override how we generate Pods
pkg
config
Package config contains the configuration data structure and the relative helpers
Package config contains the configuration data structure and the relative helpers
test
klio/conditions
Package conditions provides utilities for defining and evaluating test conditions in Klio integration tests.
Package conditions provides utilities for defining and evaluating test conditions in Klio integration tests.
klio/features
Package features provides Klio-specific test feature implementations.
Package features provides Klio-specific test feature implementations.
klio/infra
Package infra provides Klio-specific test infrastructure utilities.
Package infra provides Klio-specific test infrastructure utilities.
klio/testconfig
Package testconfig loads e2e test configuration from a YAML file.
Package testconfig loads e2e test configuration from a YAML file.
machinery/pkg/conditions
Package conditions provides utilities for defining and evaluating test conditions in integration tests.
Package conditions provides utilities for defining and evaluating test conditions in integration tests.
machinery/pkg/features
Package features provides test feature implementations for integration testing.
Package features provides test feature implementations for integration testing.
machinery/pkg/namespaces
Package namespaces provides helpers to inspect the objects living in a Kubernetes namespace during e2e tests.
Package namespaces provides helpers to inspect the objects living in a Kubernetes namespace during e2e tests.
machinery/pkg/pods
Package pods provides utilities for working with Kubernetes pods in e2e tests.
Package pods provides utilities for working with Kubernetes pods in e2e tests.
machinery/pkg/postgres
Package postgres provides utilities to interact with a PostgreSQL database.
Package postgres provides utilities to interact with a PostgreSQL database.
machinery/pkg/runner
Package runner provides functionality to run registered features in a test environment.
Package runner provides functionality to run registered features in a test environment.
utils/conditions
Package conditions provides utilities for working with conditions in Kubernetes resources.
Package conditions provides utilities for working with conditions in Kubernetes resources.
utils/metrics
Package metrics provides utilities for parsing and validating telemetry metrics in e2e tests.
Package metrics provides utilities for parsing and validating telemetry metrics in e2e tests.
utils/mutators
Package mutators provides recovery cluster mutator functions for E2E tests.
Package mutators provides recovery cluster mutator functions for E2E tests.
utils/templates
Package templates provides a parent package for organizing test resource templates.
Package templates provides a parent package for organizing test resource templates.
utils/templates/certificates
Package certificates provides utilities for working with certificates in Kubernetes.
Package certificates provides utilities for working with certificates in Kubernetes.
utils/templates/cnpg
Package cnpg contains template functions for creating CloudNativePG test resources.
Package cnpg contains template functions for creating CloudNativePG test resources.
utils/templates/klio
Package klio contains template functions for creating Klio-related test resources.
Package klio contains template functions for creating Klio-related test resources.
utils/templates/otel
Package otel provides templates for OpenTelemetry resources in e2e tests.
Package otel provides templates for OpenTelemetry resources in e2e tests.
utils/templates/rustfs
Package rustfs contains factory functions for creating RustFS Kubernetes resources for e2e testing.
Package rustfs contains factory functions for creating RustFS Kubernetes resources for e2e testing.
utils/templates/secrets
Package secrets provides utilities for working with secrets in Kubernetes.
Package secrets provides utilities for working with secrets in Kubernetes.

Jump to

Keyboard shortcuts

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