metacontroller

by sebastien-prudhomme

Helm chartv1.2.2App 2.1.1MITVerified publisher

Add-on for Kubernetes that makes it easy to write and deploy custom controllers

About this chart

Metacontroller

Metacontroller is an add-on for Kubernetes that makes it easy to write and deploy custom controllers.

DISCLAIMER: This is an unofficial chart not supported by Metacontroller authors.

TL;DR;

$ helm repo add cowboysysop https://cowboysysop.github.io/charts/
$ helm install my-release cowboysysop/metacontroller

Introduction

This chart bootstraps a Metacontroller deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes >= 1.19
  • Helm >= 3.1

Installing

Install the chart using:

$ helm repo add cowboysysop https://cowboysysop.github.io/charts/
$ helm install my-release cowboysysop/metacontroller

These commands deploy Metacontroller on the Kubernetes cluster in the default configuration and with the release name my-release. The deployment configuration can be customized by specifying the customization parameters with the helm install command using the --values or --set arguments. Find more information in the configuration section of this document.

Upgrading

Replace the custom resource definitions created by the chart using:

kubectl replace -f crds/compositecontroller.yaml
kubectl replace -f crds/controllerrevision.yaml
kubectl replace -f crds/decoratorcontroller.yaml

Upgrade the chart deployment using:

$ helm upgrade my-release cowboysysop/metacontroller

The command upgrades the existing my-release deployment with the most latest release of the chart.

TIP: Use helm repo update to update information on available charts in the chart repositories.

Uninstalling

Uninstall the my-release deployment using:

$ helm uninstall my-release

The command deletes the release named my-release and frees all the kubernetes resources associated with the release.

TIP: Specify the --purge argument to the above command to remove the release from the store and make its name free for later use.

Optionally, delete the custom resource definitions created by the chart using:

WARNING: It will also try to delete all instances of the custom resource definitions.

$ kubectl delete crd compositecontrollers.metacontroller.k8s.io
$ kubectl delete crd controllerrevisions.metacontroller.k8s.io
$ kubectl delete crd decoratorcontrollers.metacontroller.k8s.io

Configuration

The following tables lists all the configurable parameters expose by the chart and their default values.

Common parameters

NameDescriptionDefault
kubeVersionOverride Kubernetes version""
imagePullSecretsDocker registry secret names as an array[]
nameOverridePartially override metacontroller.fullname template with a string (will prepend the release name)nil
fullnameOverrideFully override metacontroller.fullname template with a stringnil
commonAnnotationsAnnotations to add to all deployed objects{}
commonLabelsLabels to add to all deployed objects{}
extraDeployArray of extra objects to deploy with the release[]

Parameters

NameDescriptionDefault
replicaCountNumber of replicas1
image.repositoryImage namemetacontrollerio/metacontroller
image.tagImage tagv2.1.1
image.pullPolicyImage pull policyIfNotPresent
pdb.createSpecifies whether a pod disruption budget should be createdfalse
pdb.minAvailableMinimum number/percentage of pods that should remain scheduled1
pdb.maxUnavailableMaximum number/percentage of pods that may be made unavailablenil
serviceAccount.createSpecify whether to create a ServiceAccounttrue
serviceAccount.annotationsServiceAccount annotations{}
serviceAccount.nameThe name of the ServiceAccount to createGenerated using the metacontroller.fullname template
podAnnotationsAdditional pod annotations{}
podLabelsAdditional pod labels{}
podSecurityContextPod security context{}
priorityClassNamePriority class namenil
securityContextContainer security context{}
livenessProbe.enabledEnable liveness probetrue
livenessProbe.initialDelaySecondsDelay before the liveness probe is initiated0
livenessProbe.periodSecondsHow often to perform the liveness probe10
livenessProbe.timeoutSecondsWhen the liveness probe times out1
livenessProbe.failureThresholdMinimum consecutive failures for the liveness probe to be considered failed after having succeeded3
livenessProbe.successThresholdMinimum consecutive successes for the liveness probe to be considered successful after having failed1
readinessProbe.enabledEnable readiness probetrue
readinessProbe.initialDelaySecondsDelay before the readiness probe is initiated0
readinessProbe.periodSecondsHow often to perform the readiness probe10
readinessProbe.timeoutSecondsWhen the readiness probe times out1
readinessProbe.failureThresholdMinimum consecutive failures for the readiness probe to be considered failed after having succeeded3
readinessProbe.successThresholdMinimum consecutive successes for the readiness probe to be considered successful after having failed1
resourcesCPU/Memory resource requests/limits{}
nodeSelectorNode labels for pod assignment{}
tolerationsTolerations for pod assignment[]
affinityMap of node/pod affinities{}
extraArgsAdditional container arguments{}
extraEnvVarsAdditional container environment variables[]
extraEnvVarsCMName of existing ConfigMap containing additional container environment variablesnil
extraEnvVarsSecretName of existing Secret containing additional container environment variablesnil
metrics.service.annotationsMetrics service annotations{}
metrics.service.typeMetrics service typeClusterIP
metrics.service.clusterIPMetrics static cluster IP address or None for headless service when service type is ClusterIPnil
metrics.service.portMetrics service port9999

Tests parameters

NameDescriptionDefault
tests.image.repositoryImage nameghcr.io/cowboysysop/pytest
tests.image.tagImage tag1.0.35
tests.image.pullPolicyImage pull policyIfNotPresent

Setting parameters

Specify the parameters you which to customize using the --set argument to the helm install command. For instance,

$ helm install my-release \
    --set nameOverride=my-name cowboysysop/metacontroller

The above command sets the nameOverride to my-name.

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

$ helm install my-release \
    --values values.yaml cowboysysop/metacontroller

TIP: You can use the default values.yaml.

Deploy metacontroller with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has metacontroller on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartmetacontroller is pinned at v1.2.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply