GithubHelp home page GithubHelp logo

onlykumarabhishek / k8s-reload Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shivanshthapliyal/k8s-reload

1.0 0.0 0.0 21 KB

Custom Kubernetes Controller to reload pods automatically if configmaps are changed/ updated. ๐Ÿ”„

License: Apache License 2.0

Python 49.81% Smarty 46.38% Dockerfile 3.81%

k8s-reload's Introduction

k8s-reload

Custom Kubernetes Controller to reload pods automatically if configmaps are changed/ updated. ๐Ÿ”„

Quickstart

Install Controller via helm chart:

## Clone the repository.
git clone https://github.com/shivanshthapliyal/k8s-reload.git
cd k8s-reload/chart

## Install Helm chart
helm upgrade --install k8s-reload-controller-helm . -f values.yaml

Build k8s-reload controller image:

cd controller
docker build -t k8s-reload:1.0 -f k8s-reload-controller.dockerfile . --no-cache

Run a demo application to test controller's functionality:

cd demo-manifests
docker build -t demo-frontend-app:1.0 -f demo-frontend-app.dockerfile . --no-cache
kubectl apply -f demo-deployment.yaml demo-configmap.yaml

Now, try modifying the configmap and see the controller automatically recreate the pods!

$ k logs -f k8s-reload-controller-helm-5d9cb7bb74-kzcgl k8s-reload-controller
2022-04-11 17:33:10,638 Starting the service
2022-04-11 17:33:30,145 Modification detected on configmap - with label
2022-04-11 17:33:30,194 demo-frontend-app-b75647989-4g5vs was deleted successfully

Usecases

One usecase is while using secrets-store-csi-driver-provider-aws, when you change the parameter or secret in Parameter Store or Secret Manager, the configmap changes in the env but the pods/ deployments don't reload on their own and need to be deleted manually.

k8s-reload's People

Contributors

shivanshthapliyal avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.