diff --git a/.builder-image-version.txt b/.builder-image-version.txt index 140333f6d..c2320f5be 100644 --- a/.builder-image-version.txt +++ b/.builder-image-version.txt @@ -1 +1 @@ -1.0.19 +1.0.20 diff --git a/.github/renovate/golang.json5 b/.github/renovate/golang.json5 index 64557900b..e2968299b 100644 --- a/.github/renovate/golang.json5 +++ b/.github/renovate/golang.json5 @@ -4,7 +4,7 @@ }, // https://docs.renovatebot.com/configuration-options/#constraints "constraints": { - "go": "1.21" + "go": "1.22" }, packageRules: [ { diff --git a/.github/workflows/main-promote-builder-image.yml b/.github/workflows/main-promote-builder-image.yml index 966f4e633..f1d13a4c8 100644 --- a/.github/workflows/main-promote-builder-image.yml +++ b/.github/workflows/main-promote-builder-image.yml @@ -10,7 +10,7 @@ jobs: name: Promote Latest tag to Caph Builder Image runs-on: ubuntu-latest container: - image: ghcr.io/syself/caph-builder:1.0.19 + image: ghcr.io/syself/caph-builder:1.0.20 credentials: username: ${{ github.actor }} password: ${{ secrets.github_token }} diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml index 43db07425..23c773286 100644 --- a/.github/workflows/pr-lint.yml +++ b/.github/workflows/pr-lint.yml @@ -23,7 +23,7 @@ jobs: if: github.event_name != 'pull_request_target' || !github.event.pull_request.draft runs-on: ubuntu-latest container: - image: ghcr.io/syself/caph-builder:1.0.19 + image: ghcr.io/syself/caph-builder:1.0.20 credentials: username: ${{ github.actor }} password: ${{ secrets.github_token }} @@ -32,6 +32,7 @@ jobs: uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 - name: Fixup git permissions # https://github.com/actions/checkout/issues/766 diff --git a/.github/workflows/schedule-scan-image.yml b/.github/workflows/schedule-scan-image.yml index 4f48d0366..0904e6039 100644 --- a/.github/workflows/schedule-scan-image.yml +++ b/.github/workflows/schedule-scan-image.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest if: github.repository == 'syself/cluster-api-provider-hetzner' container: - image: ghcr.io/syself/caph-builder:1.0.19 + image: ghcr.io/syself/caph-builder:1.0.20 credentials: username: ${{ github.actor }} password: ${{ secrets.github_token }} diff --git a/.golangci-suggestions.yaml b/.golangci-suggestions.yaml index d11c0a00b..37bcd0869 100644 --- a/.golangci-suggestions.yaml +++ b/.golangci-suggestions.yaml @@ -94,9 +94,9 @@ linters-settings: allow-leading-space: false require-specific: true staticcheck: - go: "1.21" + go: "1.22" stylecheck: - go: "1.21" + go: "1.22" gocritic: enabled-tags: - diagnostic @@ -224,7 +224,7 @@ linters-settings: - ["ID"] # AllowList - ["VM"] # DenyList unused: - go: "1.21" + go: "1.22" usestdlibvars: # Suggest the use of http.MethodXX. # Default: true @@ -282,7 +282,7 @@ issues: exclude-use-default: false run: timeout: 10m - go: "1.21" + go: "1.22" allow-parallel-runners: true modules-download-mode: vendor skip-dirs: diff --git a/.golangci.yaml b/.golangci.yaml index f16a9a96b..537217898 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -118,7 +118,7 @@ linters-settings: - rangeValCopy - hugeParam unused: - go: "1.21" + go: "1.22" issues: max-same-issues: 0 max-issues-per-linter: 0 @@ -213,4 +213,4 @@ run: - "test" allow-parallel-runners: true modules-download-mode: readonly - go: '1.21' + go: "1.22" diff --git a/go.mod b/go.mod index b237098b4..3b042db2a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/syself/cluster-api-provider-hetzner -go 1.21 +go 1.22 require ( github.com/blang/semver/v4 v4.0.0 diff --git a/hack/golang-modules-update.sh b/hack/golang-modules-update.sh index c2d0832f4..a3fb78a71 100755 --- a/hack/golang-modules-update.sh +++ b/hack/golang-modules-update.sh @@ -14,17 +14,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -o errexit -set -o nounset -set -o pipefail +trap 'echo "ERROR: A command has failed. Exiting the script. Line was ($0:$LINENO): $(sed -n "${LINENO}p" "$0")"; exit 3' ERR +set -Eeuo pipefail -REPO_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/..) +REPO_ROOT=$(realpath "$(dirname "${BASH_SOURCE[0]}")/..") cd "${REPO_ROOT}" || exit 1 DIRS="./ ./hack/tools" for DIR in ${DIRS}; do - cd ${REPO_ROOT}/${DIR} && go mod download - cd ${REPO_ROOT}/${DIR} && go mod verify - cd ${REPO_ROOT}/${DIR} && go mod tidy - cd ${REPO_ROOT}/${DIR} && go mod vendor + cd "${REPO_ROOT}/${DIR}" && go mod download + cd "${REPO_ROOT}/${DIR}" && go mod verify + cd "${REPO_ROOT}/${DIR}" && go mod tidy + cd "${REPO_ROOT}/${DIR}" && go mod vendor done diff --git a/images/builder/Dockerfile b/images/builder/Dockerfile index f1923a6d6..5971eac92 100644 --- a/images/builder/Dockerfile +++ b/images/builder/Dockerfile @@ -45,7 +45,7 @@ FROM docker.io/aquasec/trivy:0.54.1@sha256:e654e95e0753d2daeb4d5b1c2791eee6a1262 ############################ # Caph Build Image Base # ############################ -FROM docker.io/library/golang:1.21.5-bullseye@sha256:1e3c713a9f5419786d85d0feb343ceff119d0f82f7ab0fefffa4150420c3ad7f +FROM docker.io/library/golang:1.22.6-bullseye@sha256:825f81571780b54e553c4d7f21081efd47cd125dd7a8b3343a4591aa02f4816a # update: datasource=repology depName=debian_11/skopeo versioning=loose ENV SKOPEO_VERSION="1.2.2+dfsg1-1+b6" diff --git a/images/caph/Dockerfile b/images/caph/Dockerfile index f340c87a0..75df3f434 100644 --- a/images/caph/Dockerfile +++ b/images/caph/Dockerfile @@ -13,7 +13,7 @@ # limitations under the License. # Build the manager binary -FROM --platform=${BUILDPLATFORM} docker.io/library/golang:1.21.6-bullseye@sha256:c62751ac12cad0c514d941e36f846c1c440ca9e8ec08dd87d022fb03f0887a9b AS build +FROM --platform=${BUILDPLATFORM} docker.io/library/golang:1.22.6-bullseye@sha256:825f81571780b54e553c4d7f21081efd47cd125dd7a8b3343a4591aa02f4816a AS build ARG TARGETOS TARGETARCH COPY . /src/cluster-api-provider-hetzner diff --git a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/existing-my-cluster.yaml b/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/existing-my-cluster.yaml deleted file mode 100644 index 0e1b816fd..000000000 --- a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/existing-my-cluster.yaml +++ /dev/null @@ -1,130 +0,0 @@ -apiVersion: cluster.x-k8s.io/v1beta1 -kind: Cluster -metadata: - name: "my-cluster" - namespace: default - labels: - cni: kindnet -spec: - clusterNetwork: - services: - cidrBlocks: ["10.128.0.0/12"] - pods: - cidrBlocks: ["192.168.0.0/16"] - serviceDomain: "cluster.local" - controlPlaneEndpoint: - host: 172.19.0.4 - port: 6443 - controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 - kind: KubeadmControlPlane - name: my-cluster-fwbpf - namespace: default - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: DockerCluster - name: my-cluster-zrq96 - namespace: default - topology: - class: my-cluster-class - version: v1.21.2 - controlPlane: - metadata: {} - replicas: 1 ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerCluster -metadata: - annotations: - cluster.x-k8s.io/cloned-from-groupkind: DockerClusterTemplate.infrastructure.cluster.x-k8s.io - cluster.x-k8s.io/cloned-from-name: my-cluster - finalizers: - - dockercluster.infrastructure.cluster.x-k8s.io - labels: - cluster.x-k8s.io/cluster-name: my-cluster - topology.cluster.x-k8s.io/owned: "" - name: my-cluster-zrq96 - namespace: default -spec: - controlPlaneEndpoint: - host: 172.19.0.4 - port: 6443 - loadBalancer: {} ---- -apiVersion: controlplane.cluster.x-k8s.io/v1beta1 -kind: KubeadmControlPlane -metadata: - annotations: - cluster.x-k8s.io/cloned-from-groupkind: KubeadmControlPlaneTemplate.controlplane.cluster.x-k8s.io - cluster.x-k8s.io/cloned-from-name: control-plane - finalizers: - - kubeadm.controlplane.cluster.x-k8s.io - labels: - cluster.x-k8s.io/cluster-name: my-cluster - topology.cluster.x-k8s.io/owned: "" - name: my-cluster-fwbpf - namespace: default - ownerReferences: - - apiVersion: cluster.x-k8s.io/v1beta1 - blockOwnerDeletion: true - controller: true - kind: Cluster - name: my-cluster - uid: 3ba5ce4f-d279-4edb-8ade-62a2381d11a8 -spec: - kubeadmConfigSpec: - clusterConfiguration: - apiServer: - certSANs: - - localhost - - 127.0.0.1 - dns: {} - etcd: {} - networking: {} - scheduler: {} - initConfiguration: - localAPIEndpoint: {} - nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. - joinConfiguration: - discovery: {} - nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. - machineTemplate: - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: DockerMachineTemplate - name: my-cluster-control-plane-44cd4 - namespace: default - metadata: - labels: - cluster.x-k8s.io/cluster-name: my-cluster - topology.cluster.x-k8s.io/owned: "" - nodeDrainTimeout: 1s - replicas: 1 - rolloutStrategy: - rollingUpdate: - maxSurge: 1 - type: RollingUpdate - version: v1.21.2 ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerMachineTemplate -metadata: - annotations: - cluster.x-k8s.io/cloned-from-groupkind: DockerMachineTemplate.infrastructure.cluster.x-k8s.io - cluster.x-k8s.io/cloned-from-name: control-plane - labels: - cluster.x-k8s.io/cluster-name: my-cluster - topology.cluster.x-k8s.io/owned: "" - name: my-cluster-control-plane-44cd4 - namespace: default - ownerReferences: - - apiVersion: cluster.x-k8s.io/v1beta1 - kind: Cluster - name: my-cluster - uid: 3ba5ce4f-d279-4edb-8ade-62a2381d11a8 -spec: - template: - spec: - extraMounts: - - containerPath: /var/run/docker.sock - hostPath: /var/run/docker.sock diff --git a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/existing-my-second-cluster.yaml b/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/existing-my-second-cluster.yaml deleted file mode 100644 index 1122bf567..000000000 --- a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/existing-my-second-cluster.yaml +++ /dev/null @@ -1,131 +0,0 @@ ---- -apiVersion: cluster.x-k8s.io/v1beta1 -kind: Cluster -metadata: - name: "my-second-cluster" - namespace: default - labels: - cni: kindnet -spec: - clusterNetwork: - services: - cidrBlocks: ["10.128.0.0/12"] - pods: - cidrBlocks: ["192.168.0.0/16"] - serviceDomain: "cluster.local" - controlPlaneEndpoint: - host: 172.19.0.4 - port: 6443 - controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 - kind: KubeadmControlPlane - name: my-second-cluster-fwbpf - namespace: default - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: DockerCluster - name: my-second-cluster-zrq96 - namespace: default - topology: - class: my-cluster-class - version: v1.21.2 - controlPlane: - metadata: {} - replicas: 1 ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerCluster -metadata: - annotations: - cluster.x-k8s.io/cloned-from-groupkind: DockerClusterTemplate.infrastructure.cluster.x-k8s.io - cluster.x-k8s.io/cloned-from-name: my-cluster - finalizers: - - dockercluster.infrastructure.cluster.x-k8s.io - labels: - cluster.x-k8s.io/cluster-name: my-cluster - topology.cluster.x-k8s.io/owned: "" - name: my-second-cluster-zrq96 - namespace: default -spec: - controlPlaneEndpoint: - host: 172.19.0.4 - port: 6443 - loadBalancer: {} ---- -apiVersion: controlplane.cluster.x-k8s.io/v1beta1 -kind: KubeadmControlPlane -metadata: - annotations: - cluster.x-k8s.io/cloned-from-groupkind: KubeadmControlPlaneTemplate.controlplane.cluster.x-k8s.io - cluster.x-k8s.io/cloned-from-name: control-plane - finalizers: - - kubeadm.controlplane.cluster.x-k8s.io - labels: - cluster.x-k8s.io/cluster-name: my-cluster - topology.cluster.x-k8s.io/owned: "" - name: my-second-cluster-fwbpf - namespace: default - ownerReferences: - - apiVersion: cluster.x-k8s.io/v1beta1 - blockOwnerDeletion: true - controller: true - kind: Cluster - name: my-second-cluster - uid: 3ba5ce4f-d279-4edb-8ade-62a2381d11a9 -spec: - kubeadmConfigSpec: - clusterConfiguration: - apiServer: - certSANs: - - localhost - - 127.0.0.1 - dns: {} - etcd: {} - networking: {} - scheduler: {} - initConfiguration: - localAPIEndpoint: {} - nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. - joinConfiguration: - discovery: {} - nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. - machineTemplate: - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: DockerMachineTemplate - name: my-cluster-control-plane-44cd4 - namespace: default - metadata: - labels: - cluster.x-k8s.io/cluster-name: my-cluster - topology.cluster.x-k8s.io/owned: "" - nodeDrainTimeout: 1s - replicas: 1 - rolloutStrategy: - rollingUpdate: - maxSurge: 1 - type: RollingUpdate - version: v1.21.2 ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerMachineTemplate -metadata: - annotations: - cluster.x-k8s.io/cloned-from-groupkind: DockerMachineTemplate.infrastructure.cluster.x-k8s.io - cluster.x-k8s.io/cloned-from-name: control-plane - labels: - cluster.x-k8s.io/cluster-name: my-cluster - topology.cluster.x-k8s.io/owned: "" - name: my-second-cluster-control-plane-44cd4 - namespace: default - ownerReferences: - - apiVersion: cluster.x-k8s.io/v1beta1 - kind: Cluster - name: my-second-cluster - uid: 3ba5ce4f-d279-4edb-8ade-62a2381d11a9 -spec: - template: - spec: - extraMounts: - - containerPath: /var/run/docker.sock - hostPath: /var/run/docker.sock diff --git a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/mock-CRDs.yaml b/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/mock-CRDs.yaml deleted file mode 100644 index 20fdfc1aa..000000000 --- a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/mock-CRDs.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - cluster.x-k8s.io/provider: infrastructure-docker - cluster.x-k8s.io/v1beta1: v1beta1 - name: dockerclusters.infrastructure.cluster.x-k8s.io ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - cluster.x-k8s.io/provider: infrastructure-docker - cluster.x-k8s.io/v1beta1: v1beta1 - name: dockerclustertemplates.infrastructure.cluster.x-k8s.io ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - cluster.x-k8s.io/provider: control-plane-kubeadm - cluster.x-k8s.io/v1beta1: v1beta1 - name: kubeadmcontrolplanetemplates.controlplane.cluster.x-k8s.io ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - cluster.x-k8s.io/provider: control-plane-kubeadm - cluster.x-k8s.io/v1beta1: v1beta1 - name: kubeadmcontrolplanes.controlplane.cluster.x-k8s.io ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - cluster.x-k8s.io/provider: infrastructure-docker - cluster.x-k8s.io/v1beta1: v1beta1 - name: dockermachinetemplates.infrastructure.cluster.x-k8s.io \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/modified-CP-dockermachinetemplate.yaml b/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/modified-CP-dockermachinetemplate.yaml deleted file mode 100644 index 18fa50205..000000000 --- a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/modified-CP-dockermachinetemplate.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerMachineTemplate -metadata: - name: "control-plane" - namespace: default -spec: - template: - metadata: - labels: - docker-machine-template: test-template-control-plane - spec: - extraMounts: - - containerPath: "/var/run/docker.sock" - hostPath: "/var/run/docker.sock" \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/modified-my-cluster.yaml b/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/modified-my-cluster.yaml deleted file mode 100644 index 7d0d7db18..000000000 --- a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/modified-my-cluster.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: cluster.x-k8s.io/v1beta1 -kind: Cluster -metadata: - name: "my-cluster" - namespace: default - labels: - cni: kindnet -spec: - clusterNetwork: - services: - cidrBlocks: ["10.128.0.0/12"] - pods: - cidrBlocks: ["192.168.0.0/16"] - serviceDomain: "cluster.local" - topology: - class: my-cluster-class - version: v1.21.2 - controlPlane: - metadata: {} - replicas: 3 \ No newline at end of file diff --git a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/my-cluster-class.yaml b/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/my-cluster-class.yaml deleted file mode 100644 index 5f580a85f..000000000 --- a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/my-cluster-class.yaml +++ /dev/null @@ -1,71 +0,0 @@ -apiVersion: cluster.x-k8s.io/v1beta1 -kind: ClusterClass -metadata: - name: my-cluster-class - namespace: default -spec: - controlPlane: - ref: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 - kind: KubeadmControlPlaneTemplate - name: control-plane - namespace: default - machineInfrastructure: - ref: - kind: DockerMachineTemplate - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - name: "control-plane" - namespace: default - infrastructure: - ref: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: DockerClusterTemplate - name: my-cluster - namespace: default ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerClusterTemplate -metadata: - name: my-cluster - namespace: default -spec: - template: - spec: {} ---- -kind: KubeadmControlPlaneTemplate -apiVersion: controlplane.cluster.x-k8s.io/v1beta1 -metadata: - name: "control-plane" - namespace: default -spec: - template: - spec: - replicas: 1 - machineTemplate: - nodeDrainTimeout: 1s - infrastructureRef: - kind: DockerMachineTemplate - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - name: "control-plane" - namespace: default - kubeadmConfigSpec: - clusterConfiguration: - apiServer: - certSANs: [ localhost, 127.0.0.1 ] - initConfiguration: - nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. - joinConfiguration: - nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. - version: v1.21.2 ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerMachineTemplate -metadata: - name: "control-plane" - namespace: default -spec: - template: - spec: - extraMounts: - - containerPath: "/var/run/docker.sock" - hostPath: "/var/run/docker.sock" diff --git a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/new-clusterclass-and-cluster.yaml b/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/new-clusterclass-and-cluster.yaml deleted file mode 100644 index 1473bdb34..000000000 --- a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/new-clusterclass-and-cluster.yaml +++ /dev/null @@ -1,165 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: default -spec: {} ---- -apiVersion: cluster.x-k8s.io/v1beta1 -kind: ClusterClass -metadata: - name: my-cluster-class - namespace: default -spec: - variables: - - name: imageRepository - required: true - schema: - openAPIV3Schema: - type: string - default: "registry.k8s.io" - example: "registry.k8s.io" - controlPlane: - ref: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 - kind: KubeadmControlPlaneTemplate - name: control-plane - namespace: default - machineInfrastructure: - ref: - kind: DockerMachineTemplate - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - name: "control-plane" - namespace: default - infrastructure: - ref: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: DockerClusterTemplate - name: my-cluster - namespace: default - workers: - machineDeployments: - - class: "default-worker" - template: - bootstrap: - ref: - apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 - kind: KubeadmConfigTemplate - name: docker-worker-bootstraptemplate - infrastructure: - ref: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: DockerMachineTemplate - name: docker-worker-machinetemplate - - class: "default-worker-2" - template: - bootstrap: - ref: - apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 - kind: KubeadmConfigTemplate - name: docker-worker-bootstraptemplate - infrastructure: - ref: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: DockerMachineTemplate - name: docker-worker-machinetemplate ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerClusterTemplate -metadata: - name: my-cluster - namespace: default -spec: - template: - spec: {} ---- -kind: KubeadmControlPlaneTemplate -apiVersion: controlplane.cluster.x-k8s.io/v1beta1 -metadata: - name: "control-plane" - namespace: default -spec: - template: - spec: - replicas: 1 - machineTemplate: - nodeDrainTimeout: 1s - infrastructureRef: - kind: DockerMachineTemplate - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - name: "control-plane" - namespace: default - kubeadmConfigSpec: - clusterConfiguration: - apiServer: - certSANs: [ localhost, 127.0.0.1 ] - initConfiguration: - nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. - joinConfiguration: - nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. - version: v1.21.2 ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerMachineTemplate -metadata: - name: "control-plane" - namespace: default -spec: - template: - spec: - preLoadImages: - - gcr.io/kakaraparthy-devel/kindest/kindnetd:0.5.4 - extraMounts: - - containerPath: "/var/run/docker.sock" - hostPath: "/var/run/docker.sock" ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerMachineTemplate -metadata: - name: "docker-worker-machinetemplate" - namespace: default -spec: - template: - spec: - preLoadImages: - - gcr.io/kakaraparthy-devel/kindest/kindnetd:0.5.4 ---- -apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 -kind: KubeadmConfigTemplate -metadata: - name: "docker-worker-bootstraptemplate" - namespace: default -spec: - template: - spec: - joinConfiguration: - nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. - ---- -apiVersion: cluster.x-k8s.io/v1beta1 -kind: Cluster -metadata: - name: "my-cluster" - namespace: default - labels: - cni: kindnet -spec: - clusterNetwork: - services: - cidrBlocks: ["10.128.0.0/12"] - pods: - cidrBlocks: ["192.168.0.0/16"] - serviceDomain: "cluster.local" - topology: - class: my-cluster-class - version: v1.21.2 - controlPlane: - metadata: {} - replicas: 1 - workers: - machineDeployments: - - class: "default-worker" - name: "md-0" - replicas: 1 - - class: "default-worker" - name: "md-1" - replicas: 1 diff --git a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/objects-in-different-namespaces.yaml b/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/objects-in-different-namespaces.yaml deleted file mode 100644 index 1be92eeba..000000000 --- a/vendor/sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster/assets/topology-test/objects-in-different-namespaces.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: cluster.x-k8s.io/v1beta1 -kind: Cluster -metadata: - name: "my-cluster" - namespace: namespace-one - labels: - cni: kindnet -spec: - clusterNetwork: - services: - cidrBlocks: ["10.128.0.0/12"] - pods: - cidrBlocks: ["192.168.0.0/16"] - serviceDomain: "cluster.local" - topology: - class: my-cluster-class - version: v1.21.2 - controlPlane: - metadata: {} - replicas: 1 ---- -apiVersion: cluster.x-k8s.io/v1beta1 -kind: Cluster -metadata: - name: "my-second-cluster" - namespace: namespace-two - labels: - cni: kindnet -spec: - clusterNetwork: - services: - cidrBlocks: ["10.128.0.0/12"] - pods: - cidrBlocks: ["192.168.0.0/16"] - serviceDomain: "cluster.local" - topology: - class: my-second-cluster-class - version: v1.21.2 - controlPlane: - metadata: {} - replicas: 1 \ No newline at end of file