Skip to content

Commit

Permalink
fix cloud init
Browse files Browse the repository at this point in the history
  • Loading branch information
sp-yduck committed Jun 30, 2023
1 parent fee24a8 commit 45727d3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cloud/services/compute/instance/cloudinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

"github.com/pkg/errors"
"k8s.io/klog/v2"

infrav1 "github.com/sp-yduck/cluster-api-provider-proxmox/api/v1beta1"
"github.com/sp-yduck/cluster-api-provider-proxmox/cloud/cloudinit"
Expand Down Expand Up @@ -43,6 +44,8 @@ func reconcileCloudInitUser(vmid int, vmName, storageName, bootstrap string, con
return err
}

klog.Info(configYaml)

// to do: should be set via API
// to do: storage path
out, err := ssh.RunWithStdin(fmt.Sprintf("tee /var/lib/vz/%s/snippets/%s-user.yml", storageName, vmName), configYaml)
Expand Down Expand Up @@ -101,7 +104,7 @@ net.ipv4.ip_forward = 1`,
`curl -L "https://raw.githubusercontent.com/containerd/containerd/main/containerd.service" -o /etc/systemd/system/containerd.service`,
"mkdir -p /etc/containerd",
"containerd config default > /etc/containerd/config.toml",
"sed 's/SystemdCgroup = false/SystemdCgroup = true/g /etc/containerd/config.toml",
"sed 's/SystemdCgroup = false/SystemdCgroup = true/g' /etc/containerd/config.toml -i",
"systemctl daemon-reload",
"systemctl enable --now containerd",
"mkdir -p /usr/local/sbin",
Expand Down

0 comments on commit 45727d3

Please sign in to comment.