This repository contains a custom Kubernetes controller that can create/update/delete REST object on RESTfull api-endpoint. The main goal is to not write a post-install Job filled with curl commands ever again for my applications deployments on Kubernetes. Inspirations come from the excellent restapi terraform provider and Tekton.
- Configure OpenID applications in most ID-provider to provide seamless integration between applications
- Configure your own forge projects
- Configure any application that provide REST endpoints (that's a lot of them)
(TL;DR: kubectl apply -k github.com/sebt3/kuberest//deploy
)
Since this is a kubernetes operator, the installations steps are:
- first the CustomResourceDefinition
- then the operator controlling the ressources
Feel free to pick any of the installtions options for both.
kubectl apply -f deploy/crd/crd.yaml
kubectl apply -k github.com/sebt3/kuberest//deploy/crd
helm template charts/kuberest | kubectl apply -f -
kubectl wait --for=condition=available deploy/kuberest --timeout=30s
kubectl create ns kuberest
kubectl apply -k github.com/sebt3/kuberest//deploy/operator
kubectl wait -n kuberest --for=condition=available deploy/kuberest --timeout=30s
helm repo add kuberest https://sebt3.github.io/kuberest/
kubectl create ns kuberest
helm install kuberest/kuberest kuberest --namespace kuberest
kubectl wait -n kuberest --for=condition=available deploy/kuberest --timeout=30s
The controller can either function per-tenant (refuse to read secrets from namespace that doesnt share the same label mostly) or behave globally. The default behaviour is to limit to current tenant, to activate, set the environement variable MULTI_TENANT to false (or tenants.enabled=false for the chart). You can also select the common label value using the variable TENANT_LABEL (or tenants.label for the chart).
Please see the documentation