Skip to content

Commit

Permalink
Update image-builder with changes to package repos (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkjpryor authored Sep 26, 2023
1 parent 4a59a80 commit d60c557
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 15 deletions.
5 changes: 5 additions & 0 deletions config.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
packer {
required_plugins {
ansible = {
version = ">= 1.1.0"
source = "github.com/hashicorp/ansible"
}

openstack = {
version = ">= 1.1.1"
source = "github.com/hashicorp/openstack"
Expand Down
21 changes: 17 additions & 4 deletions packer/kubernetes.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ variable "kubernetes_semver" {
type = string
}

variable "kubernetes_series" {
type = string
}

variable "kubernetes_source_type" {
type = string
}
Expand Down Expand Up @@ -335,7 +339,16 @@ locals {
kubernetes_cni_http_checksum_default = "sha256:https://storage.googleapis.com/k8s-artifacts-cni/release/${var.kubernetes_cni_semver}/cni-plugins-linux-${var.kubernetes_cni_http_checksum_arch}-${var.kubernetes_cni_semver}.tgz.sha256"
kubernetes_cni_http_checksum = element([for e in [var.kubernetes_cni_http_checksum, local.kubernetes_cni_http_checksum_default]: e if e != ""], 0)

kubernetes_rpm_repo_default = "https://packages.cloud.google.com/yum/repos/kubernetes-el7-${var.kubernetes_rpm_repo_arch}"
kubernetes_deb_gpg_key_default = "https://pkgs.k8s.io/core:/stable:/${var.kubernetes_series}/deb/Release.key"
kubernetes_deb_gpg_key = element([for e in [var.kubernetes_deb_gpg_key, local.kubernetes_deb_gpg_key_default]: e if e != ""], 0)

kubernetes_deb_repo_default = "https://pkgs.k8s.io/core:/stable:/${var.kubernetes_series}/deb/"
kubernetes_deb_repo = element([for e in [var.kubernetes_deb_repo, local.kubernetes_deb_repo_default]: e if e != ""], 0)

kubernetes_rpm_gpg_key_default = "https://pkgs.k8s.io/core:/stable:/${var.kubernetes_series}/rpm/repodata/repomd.xml.key"
kubernetes_rpm_gpg_key = element([for e in [var.kubernetes_rpm_gpg_key, local.kubernetes_rpm_gpg_key_default]: e if e != ""], 0)

kubernetes_rpm_repo_default = "https://pkgs.k8s.io/core:/stable:/${var.kubernetes_series}/rpm/"
kubernetes_rpm_repo = element([for e in [var.kubernetes_rpm_repo, local.kubernetes_rpm_repo_default]: e if e != ""], 0)
}

Expand Down Expand Up @@ -448,9 +461,9 @@ build {
"--extra-vars",
"kubernetes_container_registry=${var.kubernetes_container_registry}",
"--extra-vars",
"kubernetes_deb_gpg_key=${var.kubernetes_deb_gpg_key}",
"kubernetes_deb_gpg_key=${local.kubernetes_deb_gpg_key}",
"--extra-vars",
"kubernetes_deb_repo=${var.kubernetes_deb_repo}",
"kubernetes_deb_repo=${local.kubernetes_deb_repo}",
"--extra-vars",
"kubernetes_deb_version=${var.kubernetes_deb_version}",
"--extra-vars",
Expand All @@ -460,7 +473,7 @@ build {
"--extra-vars",
"kubernetes_rpm_gpg_check=${var.kubernetes_rpm_gpg_check}",
"--extra-vars",
"kubernetes_rpm_gpg_key=${var.kubernetes_rpm_gpg_key}",
"kubernetes_rpm_gpg_key=${local.kubernetes_rpm_gpg_key}",
"--extra-vars",
"kubernetes_rpm_repo=${local.kubernetes_rpm_repo}",
"--extra-vars",
Expand Down
4 changes: 2 additions & 2 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
collections:
- name: ansible.posix
version: 1.5.2
version: 1.5.4
- name: ansible.windows
version: 1.10.0
- name: chocolatey.chocolatey
version: 1.2.0
- name: community.general
version: 6.5.0
version: 7.4.0
- name: community.windows
version: 1.10.0
- name: containers.podman
Expand Down
3 changes: 3 additions & 0 deletions vars/base/kubernetes.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"crictl_url": "",
"extra_debs": "nfs-common",
"kubernetes_cni_http_checksum": "",
"kubernetes_deb_gpg_key": "",
"kubernetes_deb_repo": "",
"kubernetes_rpm_gpg_key": "",
"kubernetes_rpm_repo": "",
"python_path": ""
}
4 changes: 2 additions & 2 deletions vars/base/kubernetes_1_25.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"kubernetes_deb_version": "1.25.13-00",
"kubernetes_rpm_version": "1.25.13-0",
"kubernetes_deb_version": "1.25.13-1.1",
"kubernetes_rpm_version": "1.25.13",
"kubernetes_semver": "v1.25.13",
"kubernetes_series": "v1.25"
}
4 changes: 2 additions & 2 deletions vars/base/kubernetes_1_26.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"kubernetes_deb_version": "1.26.8-00",
"kubernetes_rpm_version": "1.26.8-0",
"kubernetes_deb_version": "1.26.8-1.1",
"kubernetes_rpm_version": "1.26.8",
"kubernetes_semver": "v1.26.8",
"kubernetes_series": "v1.26"
}
4 changes: 2 additions & 2 deletions vars/base/kubernetes_1_27.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"kubernetes_deb_version": "1.27.5-00",
"kubernetes_rpm_version": "1.27.5-0",
"kubernetes_deb_version": "1.27.5-1.1",
"kubernetes_rpm_version": "1.27.5",
"kubernetes_semver": "v1.27.5",
"kubernetes_series": "v1.27"
}
4 changes: 2 additions & 2 deletions vars/base/kubernetes_1_28.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"kubernetes_deb_version": "1.28.1-00",
"kubernetes_rpm_version": "1.28.1-0",
"kubernetes_deb_version": "1.28.1-1.1",
"kubernetes_rpm_version": "1.28.1",
"kubernetes_semver": "v1.28.1",
"kubernetes_series": "v1.28"
}
2 changes: 1 addition & 1 deletion vendor/image-builder
Submodule image-builder updated 115 files

0 comments on commit d60c557

Please sign in to comment.