A Kubernetes Custom Resource Definition (CRD) built with Kubebuilder that manages ThreeFold Gateway resources.
TFGW (ThreeFold Gateway) is a custom resource that manages load balancing and proxying. It takes a hostname and a list of backend services, then creates a gateway that routes traffic from the hostname to the specified backends.
Spec:
hostname: The domain/hostname for the gatewaybackends: List of backend service URLs to route traffic to
Status:
fqdn: The fully qualified domain name assignedmessage: Status message
-
Update code (types/controller):
Edit api/v1/tfgw_types.go or internal/controller/tfgw_controller.go
-
Build and push image:
make docker-build docker-push IMG=<registry>/crd:tag
-
Generate manifests:
make generate manifests
-
Install CRD to cluster:
make install # only crd install to see the changes
Update controller environment variables in config/manager/manager.yaml before deploying.
make deploy IMG=<registry>/crd:tag # install crd and controllerThis installs all CRDs and starts the controller.
kubectl apply -f config/samples/ingress_v1_tfgw.yaml# Get TFGW resources
kubectl get tfgw
# Describe specific resource
kubectl describe tfgw tfgw-sample# Delete custom resources. wait untill it cleanup
kubectl delete -k config/samples/
# Uninstall CRDs
make uninstall
# Remove controller
make undeploy