git-configmap-sync

by julien.baillagou

Helm chartv1.0.1App 1.1.0Verified publisher

This chart installs a CronJob to synchronize a git repository with configmaps.

About this chart

git-configmap-sync

kubernetes-configmap-sync is a Python job that creates configmaps from a source directory.

TL;DR

$ helm repo add julb https://charts.julb.me
$ helm install my-release julb/git-configmap-sync

Introduction

This chart bootstraps a kubernetes-configmap-sync job on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.12+
  • Helm 3.0+

Installing the Chart

To install the chart with the release name my-release:

$ helm install my-release julb/git-configmap-sync

The command deploys git-configmap-sync on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

The following table lists the configurable parameters of the git-configmap-sync chart and their default values.

Common parameters

ParameterDescriptionDefault
nameOverrideString to partially override git-configmap-sync.fullnamenil
fullnameOverrideString to fully override git-configmap-sync.fullnamenil

git-configmap-sync parameters

ParameterDescriptionDefault
image.repositorygit-configmap-sync image namejulb/kubernetes-configmap-sync
image.taggit-configmap-sync image tag{TAG_NAME}
image.pullPolicygit-configmap-sync image pull policyIfNotPresent
imagePullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)

CronJob parameters

ParameterDescriptionDefault
concurrencyPolicyConcurrency policy on the CronJobForbid
failedJobsHistoryLimitThe maximum number of failed jobs to keep in history.3
scheduleThe Cron schedule at which to run the job.*/5 * * * *
backoffLimitThe maximum number of re-tries before aborting the job execution.0
podAnnotationsPod annotations{} (evaluated as a template)
affinityAffinity for pod assignment{} (evaluated as a template)
nodeSelectorNode labels for pod assignment{} (evaluated as a template)
tolerationsTolerations for pod assignment[] (evaluated as a template)
podSecurityContextgit-configmap-sync pods' Security Context{}
securityContextgit-configmap-sync containers' Security Context{}
resourcesThe requested resources and resources limits for git-configmap-sync containers{}
extraLabelsAdditional labels to apply on all objects{}

RBAC parameters

ParameterDescriptionDefault
serviceAccount.createEnable creation of ServiceAccounttrue
serviceAccount.nameName of the created serviceAccountGenerated using the git-configmap-sync.fullname template
serviceAccount.annotationsAnnotations to add on the service account.{}

GitClone parameters

ParameterDescriptionDefault
gitClone.image.repositoryGit clone image namealpine/git
gitClone.image.tagGit clone image taglatest
gitClone.image.pullPolicyGit clone image pull policyIfNotPresent
gitClone.resourcesGit clone requested resources and resources limits{}
gitClone.securityContextGit clone container security context{}
gitClone.gitConfig.repositoryGit repository to clone
gitClone.gitConfig.branchGit branch to clone
gitClone.gitConfig.subdirectoryGit subdirectory to process
gitClone.gitConfig.credentials.usernameUsername to use to clone the repository
gitClone.gitConfig.credentials.passwordPassword to use to clone the repository
gitClone.gitConfig.credentials.privateSshKeyPrivate SSH key to use to clone the repository
gitClone.gitConfig.credentials.existingSecretExisting secret holding git credentials used to clone the repository

The above parameters map to the env variables defined in julb/kubernetes-configmap-sync. For more information please refer to the julb/kubernetes-configmap-sync image documentation.

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

$ helm install my-release -f values.yaml julb/git-configmap-sync

Tip: You can use the default values.yaml

Deploy git-configmap-sync with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has git-configmap-sync 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 chartgit-configmap-sync is pinned at v1.0.1 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