Skip to content

Commit 461a2ff

Browse files
authored
Merge branch 'kubernetes-sigs:main' into main
2 parents 64f9e48 + 0c7eff1 commit 461a2ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1799
-704
lines changed

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ CONVERSION_VERIFIER := $(abspath $(TOOLS_BIN_DIR)/conversion-verifier)
6666
GO_APIDIFF := $(TOOLS_BIN_DIR)/go-apidiff
6767
RELEASE_NOTES := $(TOOLS_BIN_DIR)/release-notes
6868
TOOLING_BINARIES := $(CONTROLLER_GEN) $(CONVERSION_GEN) $(GINKGO) $(GOLANGCI_LINT) $(GOVC) $(KIND) $(KUSTOMIZE) $(CONVERSION_VERIFIER) $(GO_APIDIFF) $(RELEASE_NOTES)
69-
ARTIFACTS_PATH := $(ROOT_DIR)/_artifacts
69+
ARTIFACTS ?= $(ROOT_DIR)/_artifacts
7070

7171
# Set --output-base for conversion-gen if we are not within GOPATH
7272
ifneq ($(abspath $(ROOT_DIR)),$(shell go env GOPATH)/src/sigs.k8s.io/cluster-api-provider-vsphere)
@@ -162,10 +162,11 @@ e2e-templates: ## Generate e2e cluster templates
162162
.PHONY: test-integration
163163
test-integration: e2e-image
164164
test-integration: $(GINKGO) $(KUSTOMIZE) $(KIND)
165-
time $(GINKGO) -v ./test/integration -- --config="$(INTEGRATION_CONF_FILE)" --artifacts-folder="$(ARTIFACTS_PATH)"
165+
time $(GINKGO) -v ./test/integration -- --config="$(INTEGRATION_CONF_FILE)" --artifacts-folder="$(ARTIFACTS)"
166166

167167
GINKGO_FOCUS ?=
168168
GINKGO_SKIP ?=
169+
GINKGO_TEST_TIMEOUT ?= 2h
169170

170171
# to set multiple ginkgo skip flags, if any
171172
ifneq ($(strip $(GINKGO_SKIP)),)
@@ -180,9 +181,10 @@ e2e: $(GINKGO) $(KUSTOMIZE) $(KIND) $(GOVC) ## Run e2e tests
180181
@echo Contents of $(TOOLS_BIN_DIR):
181182
@ls $(TOOLS_BIN_DIR)
182183
@echo
183-
time $(GINKGO) -v -focus="$(GINKGO_FOCUS)" $(_SKIP_ARGS) ./test/e2e -- \
184+
time $(GINKGO) -v -focus="$(GINKGO_FOCUS)" $(_SKIP_ARGS) -timeout=$(GINKGO_TEST_TIMEOUT) \
185+
--output-dir="$(ARTIFACTS)" --junit-report="junit.e2e_suite.1.xml" ./test/e2e -- \
184186
--e2e.config="$(E2E_CONF_FILE)" \
185-
--e2e.artifacts-folder="$(ARTIFACTS_PATH)" \
187+
--e2e.artifacts-folder="$(ARTIFACTS)" \
186188
--e2e.skip-resource-cleanup=$(SKIP_RESOURCE_CLEANUP) \
187189
--e2e.use-existing-cluster="$(USE_EXISTING_CLUSTER)"
188190

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ This provider's versions are compatible with the following versions of Cluster A
5252

5353
Note: These OVAs are not updated for security fixes and it is recommended to always use the latest patch version for the Kubernetes version you wish to run. For production-like environments, it is highly recommended to build and use your own custom images.
5454

55-
| Kubernetes | Ubuntu 18.04 | Ubuntu 20.04 | Photon 3 |
56-
| :--------: | :----------: | :----------: | :------: |
57-
| v1.23.15 | [ova](https://storage.googleapis.com/capv-templates/v1.23.15/ubuntu-1804-kube-v1.23.15.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.23.15/ubuntu-1804-kube-v1.23.15.ova.sha256) | [ova](https://storage.googleapis.com/capv-templates/v1.23.15/ubuntu-2004-kube-v1.23.15.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.23.15/ubuntu-2004-kube-v1.23.15.ova.sha256)| [ova](https://storage.googleapis.com/capv-templates/v1.23.15/photon-3-kube-v1.23.15.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.23.15/photon-3-kube-v1.23.15.ova.sha256) |
58-
| v1.24.9 | [ova](https://storage.googleapis.com/capv-templates/v1.24.9/ubuntu-1804-kube-v1.24.9.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.24.9/ubuntu-1804-kube-v1.24.9.ova.sha256) | [ova](https://storage.googleapis.com/capv-templates/v1.24.9/ubuntu-2004-kube-v1.24.9.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.24.9/ubuntu-2004-kube-v1.24.9.ova.sha256)| [ova](https://storage.googleapis.com/capv-templates/v1.24.9/photon-3-kube-v1.24.9.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.24.9/photon-3-kube-v1.24.9.ova.sha256) |
59-
| v1.25.5 | [ova](https://storage.googleapis.com/capv-templates/v1.25.5/ubuntu-1804-kube-v1.25.5.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.25.5/ubuntu-1804-kube-v1.25.5.ova.sha256) | [ova](https://storage.googleapis.com/capv-templates/v1.25.5/ubuntu-2004-kube-v1.25.5.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.25.5/ubuntu-2004-kube-v1.25.5.ova.sha256)| [ova](https://storage.googleapis.com/capv-templates/v1.25.5/photon-3-kube-v1.25.5.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.25.5/photon-3-kube-v1.25.5.ova.sha256) |
55+
| Kubernetes | Ubuntu 18.04 | Ubuntu 20.04 | Photon 3 | Flatcar Stable |
56+
| :--------: | :----------: | :----------: | :------: | :------------: |
57+
| v1.23.16 | [ova](https://storage.googleapis.com/capv-templates/v1.23.16/ubuntu-1804-kube-v1.23.16.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.23.16/ubuntu-1804-kube-v1.23.16.ova.sha256) | [ova](https://storage.googleapis.com/capv-templates/v1.23.16/ubuntu-2004-kube-v1.23.16.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.23.16/ubuntu-2004-kube-v1.23.16.ova.sha256)| [ova](https://storage.googleapis.com/capv-templates/v1.23.16/photon-3-kube-v1.23.16.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.23.16/photon-3-kube-v1.23.16.ova.sha256) | n/a |
58+
| v1.24.10 | [ova](https://storage.googleapis.com/capv-templates/v1.24.10/ubuntu-1804-kube-v1.24.10.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.24.10/ubuntu-1804-kube-v1.24.10.ova.sha256) | [ova](https://storage.googleapis.com/capv-templates/v1.24.10/ubuntu-2004-kube-v1.24.10.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.24.10/ubuntu-2004-kube-v1.24.10.ova.sha256)| [ova](https://storage.googleapis.com/capv-templates/v1.24.10/photon-3-kube-v1.24.10.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.24.10/photon-3-kube-v1.24.10.ova.sha256) | n/a |
59+
| v1.25.6 | [ova](https://storage.googleapis.com/capv-templates/v1.25.6/ubuntu-1804-kube-v1.25.6.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.25.6/ubuntu-1804-kube-v1.25.6.ova.sha256) | [ova](https://storage.googleapis.com/capv-templates/v1.25.6/ubuntu-2004-kube-v1.25.6.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.25.6/ubuntu-2004-kube-v1.25.6.ova.sha256)| [ova](https://storage.googleapis.com/capv-templates/v1.25.6/photon-3-kube-v1.25.6.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.25.6/photon-3-kube-v1.25.6.ova.sha256) | [ova](https://storage.googleapis.com/capv-templates/v1.25.6/flatcar-stable-3374.2.4-kube-v1.25.6.ova), [sha256](https://storage.googleapis.com/capv-templates/v1.25.6/flatcar-stable-3374.2.4-kube-v1.25.6.ova.sha256) |
6060

6161
A full list of the published machine images for CAPV may be obtained with the following command:
6262

apis/v1beta1/condition_consts.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,19 @@ const (
9393
// NOTE: This reason does not apply to VSphereVM (this state happens after the VSphereVM is in ready state).
9494
WaitingForNetworkAddressesReason = "WaitingForNetworkAddresses"
9595

96-
// TagsAttachmentFailedReason (Severity=Error) documents a VSPhereMachine/VSphereVM tags attachment failure.
96+
// TagsAttachmentFailedReason (Severity=Error) documents a VSphereMachine/VSphereVM tags attachment failure.
9797
TagsAttachmentFailedReason = "TagsAttachmentFailed"
98+
99+
// PCIDevicesDetachedCondition documents the status of the attached PCI devices on the VSphereVM.
100+
// It is a negative condition to notify the user that the device(s) is no longer attached to
101+
// the underlying VM and would require manual intervention to fix the situation.
102+
//
103+
// NOTE: This condition does not apply to VSphereMachine.
104+
PCIDevicesDetachedCondition clusterv1.ConditionType = "PCIDevicesDetached"
105+
106+
// NotFoundReason (Severity=Warning) documents the VSphereVM not having the PCI device attached during VM startup.
107+
// This would indicate that the PCI devices were removed out of band by an external entity.
108+
NotFoundReason = "NotFound"
98109
)
99110

100111
// Conditions and Reasons related to utilizing a VSphereIdentity to make connections to a VCenter.

apis/v1beta1/vspherevm_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ type VSphereVMStatus struct {
142142
}
143143

144144
// +kubebuilder:object:root=true
145-
// +kubebuilder:resource:path=vspherevms,scope=Namespaced
145+
// +kubebuilder:resource:path=vspherevms,scope=Namespaced,categories=cluster-api
146146
// +kubebuilder:storageversion
147147
// +kubebuilder:subresource:status
148148

apis/v1beta1/vspherevm_webhook.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"fmt"
2121
"net"
2222
"reflect"
23-
"strings"
2423

2524
"github.com/pkg/errors"
2625
apierrors "k8s.io/apimachinery/pkg/api/errors"
@@ -44,11 +43,6 @@ func (r *VSphereVM) Default() {
4443
if r.Spec.OS == "" {
4544
r.Spec.OS = Linux
4645
}
47-
48-
// Windows hostnames must be < 16 characters in length
49-
if r.Spec.OS == Windows && len(r.Name) > 15 {
50-
r.Name = strings.TrimSuffix(r.Name[0:9], "-") + "-" + r.Name[len(r.Name)-5:]
51-
}
5246
}
5347

5448
// ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

apis/v1beta1/vspherevm_webhook_test.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ func TestVSphereVM_Default(t *testing.T) {
4545
g.Expect(LinuxVM.Spec.OS).To(Equal(Linux))
4646
g.Expect(WindowsVM.Spec.OS).To(Equal(Windows))
4747
g.Expect(NoOSVM.Spec.OS).To(Equal(Linux))
48-
49-
// WindowsVM gets name updated to be 15 characters. Linux remains unchanged
50-
g.Expect(WindowsVM.Name).To(Equal("cluster-m-2qj6q"))
51-
g.Expect(LinuxVM.Name).To(Equal("linux-control-plane-qkkbv"))
5248
}
5349

5450
//nolint
@@ -81,7 +77,7 @@ func TestVSphereVM_ValidateCreate(t *testing.T) {
8177
wantErr: true,
8278
},
8379
{
84-
name: "name too long for Linux VM",
80+
name: "no error with name too long for Linux VM",
8581
vSphereVM: createVSphereVM(linuxVMName, "foo.com", "", "", []string{"192.168.0.1/32", "192.168.0.3/32"}, nil, Linux),
8682
wantErr: false,
8783
},

clusterctl-settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "infrastructure-vsphere",
33
"config": {
44
"componentsFile": "infrastructure-components.yaml",
5-
"nextVersion": "v1.6.0"
5+
"nextVersion": "v1.7.0"
66
}
77
}

config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspherevms.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ metadata:
99
spec:
1010
group: infrastructure.cluster.x-k8s.io
1111
names:
12+
categories:
13+
- cluster-api
1214
kind: VSphereVM
1315
listKind: VSphereVMList
1416
plural: vspherevms

docs/getting_started.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ vCenter. Ensure you have credentials to your vCenter server (user, password and
4141

4242
#### Uploading the machine images
4343

44-
It is required that machines provisioned by CAPV have cloudinit, kubeadm and a container runtime pre-installed. You can
44+
It is required that machines provisioned by CAPV have cloudinit or Ignition, kubeadm and a container runtime pre-installed. You can
4545
use one of the CAPV machine images generated by SIG Cluster Lifecycle as a VM template.
4646

4747
The machine images are retrievable from public URLs. CAPV currently supports machine images based on Ubuntu 18.04 and
@@ -118,12 +118,11 @@ CONTROL_PLANE_ENDPOINT_IP: "192.168.9.230" # the IP that kube
118118
VIP_NETWORK_INTERFACE: "ens192" # The interface that kube-vip should apply the IP to. Omit to tell kube-vip to autodetect the interface.
119119
VSPHERE_TLS_THUMBPRINT: "..." # sha1 thumbprint of the vcenter certificate: openssl x509 -sha1 -fingerprint -in ca.crt -noout
120120
EXP_CLUSTER_RESOURCE_SET: "true" # This enables the ClusterResourceSet feature that we are using to deploy CSI
121-
VSPHERE_SSH_AUTHORIZED_KEY: "ssh-rsa AAAAB3N..." # The public ssh authorized key on all machines
122-
# in this cluster.
123-
# Set to "" if you don't want to enable SSH,
124-
# or are using another solution.
125-
VSPHERE_STORAGE_POLICY: "" # This is the vSphere storage policy.
126-
# Set it to "" if you don't want to use a storage policy.
121+
VSPHERE_SSH_AUTHORIZED_KEY: "ssh-rsa AAAAB3N..." # The public ssh authorized key on all machines in this cluster.
122+
# Set to "" if you don't want to enable SSH, or are using another solution.
123+
VSPHERE_STORAGE_POLICY: "" # This is the vSphere storage policy. Set it to "" if you don't want to use a storage policy.
124+
"CPI_IMAGE_K8S_VERSION": "v1.25.0" # The version of the vSphere CPI image to be used by the CPI workloads
125+
# Keep this close to the minimum Kubernetes version of the cluster being created.
127126
```
128127

129128
If you are using the **DEPRECATED** `haproxy` flavour you will need to add the following variable to your `clusterctl.yaml`:

docs/ignition.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,20 @@ support Ignition could likely be used as well.
66

77
## Requirements
88

9+
- A vSphere environment
10+
- A Flatcar OVA template (see blow)
911
- Docker
1012
- [Kind][3] version `0.14.0` or higher
1113
- kubectl
1214
- [clusterctl][4]
1315

1416
## Deployment
1517

18+
Ensure your vSphere environment has a Flatcar OVA template either by [building an image][5] using
19+
image-builder (recommended) or by [importing a prebuilt image][6] using a published [OVA URL][7].
20+
Ensure the built/imported image is marked as a template. Use the template name as the value of the
21+
`VSPHERE_TEMPLATE` variable below.
22+
1623
Set required environment variables:
1724

1825
```shell
@@ -171,3 +178,6 @@ kind delete cluster
171178
[2]: https://www.flatcar.org/
172179
[3]: https://kind.sigs.k8s.io/
173180
[4]: https://cluster-api.sigs.k8s.io/user/quick-start.html#install-clusterctl
181+
[5]: https://image-builder.sigs.k8s.io/capi/providers/vsphere.html
182+
[6]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-17BEDA21-43F6-41F4-8FB2-E01D275FE9B4.html
183+
[7]: https://storage.googleapis.com/capv-templates/v1.25.6/flatcar-stable-3374.2.4-kube-v1.25.6.ova

0 commit comments

Comments
 (0)