Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Jun 21, 2024
1 parent bd600b5 commit 39c1a2c
Show file tree
Hide file tree
Showing 19 changed files with 30 additions and 50 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ _artifacts/
test/e2e/data/infrastructure-vsphere-govmomi/main/**/clusterclass-quick-start.yaml
test/e2e/data/infrastructure-vsphere-govmomi/main/**/cluster-template*.yaml
test/e2e/data/infrastructure-vsphere-govmomi/*/cluster-template*.yaml
test/e2e/data/infrastructure-vsphere-govmomi/*/clusterclass-*quick-start.yaml
test/e2e/data/infrastructure-vsphere-govmomi/*/clusterclass-quick-start*.yaml

test/e2e/data/infrastructure-vsphere-supervisor/main/**/clusterclass-quick-start-supervisor.yaml
test/e2e/data/infrastructure-vsphere-supervisor/main/**/cluster-template*.yaml
test/e2e/data/infrastructure-vsphere-supervisor/*/cluster-template*.yaml
test/e2e/data/infrastructure-vsphere-supervisor/*/clusterclass-*quick-start-supervisor.yaml
test/e2e/data/infrastructure-vsphere-supervisor/*/clusterclass-quick-start*-supervisor.yaml

# env vars file used in getting-started.md and manifests generation
envvars.txt
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ generate-e2e-templates-main: $(KUSTOMIZE) ## Generate test templates for the mai
# generate clusterclass and cluster topology
cp "$(RELEASE_DIR)/main/clusterclass-template.yaml" "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/clusterclass/clusterclass-quick-start.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/clusterclass" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/clusterclass-quick-start.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/clusterclass-runtimesdk" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/clusterclass-runtimesdk-quick-start.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/clusterclass-runtimesdk" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/clusterclass-quick-start-runtimesdk.yaml"
cp "$(RELEASE_DIR)/main/cluster-template-topology.yaml" "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/topology/cluster-template-topology.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/topology" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/cluster-template-topology.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/topology-runtimesdk" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/main/cluster-template-topology-runtimesdk.yaml"
Expand All @@ -405,7 +405,7 @@ generate-e2e-templates-main: $(KUSTOMIZE) ## Generate test templates for the mai
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/base" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/cluster-template-supervisor.yaml"
cp "$(RELEASE_DIR)/main/clusterclass-template-supervisor.yaml" "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/clusterclass/clusterclass-quick-start-supervisor.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/clusterclass" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/clusterclass-quick-start-supervisor.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/clusterclass-runtimesdk" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/clusterclass-runtimesdk-quick-start-supervisor.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/clusterclass-runtimesdk" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/clusterclass-quick-start-runtimesdk-supervisor.yaml"
cp "$(RELEASE_DIR)/main/cluster-template-topology-supervisor.yaml" "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/topology/cluster-template-topology-supervisor.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/topology" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/cluster-template-topology-supervisor.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/topology-runtimesdk" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/cluster-template-topology-runtimesdk-supervisor.yaml"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module sigs.k8s.io/cluster-api-provider-vsphere

go 1.22.0

replace sigs.k8s.io/cluster-api => github.com/chrischdi/cluster-api v1.1.0-beta.2.0.20240620071808-ca91fe8eb205
replace sigs.k8s.io/cluster-api => github.com/chrischdi/cluster-api v1.1.0-beta.2.0.20240620093716-1cd459403b31

replace github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chrischdi/cluster-api v1.1.0-beta.2.0.20240620071808-ca91fe8eb205 h1:h50NJ0oj1C/EUPIJtPdl7b2/5VDylPXSrfVX3teDN5g=
github.com/chrischdi/cluster-api v1.1.0-beta.2.0.20240620071808-ca91fe8eb205/go.mod h1:qHbkT1bbJNF/+A+L7crH89dC+rApolQHVwieHMXIc3k=
github.com/chrischdi/cluster-api v1.1.0-beta.2.0.20240620093716-1cd459403b31 h1:XE98iPjQRF96KIATLhTuf6o2HOzC+La8cB4iZUG706I=
github.com/chrischdi/cluster-api v1.1.0-beta.2.0.20240620093716-1cd459403b31/go.mod h1:qHbkT1bbJNF/+A+L7crH89dC+rApolQHVwieHMXIc3k=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/config/vsphere.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ providers:
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/main/cluster-template-topology-runtimesdk.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/main/cluster-template.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/main/clusterclass-quick-start.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/main/clusterclass-runtimesdk-quick-start.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/main/clusterclass-quick-start-runtimesdk.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/main/cluster-template-topology-supervisor.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/main/cluster-template-supervisor.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/main/clusterclass-quick-start-supervisor.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/main/clusterclass-runtimesdk-quick-start-supervisor.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/main/clusterclass-quick-start-runtimesdk-supervisor.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/main/cluster-template-install-on-bootstrap-supervisor.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/main/cluster-template-conformance-supervisor.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/main/cluster-template-topology-runtimesdk-supervisor.yaml"
Expand Down Expand Up @@ -232,7 +232,7 @@ providers:
- old: "imagePullPolicy: Always"
new: "imagePullPolicy: IfNotPresent"

- name: test-extension
- name: capv-test-extension
type: RuntimeExtensionProvider # test-extension isn't a provider, but we fake it is so it can be handled by the clusterctl machinery.
versions:
- name: v1.11.99
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
value:
name: test-patch
external:
generateExtension: generate-patches.test-extension
validateExtension: validate-topology.test-extension
discoverVariablesExtension: discover-variables.test-extension
generateExtension: generate-patches.capv-test-extension
validateExtension: validate-topology.capv-test-extension
discoverVariablesExtension: discover-variables.capv-test-extension
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,3 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../topology
patches:
- target:
kind: Cluster
path: ./patch-clusterclass.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
value:
name: test-patch
external:
generateExtension: generate-patches.test-extension
validateExtension: validate-topology.test-extension
discoverVariablesExtension: discover-variables.test-extension
generateExtension: generate-patches.capv-test-extension
validateExtension: validate-topology.capv-test-extension
discoverVariablesExtension: discover-variables.capv-test-extension
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,3 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../topology
patches:
- target:
kind: Cluster
path: ./patch-clusterclass.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion test/e2e/e2e_setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func Setup(specName string, f func(testSpecificSettings func() testSettings), op
func setupNamespaceWithVMOperatorDependenciesVCSim(managementClusterProxy framework.ClusterProxy, workloadClusterNamespace string) {
c := managementClusterProxy.GetClient()

vCenterSimulator, err := vspherevcsim.Get(ctx, bootstrapClusterProxy.GetClient())
vCenterSimulator, err := vspherevcsim.Get(ctx, c)
Expect(err).ToNot(HaveOccurred(), "Failed to get VCenterSimulator")

Byf("Creating VMOperatorDependencies %s", klog.KRef(workloadClusterNamespace, "vcsim"))
Expand Down
4 changes: 2 additions & 2 deletions test/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module sigs.k8s.io/cluster-api-provider-vsphere/test

go 1.22.0

replace sigs.k8s.io/cluster-api => github.com/chrischdi/cluster-api v1.1.0-beta.2.0.20240620071808-ca91fe8eb205
replace sigs.k8s.io/cluster-api => github.com/chrischdi/cluster-api v1.1.0-beta.2.0.20240620093716-1cd459403b31

replace sigs.k8s.io/cluster-api/test => github.com/chrischdi/cluster-api/test v1.1.0-beta.2.0.20240620071808-ca91fe8eb205
replace sigs.k8s.io/cluster-api/test => github.com/chrischdi/cluster-api/test v1.1.0-beta.2.0.20240620093716-1cd459403b31

replace sigs.k8s.io/cluster-api-provider-vsphere => ../

Expand Down
8 changes: 4 additions & 4 deletions test/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chrischdi/cluster-api v1.1.0-beta.2.0.20240620071808-ca91fe8eb205 h1:h50NJ0oj1C/EUPIJtPdl7b2/5VDylPXSrfVX3teDN5g=
github.com/chrischdi/cluster-api v1.1.0-beta.2.0.20240620071808-ca91fe8eb205/go.mod h1:qHbkT1bbJNF/+A+L7crH89dC+rApolQHVwieHMXIc3k=
github.com/chrischdi/cluster-api/test v1.1.0-beta.2.0.20240620071808-ca91fe8eb205 h1:hSur8XPCvlAP8sRy8xHwvkkqskWNnYOoQqXdPlXIcq4=
github.com/chrischdi/cluster-api/test v1.1.0-beta.2.0.20240620071808-ca91fe8eb205/go.mod h1:qLPwUXB4tqNza8Ej6Ya/WYgWHSzAnmiXJ29dRXpBXXE=
github.com/chrischdi/cluster-api v1.1.0-beta.2.0.20240620093716-1cd459403b31 h1:XE98iPjQRF96KIATLhTuf6o2HOzC+La8cB4iZUG706I=
github.com/chrischdi/cluster-api v1.1.0-beta.2.0.20240620093716-1cd459403b31/go.mod h1:qHbkT1bbJNF/+A+L7crH89dC+rApolQHVwieHMXIc3k=
github.com/chrischdi/cluster-api/test v1.1.0-beta.2.0.20240620093716-1cd459403b31 h1:ZubOIGNEVcxHN3V9Tgsr0w0/x3zeCG6F+5ngV+o1efY=
github.com/chrischdi/cluster-api/test v1.1.0-beta.2.0.20240620093716-1cd459403b31/go.mod h1:qLPwUXB4tqNza8Ej6Ya/WYgWHSzAnmiXJ29dRXpBXXE=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
Expand Down
2 changes: 1 addition & 1 deletion test/infrastructure/test-extension/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# test-extension
# CAPV test-extension

Provide a minimal implementation of a Runtime SDK test-extension.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: ExtensionConfig
metadata:
annotations:
runtime.cluster.x-k8s.io/inject-ca-from-secret: vmware-system-test-extension/vmware-system-test-extension-webhook-service-cert
name: test-extension
name: capv-test-extension
spec:
clientConfig:
service:
Expand Down
2 changes: 1 addition & 1 deletion test/infrastructure/test-extension/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var (
// NOTE: it is not mandatory to use controller runtime utilities in custom RuntimeExtension, but it is recommended
// because it makes log from those components similar to log from controllers.
setupLog = ctrl.Log.WithName("setup")
controllerName = "cluster-api-test-extension-manager"
controllerName = "capv-test-extension-manager"

// flags.
enableLeaderElection bool
Expand Down
4 changes: 2 additions & 2 deletions test/infrastructure/test-extension/tilt-provider.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
- name: vsphere-test-extension
- name: capv-test-extension
config:
version: v1.11.99
image: gcr.io/k8s-staging-capi-vsphere/cluster-api-test-extension
live_reload_deps:
- main.go
- controllers
label: VSPHERE_EXTENSION
label: CAPV_EXTENSION
additional_resources:
- config/tilt/extensionconfig.yaml
4 changes: 2 additions & 2 deletions tilt-provider.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: vsphere
config:
version: v1.10.99
version: v1.11.99
image: gcr.io/k8s-staging-capi-vsphere/cluster-api-vsphere-controller
live_reload_deps:
- main.go
Expand All @@ -15,7 +15,7 @@
label: CAPV
- name: vsphere-supervisor
config:
version: v1.10.99
version: v1.11.99
image: gcr.io/k8s-staging-capi-vsphere/cluster-api-vsphere-controller
live_reload_deps:
- main.go
Expand Down

0 comments on commit 39c1a2c

Please sign in to comment.