Skip to content

Commit bb6bdb5

Browse files
committed
werft/vm/manifest: Disable google cloud agent
Signed-off-by: ArthurSens <[email protected]>
1 parent 103f835 commit bb6bdb5

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.werft/vm/manifests.ts

+16-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ type UserDataSecretManifestOptions = {
146146
secretName: string
147147
}
148148

149-
export function UserDataSecretManifest({vmName, namespace, secretName }: UserDataSecretManifestOptions) {
149+
export function UserDataSecretManifest({ vmName, namespace, secretName }: UserDataSecretManifestOptions) {
150150
const userdata = Buffer.from(`#cloud-config
151151
users:
152152
- name: ubuntu
@@ -158,6 +158,20 @@ chpasswd:
158158
ubuntu:ubuntu
159159
expire: False
160160
write_files:
161+
- path: /etc/disable-services.sh
162+
permissions: '0755'
163+
content: |
164+
#!/bin/bash
165+
systemctl disable google-guest-agent &
166+
systemctl disable google-startup-scripts &
167+
systemctl disable google-osconfig-agent &
168+
systemctl disable google-oslogin-cache.timer &
169+
systemctl disable google-shutdown-scripts &
170+
systemctl stop google-guest-agent &
171+
systemctl stop google-startup-scripts &
172+
systemctl stop google-osconfig-agent &
173+
systemctl stop google-oslogin-cache.timer &
174+
systemctl stop google-shutdown-scripts &
161175
- path: /etc/ssh/sshd_config.d/101-change-ssh-port.conf
162176
permission: 0644
163177
owner: root
@@ -213,6 +227,7 @@ write_files:
213227
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
214228
EOF
215229
runcmd:
230+
- bash /etc/disable-services.sh
216231
- bash /usr/local/bin/bootstrap-k3s.sh`).toString("base64")
217232
return `
218233
apiVersion: v1

0 commit comments

Comments
 (0)