nzelepukin / k8s_get_config

Lightweight python app for creating CSR User with custom permissions in Kubernetes cluster and send config to user authenticated in LDAP.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PreDeploy

kubectl apply -f k8s_deploy/namespaced-roles.yaml            -- this one must be used for each namespace 
kubectl apply -f k8s_deploy/clusterrole-read-pf.yaml
kubectl apply -f k8s_deploy/get-config-cm.yaml -n my-namespace
kubectl create sa k8s-get-config-sa -n my-namespace
kubectl apply -f k8s_deploy/get-config-sa-R.yaml
Edit namespace in k8s_deploy/get-config-sa-RB.yaml
kubectl apply -f k8s_deploy/get-config-sa-RB.yaml
Edit k8s_deploy/deployment.yaml with your variables, ingress URL and ingress annotations.
kubectl apply -f k8s_deploy/deployment.yaml -n my-namespace

Virtual environments

APP_PORT=8080
TMP_DIR= path to folder for temorary files
KUBE_API_URL='https://1.2.3.4:6443'
LDAP_SERVER= DNS or IP address of your LDAP server
LDAP_DOMAIN= LDAP domain name

Usage

When you need to create or edit some user in cluster just edit ConfigMap (get-config-cm). Restart pod and send application URL to user. How it looks

Health check

Returns 200 on /

About

Lightweight python app for creating CSR User with custom permissions in Kubernetes cluster and send config to user authenticated in LDAP.


Languages

Language:Python 89.4%Language:CSS 5.2%Language:HTML 4.6%Language:Makefile 0.6%Language:Dockerfile 0.2%