Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed Jan 3, 2023
1 parent 7c04e88 commit c1f5653
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ spec:
spec:
containers:
# Change the value of image field below to your controller image URL
- image: gcr.io/k8s-staging-cluster-api/capd-manager:main
- image: gcr.io/k8s-staging-cluster-api/capd-manager-amd64:dev
name: manager
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
spec:
containers:
- name: manager
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ func hackKubeadmIgnoreErrors(c provisioning.Cmd) provisioning.Cmd {
// case kubeadm commands are defined as a string
if c.Cmd == "/bin/sh" && len(c.Args) >= 2 {
if c.Args[0] == "-c" {
c.Args[1] = strings.Replace(c.Args[1], "kubeadm init", "kubeadm init --ignore-preflight-errors=SystemVerification", 1)
c.Args[1] = strings.Replace(c.Args[1], "kubeadm join", "kubeadm join --ignore-preflight-errors=SystemVerification", 1)
c.Args[1] = strings.Replace(c.Args[1], "kubeadm init", "kubeadm init --ignore-preflight-errors=SystemVerification,Swap", 1)
c.Args[1] = strings.Replace(c.Args[1], "kubeadm join", "kubeadm join --ignore-preflight-errors=SystemVerification,Swap", 1)
}
}

// case kubeadm commands are defined as a list
if c.Cmd == "kubeadm" && len(c.Args) >= 1 {
if c.Args[0] == "init" || c.Args[0] == "join" {
c.Args = append(c.Args, "") // make space
copy(c.Args[2:], c.Args[1:]) // shift elements
c.Args[1] = "--ignore-preflight-errors=SystemVerification" // insert the additional arg
c.Args = append(c.Args, "") // make space
copy(c.Args[2:], c.Args[1:]) // shift elements
c.Args[1] = "--ignore-preflight-errors=SystemVerification,Swap" // insert the additional arg
}
}

Expand Down

0 comments on commit c1f5653

Please sign in to comment.