From 181d25e131e201ddb0319e7935a2682f50300081 Mon Sep 17 00:00:00 2001 From: dt241s Date: Mon, 4 Oct 2021 16:58:40 +0000 Subject: [PATCH] Upgrade Image bundle to support k8s 1.21.2. Change-Id: I7c4be72fbb9ae3dc753437e359af9736366b5041 Signed-off-by: diwakar thyagaraj --- .../roles/multistrap/defaults/main.yaml | 2 +- profiles/k8s-1.21/manifests/rootfs/README.md | 1 + .../manifests/rootfs/multistrap-vars.yaml | 48 +++++++++++++++++++ zuul.d/jobs.yaml | 36 ++++++++++++++ zuul.d/projects.yaml | 5 ++ 5 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 profiles/k8s-1.21/manifests/rootfs/README.md create mode 100644 profiles/k8s-1.21/manifests/rootfs/multistrap-vars.yaml diff --git a/image-builder/assets/playbooks/roles/multistrap/defaults/main.yaml b/image-builder/assets/playbooks/roles/multistrap/defaults/main.yaml index 350b968..b4a127f 100644 --- a/image-builder/assets/playbooks/roles/multistrap/defaults/main.yaml +++ b/image-builder/assets/playbooks/roles/multistrap/defaults/main.yaml @@ -1,6 +1,6 @@ rootfs_root: build rootfs_arch: amd64 -k8s_version: 1.18.6-00 +k8s_version: 1.21.2-00 kernel_base_pkg: linux-image-generic kernel_headers_pkg: linux-headers-generic systemd_nic_names_policy: kernel database onboard path slot diff --git a/profiles/k8s-1.21/manifests/rootfs/README.md b/profiles/k8s-1.21/manifests/rootfs/README.md new file mode 100644 index 0000000..fc9c2b6 --- /dev/null +++ b/profiles/k8s-1.21/manifests/rootfs/README.md @@ -0,0 +1 @@ +Playbook variable overrides used for building the image-builder container image. \ No newline at end of file diff --git a/profiles/k8s-1.21/manifests/rootfs/multistrap-vars.yaml b/profiles/k8s-1.21/manifests/rootfs/multistrap-vars.yaml new file mode 100644 index 0000000..3782a5c --- /dev/null +++ b/profiles/k8s-1.21/manifests/rootfs/multistrap-vars.yaml @@ -0,0 +1,48 @@ +# The following are examples that show you how to override variables. +# +# Example 1: The following usage will *overwrite* the list of repos & packages +# defined under multistrap/defaults/main.yaml with the list here: +#repos: +# - register_repo_with_rootfs: true +# name: Ubuntu +# packages: +# - package1 +# - package2 +# source: http://archive.ubuntu.com/ubuntu/ +# keyring_pkg: ubuntu-keyring +# suite: focal +# components: main restricted universe +# +# You would do the above in the event you had a local or other controlled mirror +# you wanted to build the image from. In this case, you will have to redefine +# everything, including the package list(s) for each mirror. +# +# Example 2: The following usage will *append* to the list of default repos +# defined under multistrap/defaults/main.yaml with the list here: +#repos_append: +# - register_repo_with_rootfs: true +# name: DellUtilsRepo +# packages: +# - package1 +# - package2 +# source: http://dell.utils.example.com +# keyring_pkg: ubuntu-keyring +# suite: focal +# components: main restricted universe +# +# You would do the above in the event you are happy with the default mirrors, but +# need to add another mirror that has additional third-party packages you require, +# such as may be needed for HW manufacturer utilities that are not published to +# the community Ubuntu mirrors. +# +# Example 3: The following usage will *append* to the list of default packages +# installed from the default Ubuntu mirror defined in +# multistrap/defaults/main.yaml: +#ubuntu_packages_append: +# - package1 +# - package2 +# +# You would do the above if you are happy with the default mirrors, but need to +# install some additional packages from the same mirror, for example your preferred +# text editor, troubleshooting utilities, etc. +k8s_version: 1.21.2-00 \ No newline at end of file diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 21c2b2c..e503b48 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -18,6 +18,8 @@ pre-run: playbooks/airship-image-builder-deploy-docker.yaml run: playbooks/airship-image-builder-build.yaml post-run: playbooks/airship-image-builder-collect-logs.yaml + vars: + image_profile_dir: k8s-1.18 # Run the build job 1.19 - job: @@ -31,6 +33,18 @@ vars: image_profile_dir: k8s-1.19 +# Run the build job 1.21 +- job: + name: airship-image-builder-build-k8s-1.21 + nodeset: airship-image-builder-single-node + timeout: 7200 + post-timeout: 7200 + pre-run: playbooks/airship-image-builder-deploy-docker.yaml + run: playbooks/airship-image-builder-build.yaml + post-run: playbooks/airship-image-builder-collect-logs.yaml + vars: + image_profile_dir: k8s-1.21 + # Tag default job with 1.18 - job: name: airship-image-builder-publish-k8s-1.18 @@ -61,6 +75,21 @@ vars: image_tag: "k8s-1.19-latest" +# Tag the 1.21 job with 1.21 +- job: + name: airship-image-builder-publish-k8s-1.21 + parent: airship-image-builder-build-k8s-1.21 + nodeset: airship-image-builder-single-node + timeout: 7200 + post-timeout: 7200 + pre-run: playbooks/airship-image-builder-deploy-docker.yaml + run: playbooks/airship-image-builder-publish-latest.yaml + secrets: + - name: image_builder_quay_creds + secret: image_builder_quay_creds + vars: + image_tag: "k8s-1.21-latest" + # Tag the 1.18 job with zuul rev tag - job: name: airship-image-builder-publish-commit-k8s-1.18 @@ -80,3 +109,10 @@ nodes: - name: primary label: ubuntu-bionic-32GB + +# Tag the 1.21 job with zuul rev tag +- job: + name: airship-image-builder-publish-commit-k8s-1.21 + parent: airship-image-builder-publish-k8s-1.21 + vars: + image_tag: "k8s-1.21-{{ zuul.newrev }}" diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml index 0561cdc..5a23c7d 100644 --- a/zuul.d/projects.yaml +++ b/zuul.d/projects.yaml @@ -17,10 +17,13 @@ jobs: - airship-image-builder-build-k8s-1.18 - airship-image-builder-build-k8s-1.19 + - airship-image-builder-build-k8s-1.21 gate: jobs: - airship-image-builder-build-k8s-1.18 - airship-image-builder-build-k8s-1.19 + - airship-image-builder-build-k8s-1.21 + post: jobs: - airship-image-builder-upload-git-mirror @@ -28,6 +31,8 @@ - airship-image-builder-publish-k8s-1.19 - airship-image-builder-publish-commit-k8s-1.18 - airship-image-builder-publish-commit-k8s-1.19 + - airship-image-builder-publish-k8s-1.21 + - airship-image-builder-publish-commit-k8s-1.21 tag: jobs: - airship-image-builder-upload-git-mirror \ No newline at end of file