@@ -146,7 +146,7 @@ type UserDataSecretManifestOptions = {
146
146
secretName : string
147
147
}
148
148
149
- export function UserDataSecretManifest ( { vmName, namespace, secretName } : UserDataSecretManifestOptions ) {
149
+ export function UserDataSecretManifest ( { vmName, namespace, secretName } : UserDataSecretManifestOptions ) {
150
150
const userdata = Buffer . from ( `#cloud-config
151
151
users:
152
152
- name: ubuntu
@@ -158,6 +158,20 @@ chpasswd:
158
158
ubuntu:ubuntu
159
159
expire: False
160
160
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 &
161
175
- path: /etc/ssh/sshd_config.d/101-change-ssh-port.conf
162
176
permission: 0644
163
177
owner: root
@@ -213,6 +227,7 @@ write_files:
213
227
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
214
228
EOF
215
229
runcmd:
230
+ - bash /etc/disable-services.sh
216
231
- bash /usr/local/bin/bootstrap-k3s.sh` ) . toString ( "base64" )
217
232
return `
218
233
apiVersion: v1
0 commit comments