K8s Operator developed using Operator-SDK for Infrastructure Elements of Kubernetes type.
This Operator watches for a new ServiceComponentK8s (K8s Custom Resource) deployment in the K8s cluster and then deploys a K8s Deployment and a linked service in the same K8s cluster.
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.
NOTE: Run make --help for more information on all potential make targets
More information can be found via the Kubebuilder Documentation
All the needed K8s manifests have been packaged into a single YAML file: operator-deployment.yaml
kubectl apply -f operator-deployment.yamlYou can also create these manifests by running the below command, but some modifications may be needed.
bin/kustomize build config/default > operator-deployment.yamlA Helm chart has been created and uploaded to the Eclipse aeriOS Helm chart repository.
helm repo add eclipse-aerios https://eclipse-aerios.github.io/resources/chartshelm install aerios-llo-k8s eclipse-aerios/llo-k8s --debugA K8s cluster is required. The controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster kubectl cluster-info shows).
- Generate CRDs and other needed manifests
make manifests- Generate internal operator-sdk code
make generate- Install the CRDs into the cluster:
make install- Run the controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):
make runNOTE: You can also run this in one step by running: make install run
- Install example Instances of Custom Resources:
kubectl apply -f config/samples/- Build and push your image to the location specified by
IMG:
make docker-build docker-push IMG=<some-registry>/aeros-llo-k8s-operator-sdk:tagTo upload the image to the common deployments repo (Docker login is required):
make docker-build docker-push IMG=eclipseaerios/llo-k8s-operator:1.4.1For multi-arch images:
make docker-buildx-gitlab IMG=eclipseaerios/llo-k8s-operator:1.4.1- Deploy the controller to the cluster with the image specified by
IMG:
make deploy IMG=<some-registry>/aeros-llo-k8s-operator-sdk:tagTo deploy the image to the common deployments repo (Docker login is required):
make deploy IMG=eclipseaerios/llo-k8s-operator:1.4.1First, undeploy the controller from the cluster:
make undeployThen, delete the CRDs from the cluster:
make uninstallCopyright 2025 aeriOS HE project.
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.