- Install kubectl
- Install kustomize
v3.1.0+
- Outscale account with ak/sk Outscale Access Key and Secret Key
- A Kubernetes cluster:
- Container registry to store container image
- Registry secret registry-secret
Please clone the project
git clone https://github.com/outscale-dev/cluster-api-provider-outscale
This step wil deploy user credential secret Put your credentials in osc-secret.yaml and apply:
/usr/local/bin/kubectl apply -f osc-secret.yaml
If you use a private registry (docker registry, harbor, dockerhub, quay.io, ....) with credentials, registry credentials must be named regcred and must be deployed in cluster-api-provider-outscale-system namespace.
kubectl get secret regcred -n cluster-api-provider-outscale-system
NAME TYPE DATA AGE
regcred kubernetes.io/dockerconfigjson 1 52s
If you want to change it with another name, you can do so in this file cluster-api-provider-outscale/config/default:
value: [{ name: regcred }]
Please look at cluster-api section about deployment of cert-manager and cluster-api
Or you can use this to deploy cluster-api with cert-manager:
make deploy-clusterapi
This step will build and push image to your public or private registry and deploy it.
Set those environment variable with yours:
export K8S_CONTEXT=phandalin
export CONTROLLER_IMAGE=my-registry/controller
-
K8S_CONTEXT is your context in your kubeconfig file.
-
CONTROLLER_IMAGE is the project path where the image will be stored. Tilt will add a tag each time it build an new image.
Please run to generate capm.yaml:
IMG=my-registry/controller:latest make capm
- IMG is the CONTROLLER_IMAGE with CONTROLLER_IMAGE_TAG. Tilt will change the tag each time it build an new image.
Please launch tilt at the project's root folder:
[root@cidev-admin cluster-api-provider-outscale]# tilt up
Tilt started on http://localhost:10350/
v0.25.3, built 2022-03-04
(space) to open the browser
(s) to stream logs (--stream=true)
(t) to open legacy terminal mode (--legacy=true)
(ctrl-c) to exit
You can track your docker build and controller log in your web browser.
[root@cidev-admin cluster-api-provider-outscale]# kubectl get pod -n cluster-api-provider-outscale-system
NAME READY STATUS RESTARTS AGE
cluster-api-provider-outscale-controller-manager-7d5c48d67t6d7f 2/2 Running 0 22s
In order to test the change of an api, please do:
make manifest
make generate
make capm
kubectl apply -f capm.yaml
You must install those project with :
make install-dev-prerequisites
Optionally, you can install those project(kind, [gh], [packer], [kubebuildertool]):
make install-packer
make install-gh
make install-kind
make install-kubebuildertool
This step will delete your cluster
kubectl delete -f example/cluster-template.yaml
This step will delete the outscale controller manager
IMG=my-registry/controller:my-tag make undeploy
Please look at cluster-api section about deployment of cert-manager and cluster-api
Or you can use this to undeploy cluster-api with cert-manager:
make deploy-clusterapi