diff --git a/galaxy.yml b/galaxy.yml index 55ba7753e..319a289e5 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -17,7 +17,7 @@ dependencies: kubernetes.core: 2.4.0 openstack.cloud: 1.7.0 vexxhost.ceph: 3.0.1 - vexxhost.kubernetes: ">=1.14.3" + vexxhost.kubernetes: ">=2.0.1" tags: - application - cloud diff --git a/images/cluster-api-provider-openstack/Dockerfile b/images/cluster-api-provider-openstack/Dockerfile deleted file mode 100644 index 651ec5989..000000000 --- a/images/cluster-api-provider-openstack/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Atmosphere-Rebuild-Time: 2024-06-25T22:49:25Z - -FROM alpine/git:2.43.0 AS src -ARG CAPO_VERSION=v0.9.0 -ADD https://github.com/kubernetes-sigs/cluster-api-provider-openstack.git#${CAPO_VERSION} /src -WORKDIR /src -COPY /patches /patches -RUN git apply /patches/*.patch - -FROM golang:1.20 AS builder -COPY --from=src --link /src /src -WORKDIR /src -ARG ARCH -RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \ - go build -ldflags "-extldflags '-static'" -o manager ${package} - -FROM gcr.io/distroless/static:nonroot -COPY --from=builder /src/manager /manager -USER 65532 -ENTRYPOINT ["/manager"] diff --git a/images/cluster-api-provider-openstack/patches/0000-fix-skip-port-deletion-when-instances-have-no-port.patch b/images/cluster-api-provider-openstack/patches/0000-fix-skip-port-deletion-when-instances-have-no-port.patch deleted file mode 100644 index 6a1e047f8..000000000 --- a/images/cluster-api-provider-openstack/patches/0000-fix-skip-port-deletion-when-instances-have-no-port.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 294b2d3ca34f7d327da3b27bd07edde7f5bbac43 Mon Sep 17 00:00:00 2001 -From: okozachenko -Date: Tue, 19 Dec 2023 01:07:36 +1100 -Subject: [PATCH] fix: skip port deletion when instances have no port - ---- - pkg/cloud/services/networking/port.go | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/pkg/cloud/services/networking/port.go b/pkg/cloud/services/networking/port.go -index 4c213851f8..84b9bfc618 100644 ---- a/pkg/cloud/services/networking/port.go -+++ b/pkg/cloud/services/networking/port.go -@@ -315,6 +315,10 @@ func (s *Service) GarbageCollectErrorInstancesPort(eventObject runtime.Object, i - return fmt.Errorf("garbage collection of port %s failed, found %d ports with the same name", portName, len(portList)) - } - -+ if len(portList) == 0 { -+ continue -+ } -+ - if err := s.DeletePort(eventObject, portList[0].ID); err != nil { - return err - } diff --git a/images/cluster-api-provider-openstack/patches/0001-chore-bump-k8s-api-for-cve.patch b/images/cluster-api-provider-openstack/patches/0001-chore-bump-k8s-api-for-cve.patch deleted file mode 100644 index cd99927fe..000000000 --- a/images/cluster-api-provider-openstack/patches/0001-chore-bump-k8s-api-for-cve.patch +++ /dev/null @@ -1,89 +0,0 @@ -From eed5b5cc2a6cf48c0c9e0245695d0ac143150186 Mon Sep 17 00:00:00 2001 -From: Mohammed Naser -Date: Tue, 12 Mar 2024 18:18:25 -0400 -Subject: [PATCH] chore: bump k8s api for cve - ---- - go.mod | 8 ++++---- - go.sum | 16 ++++++++-------- - 2 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/go.mod b/go.mod -index 997f8354..d6c300cc 100644 ---- a/go.mod -+++ b/go.mod -@@ -15,7 +15,7 @@ require ( - github.com/onsi/gomega v1.30.0 - github.com/prometheus/client_golang v1.17.0 - github.com/spf13/pflag v1.0.5 -- golang.org/x/crypto v0.15.0 -+ golang.org/x/crypto v0.17.0 - golang.org/x/text v0.14.0 - gopkg.in/ini.v1 v1.67.0 - k8s.io/api v0.28.4 -@@ -24,7 +24,7 @@ require ( - k8s.io/client-go v0.28.4 - k8s.io/component-base v0.28.4 - k8s.io/klog/v2 v2.100.1 -- k8s.io/kubernetes v1.28.3 -+ k8s.io/kubernetes v1.28.4 - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 - sigs.k8s.io/cluster-api v1.6.0 - sigs.k8s.io/cluster-api/test v1.6.0 -@@ -139,8 +139,8 @@ require ( - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sync v0.4.0 // indirect -- golang.org/x/sys v0.14.0 // indirect -- golang.org/x/term v0.14.0 // indirect -+ golang.org/x/sys v0.15.0 // indirect -+ golang.org/x/term v0.15.0 // indirect - golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.14.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect -diff --git a/go.sum b/go.sum -index e3d46fdc..f5767735 100644 ---- a/go.sum -+++ b/go.sum -@@ -460,8 +460,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y - golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= - golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= - golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= --golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= --golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= -+golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -+golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= - golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= - golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= - golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -@@ -609,13 +609,13 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc - golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= - golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= --golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= --golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -+golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -+golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= - golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= - golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= --golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= --golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= -+golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -+golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= - golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= - golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= - golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -@@ -841,8 +841,8 @@ k8s.io/kms v0.28.4 h1:PMgY/3CQTWP9eIKmNQiTgjLIZ0ns6O+voagzD2/4mSg= - k8s.io/kms v0.28.4/go.mod h1:HL4/lR/bhjAJPbqycKtfhWiKh1Sp21cpHOL8P4oo87w= - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= --k8s.io/kubernetes v1.28.3 h1:XTci6gzk+JR51UZuZQCFJ4CsyUkfivSjLI4O1P9z6LY= --k8s.io/kubernetes v1.28.3/go.mod h1:NhAysZWvHtNcJFFHic87ofxQN7loylCQwg3ZvXVDbag= -+k8s.io/kubernetes v1.28.4 h1:aRNxs5jb8FVTtlnxeA4FSDBVKuFwA8Gw40/U2zReBYA= -+k8s.io/kubernetes v1.28.4/go.mod h1:BTzDCKYAlu6LL9ITbfjwgwIrJ30hlTgbv0eXDoA/WoA= - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= - rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= --- -2.43.0 diff --git a/images/magnum/Dockerfile b/images/magnum/Dockerfile index a930684ea..877f9ec29 100644 --- a/images/magnum/Dockerfile +++ b/images/magnum/Dockerfile @@ -22,7 +22,7 @@ sed -i s/^oslo.db===.*$/oslo.db==14.1.0/ /upper-constraints.txt pip3 install \ --constraint /upper-constraints.txt \ /src/magnum \ - magnum-cluster-api==0.22.1 + magnum-cluster-api==0.24.0 EOF FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE} diff --git a/roles/defaults/vars/main.yml b/roles/defaults/vars/main.yml index 6fe507e64..13b0ae508 100644 --- a/roles/defaults/vars/main.yml +++ b/roles/defaults/vars/main.yml @@ -36,10 +36,10 @@ _atmosphere_images: cinder_storage_init: "registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}" cinder_volume_usage_audit: "registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}" cinder_volume: "registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}" - cluster_api_controller: registry.k8s.io/cluster-api/cluster-api-controller:v1.6.0 - cluster_api_kubeadm_bootstrap_controller: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.6.0 - cluster_api_kubeadm_control_plane_controller: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.6.0 - cluster_api_openstack_controller: registry.k8s.io/capi-openstack/capi-openstack-controller:v0.9.0 + cluster_api_controller: registry.k8s.io/cluster-api/cluster-api-controller:v1.8.4 + cluster_api_kubeadm_bootstrap_controller: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.8.4 + cluster_api_kubeadm_control_plane_controller: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.8.4 + cluster_api_openstack_controller: registry.k8s.io/capi-openstack/capi-openstack-controller:v0.11.2 csi_node_driver_registrar: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.0 csi_rbd_attacher: registry.k8s.io/sig-storage/csi-attacher:v4.5.0 csi_rbd_plugin: quay.io/cephcsi/cephcsi:v3.11.0 diff --git a/roles/magnum/meta/main.yml b/roles/magnum/meta/main.yml index a992fbc3f..3a45f47fb 100644 --- a/roles/magnum/meta/main.yml +++ b/roles/magnum/meta/main.yml @@ -38,6 +38,10 @@ dependencies: upload_helm_chart_dest: "{{ magnum_helm_chart_ref }}" - role: vexxhost.kubernetes.cluster_api vars: + clusterctl_version: 1.8.4 clusterctl_config: "{{ magnum_clusterctl_config }}" + cluster_api_version: 1.8.4 + cluster_api_infrastructure_provider: openstack + cluster_api_infrastructure_version: 0.11.2 cluster_api_node_selector: openstack-control-plane: enabled diff --git a/zuul.d/container-images/cluster-api-provider-openstack.yaml b/zuul.d/container-images/cluster-api-provider-openstack.yaml deleted file mode 100644 index 8469a0ed6..000000000 --- a/zuul.d/container-images/cluster-api-provider-openstack.yaml +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) 2024 VEXXHOST, Inc. -# -# 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. - -- project: - check: - jobs: - - atmosphere-build-container-image-cluster-api-provider-openstack - gate: - jobs: - - atmosphere-upload-container-image-cluster-api-provider-openstack - promote: - jobs: - - atmosphere-promote-container-image-cluster-api-provider-openstack - -- job: - name: atmosphere-build-container-image-cluster-api-provider-openstack - parent: atmosphere-build-container-image - dependencies: - - name: atmosphere-buildset-registry - soft: false - vars: &container_image_vars - promote_container_image_job: atmosphere-upload-container-image-cluster-api-provider-openstack - container_images: - - context: images/cluster-api-provider-openstack - registry: registry.atmosphere.dev - repository: registry.atmosphere.dev/library/capi-openstack-controller - arch: - - linux/amd64 - tags: - - "{{ zuul.branch | replace('stable/', '') }}" - files: &container_image_files - - images/cluster-api-provider-openstack/.* - -- job: - name: atmosphere-upload-container-image-cluster-api-provider-openstack - parent: atmosphere-upload-container-image - dependencies: - - name: atmosphere-buildset-registry - soft: false - vars: *container_image_vars - files: *container_image_files - -- job: - name: atmosphere-promote-container-image-cluster-api-provider-openstack - parent: atmosphere-promote-container-image - vars: *container_image_vars - files: *container_image_files diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index ea79cbeee..505114e3b 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -28,8 +28,6 @@ soft: true - name: atmosphere-build-container-image-cinder soft: true - - name: atmosphere-build-container-image-cluster-api-provider-openstack - soft: true - name: atmosphere-build-container-image-designate soft: true - name: atmosphere-build-container-image-glance @@ -98,8 +96,6 @@ soft: true - name: atmosphere-upload-container-image-cinder soft: true - - name: atmosphere-upload-container-image-cluster-api-provider-openstack - soft: true - name: atmosphere-upload-container-image-designate soft: true - name: atmosphere-upload-container-image-glance