Skip to content

Commit

Permalink
Merge pull request #1150 from kinvolk/johananl/flatcar-updates
Browse files Browse the repository at this point in the history
Disable Flatcar updates during image creation
  • Loading branch information
k8s-ci-robot authored Jul 12, 2023
2 parents b000032 + 42bb932 commit 2ea3ee3
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 75 deletions.
2 changes: 1 addition & 1 deletion images/capi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,6 @@ json-sort: ## Sort all JSON files alphabetically
## --------------------------------------
##@ Ignition
.PHONY: gen-ignition
ignition_files = bootstrap bootstrap-pass-auth bootstrap-cloud
ignition_files = bootstrap-pass-auth bootstrap-cloud
gen-ignition: deps-ignition ## Generates Ignition files from CLC
for f in $(ignition_files); do (ct < packer/files/flatcar/clc/$$f.yaml | jq '.' > packer/files/flatcar/ignition/$$f.json) || exit 1; done
3 changes: 2 additions & 1 deletion images/capi/packer/ami/flatcar.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"systemd_prefix": "/etc/systemd",
"sysusr_prefix": "/opt",
"sysusrlocal_prefix": "/opt",
"user_data": ""
"user_data": "",
"user_data_file": "packer/files/flatcar/ignition/bootstrap-cloud.json"
}
2 changes: 2 additions & 0 deletions images/capi/packer/ami/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"token": "{{ user `aws_session_token` }}",
"type": "amazon-ebs",
"user_data": "{{ user `user_data` }}",
"user_data_file": "{{ user `user_data_file` }}",
"vpc_id": "{{ user `vpc_id` }}"
}
],
Expand Down Expand Up @@ -206,6 +207,7 @@
"temporary_security_group_source_cidrs": "",
"throughput": "125",
"user_data": "#cloud-config\nrepo_upgrade: none",
"user_data_file": "",
"volume_size": "8",
"volume_type": "gp3",
"vpc_id": ""
Expand Down
1 change: 1 addition & 0 deletions images/capi/packer/azure/flatcar-gen2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"ansible_extra_vars": "ansible_python_interpreter=/opt/pypy/bin/pypy",
"build_name": "flatcar-gen2",
"crictl_source_type": "http",
"custom_data_file": "packer/files/flatcar/ignition/bootstrap-cloud.json",
"distribution": "flatcar",
"distribution_release": "{{env `FLATCAR_CHANNEL`}}",
"distribution_version": "{{env `FLATCAR_CHANNEL`}}-{{env `FLATCAR_VERSION`}}",
Expand Down
1 change: 1 addition & 0 deletions images/capi/packer/azure/flatcar.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"ansible_extra_vars": "ansible_python_interpreter=/opt/pypy/bin/pypy",
"build_name": "flatcar",
"crictl_source_type": "http",
"custom_data_file": "packer/files/flatcar/ignition/bootstrap-cloud.json",
"distribution": "flatcar",
"distribution_release": "{{env `FLATCAR_CHANNEL`}}",
"distribution_version": "{{env `FLATCAR_CHANNEL`}}-{{env `FLATCAR_VERSION`}}",
Expand Down
2 changes: 2 additions & 0 deletions images/capi/packer/azure/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
},
"client_id": "{{user `client_id`}}",
"client_secret": "{{user `client_secret`}}",
"custom_data_file": "{{user `custom_data_file`}}",
"image_offer": "{{user `image_offer` }}",
"image_publisher": "{{user `image_publisher` }}",
"image_sku": "{{user `image_sku`}}",
Expand Down Expand Up @@ -225,6 +226,7 @@
"containerd_wasm_shims_runtimes": null,
"crictl_url": "https://github.com/kubernetes-sigs/cri-tools/releases/download/v{{user `crictl_version`}}/crictl-v{{user `crictl_version`}}-linux-amd64.tar.gz",
"crictl_version": null,
"custom_data_file": "",
"direct_shared_gallery_image_id": "",
"distribution": null,
"distribution_release": null,
Expand Down
26 changes: 0 additions & 26 deletions images/capi/packer/files/flatcar/clc/bootstrap.yaml

This file was deleted.

44 changes: 0 additions & 44 deletions images/capi/packer/files/flatcar/ignition/bootstrap.json

This file was deleted.

2 changes: 1 addition & 1 deletion images/capi/packer/ova/flatcar.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ansible_extra_vars": "guestinfo_datasource_slug={{user `guestinfo_datasource_slug`}} guestinfo_datasource_ref={{user `guestinfo_datasource_ref`}} guestinfo_datasource_script={{user `guestinfo_datasource_script`}} ansible_python_interpreter=/opt/bin/python",
"boot_command_prefix": "sudo systemctl mask sshd.socket --now<enter>curl -sLo /tmp/ignition.json https://raw.githubusercontent.com/kubernetes-sigs/image-builder/0bb5cd6db390516c75daeeaf27f19b1aa958428b/images/capi/packer/files/flatcar/ignition/bootstrap.json<enter>sed -i \"s|BUILDERPASSWORDHASH|$(mkpasswd -5 {{user `ssh_password`}})|\" /tmp/ignition.json<enter>sudo flatcar-install -d /dev/sda -o vmware_raw -C {{user `channel_name`}} -V {{user `release_version`}} -i /tmp/ignition.json<enter>sudo reboot<enter>",
"boot_command_prefix": "sudo systemctl mask sshd.socket --now<enter>curl -sLo /tmp/ignition.json https://raw.githubusercontent.com/kubernetes-sigs/image-builder/21f6a77a9a46a217949579d52f7b671568521678/images/capi/packer/files/flatcar/ignition/bootstrap-pass-auth.json<enter>sed -i \"s|BUILDERPASSWORDHASH|$(mkpasswd -5 {{user `ssh_password`}})|\" /tmp/ignition.json<enter>sudo flatcar-install -d /dev/sda -o vmware_raw -C {{user `channel_name`}} -V {{user `release_version`}} -i /tmp/ignition.json<enter>sudo reboot<enter>",
"boot_wait": "60s",
"build_name": "flatcar-{{env `FLATCAR_CHANNEL`}}-{{env `FLATCAR_VERSION`}}",
"channel_name": "{{env `FLATCAR_CHANNEL`}}",
Expand Down
2 changes: 1 addition & 1 deletion images/capi/packer/qemu/qemu-flatcar.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"ansible_extra_vars": "ansible_python_interpreter=/opt/bin/python oem_id={{user `oem_id`}}",
"boot_command_prefix": "sudo systemctl mask sshd.socket --now<enter>curl -sLo /tmp/ignition.json ",
"boot_command_suffix": "/bootstrap.json<enter>sed -i \"s|BUILDERPASSWORDHASH|$(mkpasswd -5 {{user `ssh_password`}})|\" /tmp/ignition.json<enter>sudo flatcar-install -d /dev/sda -C {{user `channel_name`}} -V {{user `release_version`}} -i /tmp/ignition.json<enter>sudo reboot<enter>",
"boot_command_suffix": "/bootstrap-pass-auth.json<enter>sed -i \"s|BUILDERPASSWORDHASH|$(mkpasswd -5 {{user `ssh_password`}})|\" /tmp/ignition.json<enter>sudo flatcar-install -d /dev/sda -C {{user `channel_name`}} -V {{user `release_version`}} -i /tmp/ignition.json<enter>sudo reboot<enter>",
"boot_wait": "120s",
"build_name": "flatcar-{{env `FLATCAR_CHANNEL`}}-{{env `FLATCAR_VERSION`}}",
"channel_name": "{{env `FLATCAR_CHANNEL`}}",
Expand Down
2 changes: 1 addition & 1 deletion images/capi/packer/raw/raw-flatcar.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"ansible_extra_vars": "ansible_python_interpreter=/opt/bin/python",
"boot_command_prefix": "sudo systemctl mask sshd.socket --now<enter>curl -sLo /tmp/ignition.json ",
"boot_command_suffix": "/bootstrap.json<enter>sed -i \"s|BUILDERPASSWORDHASH|$(mkpasswd -5 {{user `ssh_password`}})|\" /tmp/ignition.json<enter>sudo flatcar-install -d /dev/sda -C {{user `channel_name`}} -V {{user `release_version`}} -i /tmp/ignition.json<enter>sudo reboot<enter>",
"boot_command_suffix": "/bootstrap-pass-auth.json<enter>sed -i \"s|BUILDERPASSWORDHASH|$(mkpasswd -5 {{user `ssh_password`}})|\" /tmp/ignition.json<enter>sudo flatcar-install -d /dev/sda -C {{user `channel_name`}} -V {{user `release_version`}} -i /tmp/ignition.json<enter>sudo reboot<enter>",
"boot_wait": "120s",
"build_name": "flatcar-{{env `FLATCAR_CHANNEL`}}-{{env `FLATCAR_VERSION`}}",
"channel_name": "{{env `FLATCAR_CHANNEL`}}",
Expand Down

0 comments on commit 2ea3ee3

Please sign in to comment.