This is a simple operator that can be scaled like the deployment scale.
This repo is used to provide the code for deploying the custom resource for the QE testing. The custom operator is scalable, either by replica count or by horizontal pod autoscaler.
- To compile the operator code
./scripts/compile.sh
- To build and deploy the operator code
export KUBECONFIG=<cluster-kubeconfig>
export IMG=<image-registry>.cr-scale-operator:<version>
export NAMESPACE=<namespace> # You can skip this. In that case, the operator would be installed in cr-scale-operator-system namespace.
./scripts/build-deploy.sh $IMG $NAMESPACE
NOTE In case you do not have access to docker/quay, avoid this script and only deploy from the image pushed already in the image registry by running the following command.
make deploy $IMG
- To Install sample instance of Custom resources for testing
kubectl apply -f config/samples/
To delete the CRDs from the cluster:
make uninstall
UnDeploy the controller from the cluster:
make undeploy
Fork, pull request, approval.
This project aims to follow the Kubernetes Operator pattern.
It uses Controllers, which provide a reconcile function responsible for synchronizing resources until the desired state is reached on the cluster.
If you are editing the API definitions, generate the manifests such as CRs or CRDs using:
make manifests
NOTE: Run make --help
for more information on all potential make
targets
More information can be found via the Kubebuilder Documentation
Copyright 2023.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.