Skip to main content
Version: Next 🚧

Operator Installation

Install TFRS Operator to Kubernetes cluster.

Current Image

docker.cnb.cool/turingfocus/tfrs-operator:develop-0.1.1-dev3

Replace with target version before deployment.


Kustomize Method

Prerequisites

# Create namespace
kubectl create namespace tfrs-operator-system

# Create image pull secret
kubectl create secret docker-registry cnb-registry-secret \
--namespace=tfrs-operator-system \
--docker-server=docker.cnb.cool \
--docker-username=<USERNAME> \
--docker-password=<PASSWORD>

Deploy

# Clone repository and checkout target version
git clone https://github.com/turingfocus/tfrs-operator.git
cd tfrs-operator
git checkout develop-0.1.0

# Deploy
make deploy IMG=docker.cnb.cool/turingfocus/tfrs-operator:develop-0.1.0

Verify

kubectl get pods -n tfrs-operator-system
# NAME READY STATUS RESTARTS AGE
# tfrs-operator-controller-manager-7bf684c9d9-lfkm6 1/1 Running 0 23s

Update Image

kubectl set image deployment/tfrs-operator-controller-manager \
manager=docker.cnb.cool/turingfocus/tfrs-operator:<NEW_TAG> \
-n tfrs-operator-system
# deployment.apps/tfrs-operator-controller-manager image updated

Uninstall

make undeploy
Note

make undeploy deletes all Kustomize-managed resources (Deployment, Service, RBAC, CRD, etc.).

On Tencent Cloud TKE, namespace deletion may be blocked by gatekeeper. Delete manually:

kubectl delete ns tfrs-operator-system

Helm Method

Image Version Note

Helm chart image tag logic: Uses --set image.tag value if specified, otherwise uses appVersion from Chart.yaml.

If the image corresponding to appVersion doesn't exist or you have specific requirements, you must specify an available image version via --set image.tag=<TAG>.

For this documentation example, since we're deploying development image develop-0.1.0, use --set image.tag=develop-0.1.0

Deploy

Option 1: Install from OCI Registry (Recommended)

helm install tfrs-operator oci://helm.cnb.cool/turingfocus/tfrs-operator/tfrs-operator \
--version 0.1.0 \
--namespace tfrs-operator-system \
--create-namespace \
--set image.tag=develop-0.1.0 \
--set 'imageCredentials[0].name=cnb-registry-secret' \
--set 'imageCredentials[0].registry=docker.cnb.cool' \
--set 'imageCredentials[0].username=<USERNAME>' \
--set 'imageCredentials[0].password=<PASSWORD>'

Option 2: Install from Local Source

git clone https://github.com/turingfocus/tfrs-operator.git
cd tfrs-operator

helm install tfrs-operator ./chart \
--namespace tfrs-operator-system \
--create-namespace \
--set image.tag=develop-0.1.0 \
--set 'imageCredentials[0].name=cnb-registry-secret' \
--set 'imageCredentials[0].registry=docker.cnb.cool' \
--set 'imageCredentials[0].username=<USERNAME>' \
--set 'imageCredentials[0].password=<PASSWORD>'
Note

imageCredentials creates a docker-registry Secret and automatically binds it to the ServiceAccount.

Verify

kubectl get pods -n tfrs-operator-system

Update Image

helm upgrade tfrs-operator oci://helm.cnb.cool/turingfocus/tfrs-operator/tfrs-operator \
--version 0.1.0 \
--namespace tfrs-operator-system \
--reuse-values \
--set image.tag=<NEW_TAG>
# Release "tfrs-operator" has been upgraded. Happy Helming!
# REVISION: 2

Uninstall

helm uninstall tfrs-operator -n tfrs-operator-system
# release "tfrs-operator" uninstalled
Note

Helm uninstall cleans up Deployment, Service, RBAC and other resources, but CRDs are preserved (Helm standard behavior to prevent data loss).

To delete CRDs:

kubectl delete crd tfrclusters.infra.tfrobotserver.cn \
tfrtenants.infra.tfrobotserver.cn \
tfrservers.tfrobot.tfrobotserver.cn