airshipit / airshipctl

A CLI for managing declarative infrastructure.
Apache License 2.0
43 stars 49 forks source link

Docker Provider - Force to Use Quay.io Clusterctl image #642

Closed lb4368 closed 3 years ago

lb4368 commented 3 years ago

Problem description (if applicable) In order to fix issue when uplifting to CAPI v0.4.2 (#518), we need the Docker provider to use the krm supporting clusterctl: 0.3.22 version instead of latest. The reason is when uplifting to CAPI v0.4.2, the clusterctl krm image is build using clusterctl:0.4.2 binary, which may be causing Zuul to fail during docker provider test.

Proposed change The proposed approach (but not limited to) is to create a strategic merge on the docker-test-site level for the clusterctl executor.

apiVersion: airshipit.org/v1alpha1
kind: GenericContainer
metadata:
  name: clusterctl
  labels:
    airshipit.org/deploy-k8s: "false"
spec:
  type: krm
  image: localhost/clusterctl:latest #  replace by e.g., quay.io/airshipit/clusterctl:eb9ac97ce207542e1e4d3b363963bfc5f0847096
  hostNetwork: true
shon-phand commented 3 years ago

I can work on this, please assign it to me

lb4368 commented 3 years ago

Comment from @sshiba

Also make sure CAPI manifests are pinned to v1apha3. See error from Zuul airship-airshipctl-gate-script-runner-docker below:

clusterctl -v5 init --kubeconfig /home/zuul/.airship/kubeconfig-158207872 --kubeconfig-context ephemeral-cluster --core=cluster-api:v0.4.2 --bootstrap=kubeadm:v0.4.2 --control-plane=kubeadm:v0.4.2 --infrastructure=docker:v0.3.11

Using configuration File="/workdir/.cluster-api/clusterctl.yaml" Installing the clusterctl inventory CRD Creating CustomResourceDefinition="providers.clusterctl.cluster.x-k8s.io" Fetching providers Using Override="core-components.yaml" Provider="cluster-api" Version="v0.4.2" Using Override="bootstrap-components.yaml" Provider="bootstrap-kubeadm" Version="v0.4.2" Using Override="control-plane-components.yaml" Provider="control-plane-kubeadm" Version="v0.4.2" Using Override="infrastructure-components.yaml" Provider="infrastructure-docker" Version="v0.3.11" Using Override="metadata.yaml" Provider="cluster-api" Version="v0.4.2" Using Override="metadata.yaml" Provider="bootstrap-kubeadm" Version="v0.4.2" Using Override="metadata.yaml" Provider="control-plane-kubeadm" Version="v0.4.2" Using Override="metadata.yaml" Provider="infrastructure-docker" Version="v0.3.11" Error: current version of clusterctl is only compatible with v1alpha4 providers, detected v1alpha3 for provider infrastructure-docker

shon-phand commented 3 years ago

https://review.opendev.org/c/airship/airshipctl/+/810728