Skip to content

Commit

Permalink
chore: make qemu check flag consistent with code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
frezbo committed Aug 20, 2024
1 parent fe52cb0 commit 36f83ee
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 96 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integration-cilium-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .kres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
168 changes: 84 additions & 84 deletions cmd/talosctl/cmd/mgmt/cluster/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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()...)
Expand Down Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions hack/test/e2e-qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion website/content/v1.8/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 36f83ee

Please sign in to comment.