chore: make qemu check flag consistent with code

Restructure code as per changes from #9198.

This makes the flag name to be in sync with what it actually does.

Signed-off-by: Noel Georgi <git@frezbo.dev>
This commit is contained in:
Noel Georgi 2024-08-20 18:22:34 +05:30
parent fe52cb0749
commit 36f83eea9f
No known key found for this signature in database
GPG Key ID: 21A9F444075C9E36
6 changed files with 96 additions and 96 deletions

View File

@ -997,7 +997,7 @@ jobs:
WITH_CONFIG_PATCH: '[{"op": "add", "path": "/cluster/network", "value": {"cni": {"name": "none"}}}]'
WITH_CUSTOM_CNI: cilium
WITH_FIREWALL: accept
WITH_SKIP_BOOT_PHASE_FINISHED_CHECK: "yes"
WITH_SKIP_K8S_NODE_READINESS_CHECK: "yes"
run: |
sudo -E make e2e-qemu
- name: e2e-cilium-strict
@ -1009,7 +1009,7 @@ jobs:
WITH_CONFIG_PATCH: '[{"op": "add", "path": "/cluster/network", "value": {"cni": {"name": "none"}}}, {"op": "add", "path": "/cluster/proxy", "value": {"disabled": true}}]'
WITH_CUSTOM_CNI: cilium
WITH_FIREWALL: accept
WITH_SKIP_BOOT_PHASE_FINISHED_CHECK: "yes"
WITH_SKIP_K8S_NODE_READINESS_CHECK: "yes"
run: |
sudo -E make e2e-qemu
- name: e2e-cilium-strict-kubespan
@ -1022,7 +1022,7 @@ jobs:
WITH_CUSTOM_CNI: cilium
WITH_FIREWALL: accept
WITH_KUBESPAN: "true"
WITH_SKIP_BOOT_PHASE_FINISHED_CHECK: "yes"
WITH_SKIP_K8S_NODE_READINESS_CHECK: "yes"
run: |
sudo -E make e2e-qemu
- name: save artifacts

View File

@ -82,7 +82,7 @@ jobs:
WITH_CONFIG_PATCH: '[{"op": "add", "path": "/cluster/network", "value": {"cni": {"name": "none"}}}]'
WITH_CUSTOM_CNI: cilium
WITH_FIREWALL: accept
WITH_SKIP_BOOT_PHASE_FINISHED_CHECK: "yes"
WITH_SKIP_K8S_NODE_READINESS_CHECK: "yes"
run: |
sudo -E make e2e-qemu
- name: e2e-cilium-strict
@ -94,7 +94,7 @@ jobs:
WITH_CONFIG_PATCH: '[{"op": "add", "path": "/cluster/network", "value": {"cni": {"name": "none"}}}, {"op": "add", "path": "/cluster/proxy", "value": {"disabled": true}}]'
WITH_CUSTOM_CNI: cilium
WITH_FIREWALL: accept
WITH_SKIP_BOOT_PHASE_FINISHED_CHECK: "yes"
WITH_SKIP_K8S_NODE_READINESS_CHECK: "yes"
run: |
sudo -E make e2e-qemu
- name: e2e-cilium-strict-kubespan
@ -107,7 +107,7 @@ jobs:
WITH_CUSTOM_CNI: cilium
WITH_FIREWALL: accept
WITH_KUBESPAN: "true"
WITH_SKIP_BOOT_PHASE_FINISHED_CHECK: "yes"
WITH_SKIP_K8S_NODE_READINESS_CHECK: "yes"
run: |
sudo -E make e2e-qemu
- name: save artifacts

View File

@ -1016,7 +1016,7 @@ spec:
withSudo: true
environment:
SHORT_INTEGRATION_TEST: yes
WITH_SKIP_BOOT_PHASE_FINISHED_CHECK: yes
WITH_SKIP_K8S_NODE_READINESS_CHECK: yes
WITH_CUSTOM_CNI: cilium
WITH_FIREWALL: accept
QEMU_WORKERS: 2
@ -1027,7 +1027,7 @@ spec:
withSudo: true
environment:
SHORT_INTEGRATION_TEST: yes
WITH_SKIP_BOOT_PHASE_FINISHED_CHECK: yes
WITH_SKIP_K8S_NODE_READINESS_CHECK: yes
WITH_CUSTOM_CNI: cilium
WITH_FIREWALL: accept
QEMU_WORKERS: 2
@ -1039,7 +1039,7 @@ spec:
withSudo: true
environment:
SHORT_INTEGRATION_TEST: yes
WITH_SKIP_BOOT_PHASE_FINISHED_CHECK: yes
WITH_SKIP_K8S_NODE_READINESS_CHECK: yes
WITH_CUSTOM_CNI: cilium
WITH_FIREWALL: accept
WITH_KUBESPAN: true

View File

@ -101,87 +101,87 @@ const (
)
var (
talosconfig string
nodeImage string
nodeInstallImage string
registryMirrors []string
registryInsecure []string
kubernetesVersion string
nodeVmlinuzPath string
nodeInitramfsPath string
nodeISOPath string
nodeDiskImagePath string
nodeIPXEBootScript string
applyConfigEnabled bool
bootloaderEnabled bool
uefiEnabled bool
tpm2Enabled bool
extraUEFISearchPaths []string
configDebug bool
networkCIDR string
networkNoMasqueradeCIDRs []string
networkMTU int
networkIPv4 bool
networkIPv6 bool
wireguardCIDR string
nameservers []string
dnsDomain string
workers int
controlplanes int
controlPlaneCpus string
workersCpus string
controlPlaneMemory int
workersMemory int
clusterDiskSize int
clusterDiskPreallocate bool
clusterDisks []string
extraDisks int
extraDiskSize int
extraDisksDrivers []string
targetArch string
clusterWait bool
clusterWaitTimeout time.Duration
forceInitNodeAsEndpoint bool
forceEndpoint string
inputDir string
cniBinPath []string
cniConfDir string
cniCacheDir string
cniBundleURL string
ports string
dockerHostIP string
withInitNode bool
customCNIUrl string
crashdumpOnFailure bool
skipKubeconfig bool
skipInjectingConfig bool
talosVersion string
encryptStatePartition bool
encryptEphemeralPartition bool
useVIP bool
enableKubeSpan bool
enableClusterDiscovery bool
configPatch []string
configPatchControlPlane []string
configPatchWorker []string
badRTC bool
extraBootKernelArgs string
dockerDisableIPv6 bool
controlPlanePort int
kubePrismPort int
dhcpSkipHostname bool
skipBootPhaseFinishedCheck bool
networkChaos bool
jitter time.Duration
latency time.Duration
packetLoss float64
packetReorder float64
packetCorrupt float64
bandwidth int
diskEncryptionKeyTypes []string
withFirewall string
withUUIDHostnames bool
withSiderolinkAgent agentFlag
talosconfig string
nodeImage string
nodeInstallImage string
registryMirrors []string
registryInsecure []string
kubernetesVersion string
nodeVmlinuzPath string
nodeInitramfsPath string
nodeISOPath string
nodeDiskImagePath string
nodeIPXEBootScript string
applyConfigEnabled bool
bootloaderEnabled bool
uefiEnabled bool
tpm2Enabled bool
extraUEFISearchPaths []string
configDebug bool
networkCIDR string
networkNoMasqueradeCIDRs []string
networkMTU int
networkIPv4 bool
networkIPv6 bool
wireguardCIDR string
nameservers []string
dnsDomain string
workers int
controlplanes int
controlPlaneCpus string
workersCpus string
controlPlaneMemory int
workersMemory int
clusterDiskSize int
clusterDiskPreallocate bool
clusterDisks []string
extraDisks int
extraDiskSize int
extraDisksDrivers []string
targetArch string
clusterWait bool
clusterWaitTimeout time.Duration
forceInitNodeAsEndpoint bool
forceEndpoint string
inputDir string
cniBinPath []string
cniConfDir string
cniCacheDir string
cniBundleURL string
ports string
dockerHostIP string
withInitNode bool
customCNIUrl string
crashdumpOnFailure bool
skipKubeconfig bool
skipInjectingConfig bool
talosVersion string
encryptStatePartition bool
encryptEphemeralPartition bool
useVIP bool
enableKubeSpan bool
enableClusterDiscovery bool
configPatch []string
configPatchControlPlane []string
configPatchWorker []string
badRTC bool
extraBootKernelArgs string
dockerDisableIPv6 bool
controlPlanePort int
kubePrismPort int
dhcpSkipHostname bool
skipK8sNodeReadinessCheck bool
networkChaos bool
jitter time.Duration
latency time.Duration
packetLoss float64
packetReorder float64
packetCorrupt float64
bandwidth int
diskEncryptionKeyTypes []string
withFirewall string
withUUIDHostnames bool
withSiderolinkAgent agentFlag
)
// createCmd represents the cluster up command.
@ -954,8 +954,8 @@ func postCreate(ctx context.Context, clusterAccess *access.Adapter) error {
checks := check.DefaultClusterChecks()
if skipBootPhaseFinishedCheck {
checks = check.PreBootSequenceChecks()
if skipK8sNodeReadinessCheck {
checks = slices.Concat(check.PreBootSequenceChecks(), check.K8sComponentsReadinessChecks())
}
checks = append(checks, check.ExtraClusterChecks()...)
@ -1202,7 +1202,7 @@ func init() {
createCmd.Flags().IntVar(&controlPlanePort, controlPlanePortFlag, constants.DefaultControlPlanePort, "control plane port (load balancer and local API port, QEMU only)")
createCmd.Flags().IntVar(&kubePrismPort, kubePrismFlag, constants.DefaultKubePrismPort, "KubePrism port (set to 0 to disable)")
createCmd.Flags().BoolVar(&dhcpSkipHostname, "disable-dhcp-hostname", false, "skip announcing hostname via DHCP (QEMU only)")
createCmd.Flags().BoolVar(&skipBootPhaseFinishedCheck, "skip-boot-phase-finished-check", false, "skip waiting for node to finish boot phase")
createCmd.Flags().BoolVar(&skipK8sNodeReadinessCheck, "skip-k8s-node-readiness-check", false, "skip k8s node readiness checks")
createCmd.Flags().BoolVar(&networkChaos, "with-network-chaos", false, "enable to use network chaos parameters when creating a qemu cluster")
createCmd.Flags().DurationVar(&jitter, "with-network-jitter", 0, "specify jitter on the bridge interface when creating a qemu cluster")
createCmd.Flags().DurationVar(&latency, "with-network-latency", 0, "specify latency on the bridge interface when creating a qemu cluster")

View File

@ -128,11 +128,11 @@ case "${WITH_CONFIG_PATCH_WORKER:-false}" in
;;
esac
case "${WITH_SKIP_BOOT_PHASE_FINISHED_CHECK:-false}" in
case "${WITH_SKIP_K8S_NODE_READINESS_CHECK:-false}" in
false)
;;
*)
QEMU_FLAGS+=("--skip-boot-phase-finished-check")
QEMU_FLAGS+=("--skip-k8s-node-readiness-check")
;;
esac

View File

@ -144,8 +144,8 @@ talosctl cluster create [flags]
--no-masquerade-cidrs strings list of CIDRs to exclude from NAT (QEMU provisioner only)
--registry-insecure-skip-verify strings list of registry hostnames to skip TLS verification for
--registry-mirror strings list of registry mirrors to use in format: <registry host>=<mirror URL>
--skip-boot-phase-finished-check skip waiting for node to finish boot phase
--skip-injecting-config skip injecting config from embedded metadata server, write config files to current directory
--skip-k8s-node-readiness-check skip k8s node readiness checks
--skip-kubeconfig skip merging kubeconfig from the created cluster
--talos-version string the desired Talos version to generate config for (if not set, defaults to image version)
--talosconfig string The path to the Talos configuration file. Defaults to 'TALOSCONFIG' env variable if set, otherwise '$HOME/.talos/config' and '/var/run/secrets/talos.dev/config' in order.