emreodabas / image-decorator-controller

Kubernetes Controller for importing external images to own/local repository and redeploy workload

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

image-decorator-controller

Firstly this project structure is created with kubebuilder

Kubernetes Controller for importing external images to own/local repository and redeploy workload

asciicast

Run Demo

  • git clone https://github.com/emreodabas/image-decorator-controller
  • cd /image-decorator-controller && go get && /hack/runDemo.sh
  • removing sample data
  • hack/resetWorkloads.sh
  • check sample data states
  • hack/checkStates.sh

Installation

localhost

  • git clone https://github.com/emreodabas/image-decorator-controller
  • cd image-decorator-controller && make run ENV=dev

Kubernetes

!! kustomize required

  • git clone https://github.com/emreodabas/image-decorator-controller
  • cd image-decorator-controller && go get && make deploy

Docker publish

  • git clone https://github.com/emreodabas/image-decorator-controller
  • cd image-decorator-controller && make docker-publish

Configurations

for development usage add environment variable ENV=dev

Variable Name Description Sample
BACKUP_REGISTRY_ADDRESS (required) backup registry address "kubermatico" "gcr.io/kubermatico"
REQUEUE_DURATION ms based requeue duration "5000"
IGNORED_NS comma seperated namespaces for ignored namespaces "kube-system,kube-builder-system"
USERNAME (required) registry username kubermatico
PASSWORD required if access token is null -
ACCESS_TOKEN required if password is null -
KUBE_CONFIG_PATH local path of kubeconfig /home/emreo/.kube/config
LEADER_ELECTION boolean default false true - false

Known issues

  • Controller throw exception if resource updated while process
    • This reconciles are requeueing and processed after requeue duration
  • Configuration file committed for development usage

About

Kubernetes Controller for importing external images to own/local repository and redeploy workload


Languages

Language:Go 73.7%Language:Shell 17.6%Language:Makefile 6.5%Language:Dockerfile 2.2%