Skip to content

Update preview VM image #11053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .werft/vm/manifests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ kind: VirtualMachine
metadata:
namespace: ${namespace}
annotations:
harvesterhci.io/volumeClaimTemplates: '[{"metadata":{"name":"${claimName}","annotations":{"harvesterhci.io/imageId":"default/image-swrlp"}},"spec":{"accessModes":["ReadWriteMany"],"resources":{"requests":{"storage":"200Gi"}},"volumeMode":"Block","storageClassName":"longhorn-image-swrlp-onereplica"}},{"metadata":{"name":"${storageClaimName}"},"spec":{"accessModes":["ReadWriteMany"],"resources":{"requests":{"storage":"30Gi"}},"volumeMode":"Block","storageClassName":"longhorn"}}]'
harvesterhci.io/volumeClaimTemplates: '[{"metadata":{"name":"${claimName}","annotations":{"harvesterhci.io/imageId":"default/image-tfmk6"}},"spec":{"accessModes":["ReadWriteMany"],"resources":{"requests":{"storage":"200Gi"}},"volumeMode":"Block","storageClassName":"longhorn-image-tfmk6-onereplica"}},{"metadata":{"name":"${storageClaimName}"},"spec":{"accessModes":["ReadWriteMany"],"resources":{"requests":{"storage":"30Gi"}},"volumeMode":"Block","storageClassName":"longhorn"}}]'
network.harvesterhci.io/ips: "[]"
labels:
harvesterhci.io/creator: harvester
Expand Down Expand Up @@ -304,12 +304,17 @@ write_files:
--disable metrics-server \\
--flannel-backend=none \\
--kubelet-arg config=/etc/kubernetes/kubelet-config.json \\
--kubelet-arg cgroup-driver=systemd \\
--kubelet-arg feature-gates=LocalStorageCapacityIsolation=true \\
--kubelet-arg feature-gates=LocalStorageCapacityIsolationFSQuotaMonitoring=true \\
--kube-apiserver-arg feature-gates=LocalStorageCapacityIsolation=true \\
--kube-apiserver-arg feature-gates=LocalStorageCapacityIsolationFSQuotaMonitoring=true \\
--cluster-init

# Seems like this is a bit flaky now, with k3s not always being ready, and the labeling
# failing occasionally. Sleeping for a bit solves it.
sleep 10

kubectl label nodes ${vmName} \\
gitpod.io/workload_meta=true \\
gitpod.io/workload_ide=true \\
Expand All @@ -334,8 +339,8 @@ write_files:
kubectl apply -f /var/lib/gitpod/manifests/metrics-server.yaml

# install CSI snapshotter CRDs and snapshot controller
kubectl apply -f /var/lib/gitpod/manifests/csi-snapshotter-crd.yaml
kubectl apply -f /var/lib/gitpod/manifests/csi-snapshot-controller.yaml
kubectl apply -f /var/lib/gitpod/manifests/csi-driver.yaml
kubectl apply -f /var/lib/gitpod/manifests/csi-config.yaml
Comment on lines +342 to +343
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


cat <<EOF >> /etc/bash.bashrc
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
Expand Down