operator

command
v2.34.0 Latest Latest
Warning

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

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

README

Aperture Operator

This document is an overview of how the operator works from a user perspective.

Introduction

The operator is used to deploy the Aperture Agent, Controller and its required resources on the Kubernetes.

Custom Resources

The operator has below custom resources:

  • Agent
  • Controller
  • Policy

all custom resources use the api group fluxninja.com and version v1alpha1.

Deploying the operator using make

Follow the below steps to deploy the operator on the local cluster:

  • Create Docker image for the operator:

    make operator-docker-build
    
  • [Optional] If you are using Kind cluster, upload the image to the cluster:

    kind load docker-image aperture-operator:latest
    
  • Deploy the operator and its required resources:

    make operator-deploy
    
  • [Optional] Run the sample CR to deploy the Aperture Agent and Controller

    kubectl apply -f config/samples/fluxninja.com_v1alpha1_agent.yaml
    kubectl apply -f config/samples/fluxninja.com_v1alpha1_controller.yaml
    kubectl apply -f config/samples/fluxninja.com_v1alpha1_policy.yaml
    
  • To uninstall the operator, run below commands:

    kubectl delete -f config/samples/fluxninja.com_v1alpha1_agent.yaml
    kubectl delete -f config/samples/fluxninja.com_v1alpha1_controller.yaml
    kubectl delete -f config/samples/fluxninja.com_v1alpha1_policy.yaml
    make operator-undeploy
    

Deploying the operator using helm

You can also deploy the operator and Agent CR using the helm chart as well using below steps.

  • Install the dependencies of the chart:

    helm dependency build manifests/charts/aperture-controller
    helm dependency build manifests/charts/aperture-agent
    
  • Configure Etcd configuration for Agent by modifying the Aperture Agent chart as below if you are installing the Aperture Controller chart as well:

    agent:
      config:
        etcd:
          endpoints: ["http://controller-etcd:2379"]
        prometheus:
          address: "http://controller-prometheus-server:80"
    
  • Install or upgrade the chart:

    helm upgrade --install controller manifests/charts/aperture-controller
    helm upgrade --install agent manifests/charts/aperture-agent
    
  • [Optional] If you want to install just the operator and not the Aperture Agent and Controller CR, create a values.yaml with below parameters and pass it with helm upgrade:

    agent:
      create: false
    
    controller:
      create: false
    
    helm upgrade --install controller manifests/charts/aperture-controller -f controller-values.yaml
    helm upgrade --install agent manifests/charts/aperture-agent -f agent-values.yaml
    

    All the configurable parameters for the Aperture Operator and CR can be found at Agent. and Controller

  • The Controller chart installs Prometheus and Etcd instances by default. If you do not want to install and use your existing instances of Prometheus or Etcd, configure below values in the values.yaml file and pass it with helm upgrade:

    controller:
      config:
        etcd:
          endpoints: ["ETCD_ENDPOINT"]
        prometheus:
          address: "PROMETHEUS_ENDPOINT"
    
    etcd:
      enabled: false
    
    prometheus:
      enabled: false
    
    agent:
      config:
        etcd:
          endpoints: ["ETCD_ENDPOINT"]
        prometheus:
          address: "PROMETHEUS_ENDPOINT"
    
  • To uninstall the operator, run below commands:

    helm uninstall controller
    helm uninstall agent
    

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group
agent/v1alpha1
+kubebuilder:object:generate=true +groupName=fluxninja.com
+kubebuilder:object:generate=true +groupName=fluxninja.com
common
+kubebuilder:object:generate=true
+kubebuilder:object:generate=true
controller/v1alpha1
+kubebuilder:object:generate=true +groupName=fluxninja.com
+kubebuilder:object:generate=true +groupName=fluxninja.com
policy/v1alpha1
+kubebuilder:object:generate=true +groupName=fluxninja.com
+kubebuilder:object:generate=true +groupName=fluxninja.com

Jump to

Keyboard shortcuts

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