diff --git a/examples/basic/Genesis.yaml b/examples/basic/Genesis.yaml index 27160ecf..3f97c6a5 100644 --- a/examples/basic/Genesis.yaml +++ b/examples/basic/Genesis.yaml @@ -45,6 +45,7 @@ data: run_as_user: 65534 images: armada: quay.io/airshipit/armada:latest-ubuntu_focal + armada-operator: quay.io/raliev12/armada-controller:latest kubernetes: apiserver: registry.k8s.io/kube-apiserver-amd64:v1.27.4 controller-manager: registry.k8s.io/kube-controller-manager-amd64:v1.27.4 diff --git a/examples/complete/Genesis.yaml b/examples/complete/Genesis.yaml index de173e42..e5afc724 100644 --- a/examples/complete/Genesis.yaml +++ b/examples/complete/Genesis.yaml @@ -34,6 +34,7 @@ data: run_as_user: 65534 images: armada: quay.io/airshipit/armada:latest-ubuntu_focal + armada-operator: quay.io/raliev12/armada-controller:latest kubernetes: apiserver: registry.k8s.io/kube-apiserver-amd64:v1.27.4 controller-manager: registry.k8s.io/kube-controller-manager-amd64:v1.27.4 diff --git a/promenade/schemas/Genesis.yaml b/promenade/schemas/Genesis.yaml index a251a537..1731945f 100644 --- a/promenade/schemas/Genesis.yaml +++ b/promenade/schemas/Genesis.yaml @@ -149,11 +149,16 @@ data: $ref: '#/definitions/kubernetes_label' additionalProperties: false + enable_operator: + type: boolean + images: type: object properties: armada: $ref: '#/definitions/image' + armada-operator: + $ref: '#/definitions/image' kubernetes: type: object properties: diff --git a/promenade/templates/roles/genesis/etc/kubernetes/manifests/bootstrap-armada.yaml b/promenade/templates/roles/genesis/etc/kubernetes/manifests/bootstrap-armada.yaml index fdcece02..63acaf33 100644 --- a/promenade/templates/roles/genesis/etc/kubernetes/manifests/bootstrap-armada.yaml +++ b/promenade/templates/roles/genesis/etc/kubernetes/manifests/bootstrap-armada.yaml @@ -68,6 +68,37 @@ spec: mountPath: /tmp/log - name: metrics mountPath: /tmp/metrics +{%- if config['Genesis:enable_operator'] is sameas true %} + - args: + - --health-probe-bind-address=:8081 + - --metrics-bind-address=127.0.0.1:8080 + - --leader-elect + - --leader-elect-namespace=ucp + command: + - /manager + env: + - name: KUBECONFIG + value: /root/.kube/config + image: {{ config['Genesis:images.armada-operator'] }} + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + name: manager + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + securityContext: + runAsUser: 0 + volumeMounts: + - name: auth + mountPath: /root/.kube +{%- endif %} - name: monitor image: {{ config['HostSystem:images.monitoring_image'] }} command: diff --git a/tests/unit/builder_data/simple/Genesis.yaml b/tests/unit/builder_data/simple/Genesis.yaml index 5dc45303..b6c7a7ab 100644 --- a/tests/unit/builder_data/simple/Genesis.yaml +++ b/tests/unit/builder_data/simple/Genesis.yaml @@ -31,11 +31,13 @@ data: - ucp-control-plane=enabled images: armada: quay.io/airshipit/armada:latest-ubuntu_focal + armada-operator: quay.io/raliev12/armada-controller:latest kubernetes: apiserver: registry.k8s.io/kube-apiserver-amd64:v1.27.4 controller-manager: registry.k8s.io/kube-controller-manager-amd64:v1.27.4 etcd: quay.io/coreos/etcd:v3.5.6 scheduler: registry.k8s.io/kube-scheduler-amd64:v1.27.4 + enable_operator: false files: - path: /var/lib/anchor/calico-etcd-bootstrap content: "# placeholder for triggering calico etcd bootstrapping" diff --git a/tools/gate/config-templates/genesis-config.yaml b/tools/gate/config-templates/genesis-config.yaml index 95a0d869..8d7f93a7 100644 --- a/tools/gate/config-templates/genesis-config.yaml +++ b/tools/gate/config-templates/genesis-config.yaml @@ -36,6 +36,7 @@ data: controller-manager: ${IMAGE_CONTROLLER_MANAGER} etcd: ${IMAGE_ETCD} scheduler: ${IMAGE_SCHEDULER} + enable_operator: false files: - path: /var/lib/anchor/calico-etcd-bootstrap content: "" diff --git a/tools/gate/default-config-env b/tools/gate/default-config-env index 46e3499c..3d7c51ea 100644 --- a/tools/gate/default-config-env +++ b/tools/gate/default-config-env @@ -1,4 +1,5 @@ IMAGE_ARMADA=quay.io/airshipit/armada:latest-ubuntu_focal +IMAGE_ARMADA_OPERATOR=quay.io/raliev12/armada-controller:latest IMAGE_CALICO_CNI=quay.io/calico/cni:v3.4.0 IMAGE_CALICO_CTL=quay.io/calico/ctl:v3.4.0 IMAGE_CALICO_KUBE_CONTROLLERS=quay.io/calico/kube-controllers:v3.4.0 diff --git a/tools/registry/IMAGES b/tools/registry/IMAGES index d0dacefd..26d72ede 100644 --- a/tools/registry/IMAGES +++ b/tools/registry/IMAGES @@ -7,6 +7,7 @@ registry.k8s.io/kube-scheduler-amd64,v1.27.4,scheduler registry.k8s.io/kube-proxy-amd64,v1.27.4,proxy lachlanevenson/k8s-helm,v3.12.2,helm quay.io/airshipit/armada,master,armada +quay.io/raliev12/armada-controller,latest,armada-operator quay.io/calico/cni,v3.4.0,calico-cni quay.io/calico/ctl,v3.4.0,calico-ctl quay.io/calico/kube-controllers,v3.4.0,calico-kube-controllers