Categorygithub.com/dm0275/configmap-replicator
modulepackage
0.0.0-20240903013014-44b585a9526b
Repository: https://github.com/dm0275/configmap-replicator.git
Documentation: pkg.go.dev

# README

ConfigMap Replicator Controller

Overview

The ConfigMap Replicator controller can be used to simplify the replication of ConfigMaps across namespaces. This controller allows users to easily copy, synchronize, or replicate ConfigMaps from one namespace to one or more target namespaces.

Features

  • Easy Replication: Replicate ConfigMaps across multiple namespaces.
  • Fine-Grained Control: Specify which namespaces to include or exclude from replication.
  • Annotation-Based Configuration: Control replication behavior using simple Kubernetes annotations.

Installation

The configmap-replicator controller can be installed via Helm. To install, add the Helm chart repository:

helm repo add cm-repo https://dm0275.github.io/configmap-replicator \
  && helm repo update

Install the latest version of the controller by running:

helm install configmap-replicator cm-repo/configmap-replicator

Helm Chart Values

Below is a table with the values available in the Helm chart:

ParameterDescriptionDefault Value
replicaCountNumber of replicas for the controller1
image.pullPolicyImage pull policyIfNotPresent
image.tagImage tag (defaults to chart appVersion)""
imagePullSecretsList of image pull secrets[]
nameOverrideOverride name of the chart""
fullnameOverrideOverride full name of the chart""
rbac.createCreate RBAC(Role & RoleBinding) configurations for the controllertrue
rbac.serviceAccount.nameName of the ServiceAccount""
rbac.clusterRole.nameName of the ClusterRole""
rbac.clusterRoleBinding.nameName of the ClusterRoleBinding""
serviceAccount.createCreate a new ServiceAccounttrue
serviceAccount.automountAutomount ServiceAccount API credentialstrue
serviceAccount.annotationsAnnotations for the ServiceAccount{}
serviceAccount.nameServiceAccount name""
podAnnotationsAnnotations for the pod{}
podLabelsLabels for the pod{}
resources.limits.cpuCPU limit for the container1
resources.limits.memoryMemory limit for the container128Mi
resources.requests.cpuCPU request for the container100m
resources.requests.memoryMemory request for the container128Mi
nodeSelectorNode selector for pod scheduling{}
tolerationsTolerations for pod scheduling[]
affinityAffinity rules for pod scheduling{}
replicator.reconciliationIntervalInterval for ConfigMap reconciliation1m

Usage

Once deployed, the configmap-replicator will automatically replicate ConfigMaps based on the annotations you specify.

Enable Replication

To enable replication of a ConfigMap across all namespaces, add the following annotation to your ConfigMap:

annotations:
  configmap-replicator/replication-allowed: "true"

Exclude Specific Namespaces

If you want to exclude specific namespaces from replication, use the following annotation:

annotations:
  configmap-replicator/replication-allowed: "true"
  configmap-replicator/excluded-namespaces: "kube-system"

Replicate to Specific Namespaces Only

To replicate the ConfigMap to a specific set of namespaces, use this annotation:

annotations:
  configmap-replicator/replication-allowed: "true"
  configmap-replicator/allowed-namespaces: "team1,team2"

Build from source

To build the configmap-replicator controller, follow the steps below:

  • Build the controller using Gradle:

    gradle build
    

License

This project is licensed under the Apache License. See the LICENSE file for details.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author