Kubernetes Operator developed using Operator-SDK for Infrastructure Elements of Docker type.
This Operator watches for a new ServiceComponentDockers (K8s Custom Resource) deployment in the K8s cluster and then deploys a Docker container (along with the needed additional resources) in the specified Docker IE.
NOTE: a NATS broker must be successfully deployed previously in the 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.
kustomize build config/default > operator-deployment.yamlA 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-docker-operator:tagFor multi-arch images:
make docker-buildx IMG=eclipseaerios/llo-docker-operator:1.1.2For multi-arch images (in Gitlab container registry):
make docker-buildx-gitlab IMG=eclipseaerios/llo-docker-operator:1.1.2- Deploy the controller to the cluster with the image specified by
IMG:
make deploy IMG=<some-registry>/aeros-llo-docker-operator:tagFirst, undeploy the controller from the cluster:
make undeployThen, delete the CRDs from the cluster:
make uninstallCopyright 2025 Eclipse aeriOS 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.