Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a flag to conditionally load additional kubernetes images when source type != pkg #207

Merged
merged 1 commit into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode
.idea
.DS_Store
dist/
*.tar.gz*
Expand Down
8 changes: 7 additions & 1 deletion images/capi/ansible/roles/kubernetes/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@ kubernetes_bins:
- kubectl
- kubelet

kubernetes_imgs:
kubernetes_primary_imgs:
- kube-apiserver.tar
- kube-controller-manager.tar
- kube-scheduler.tar
- kube-proxy.tar

kubernetes_additional_imgs:
- pause.tar
- coredns.tar
- etcd.tar

kubernetes_load_additional_imgs: false

kubernetes_imgs: "{{ kubernetes_primary_imgs | union(kubernetes_additional_imgs) if kubernetes_load_additional_imgs | bool else kubernetes_primary_imgs }}"

kubernetes_cni_http_checksum: "sha1:{{ kubernetes_cni_http_source }}/{{ kubernetes_cni_semver }}/cni-plugins-{{ kubernetes_goarch }}-{{ kubernetes_cni_semver }}.tgz.sha1"
1 change: 1 addition & 0 deletions images/capi/packer/ami/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"kubernetes_cni_http_source": null,
"kubernetes_semver": null,
"kubernetes_source_type": null,
"kubernetes_load_additional_imgs": null,
"kubernetes_http_source": null,
"kubernetes_rpm_version": null,
"kubernetes_deb_version": null,
Expand Down
1 change: 1 addition & 0 deletions images/capi/packer/azure/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"kubernetes_series": null,
"kubernetes_semver": null,
"kubernetes_source_type": null,
"kubernetes_load_additional_imgs": null,
"kubernetes_http_source": null,
"kubernetes_rpm_version": null,
"kubernetes_deb_version": null,
Expand Down
2 changes: 1 addition & 1 deletion images/capi/packer/config/ansible-args.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ansible_common_vars": "containerd_url={{user `containerd_url`}} containerd_sha256={{user `containerd_sha256`}} containerd_pause_image={{user `containerd_pause_image`}} disable_public_repos={{user `disable_public_repos`}} extra_debs={{user `extra_debs`}} extra_repos={{user `extra_repos`}} extra_rpms={{user `extra_rpms`}} http_proxy={{user `http_proxy`}} https_proxy={{user `https_proxy`}} kubernetes_cni_http_source={{user `kubernetes_cni_http_source`}} kubernetes_cni_http_checksum={{user `kubernetes_cni_http_checksum`}} kubernetes_http_source={{user `kubernetes_http_source`}} kubernetes_container_registry={{user `kubernetes_container_registry`}} kubernetes_rpm_repo={{user `kubernetes_rpm_repo`}} kubernetes_rpm_gpg_key={{user `kubernetes_rpm_gpg_key`}} kubernetes_rpm_gpg_check={{user `kubernetes_rpm_gpg_check`}} kubernetes_deb_repo={{user `kubernetes_deb_repo`}} kubernetes_deb_gpg_key={{user `kubernetes_deb_gpg_key`}} kubernetes_cni_deb_version={{user `kubernetes_cni_deb_version`}} kubernetes_cni_rpm_version={{user `kubernetes_cni_rpm_version`}} kubernetes_cni_semver={{user `kubernetes_cni_semver`}} kubernetes_cni_source_type={{user `kubernetes_cni_source_type`}} kubernetes_semver={{user `kubernetes_semver`}} kubernetes_source_type={{user `kubernetes_source_type`}} kubernetes_deb_version={{user `kubernetes_deb_version`}} kubernetes_rpm_version={{user `kubernetes_rpm_version`}} no_proxy={{user `no_proxy`}} reenable_public_repos={{user `reenable_public_repos`}} remove_extra_repos={{user `remove_extra_repos`}} "
"ansible_common_vars": "containerd_url={{user `containerd_url`}} containerd_sha256={{user `containerd_sha256`}} containerd_pause_image={{user `containerd_pause_image`}} disable_public_repos={{user `disable_public_repos`}} extra_debs={{user `extra_debs`}} extra_repos={{user `extra_repos`}} extra_rpms={{user `extra_rpms`}} http_proxy={{user `http_proxy`}} https_proxy={{user `https_proxy`}} kubernetes_cni_http_source={{user `kubernetes_cni_http_source`}} kubernetes_cni_http_checksum={{user `kubernetes_cni_http_checksum`}} kubernetes_http_source={{user `kubernetes_http_source`}} kubernetes_container_registry={{user `kubernetes_container_registry`}} kubernetes_rpm_repo={{user `kubernetes_rpm_repo`}} kubernetes_rpm_gpg_key={{user `kubernetes_rpm_gpg_key`}} kubernetes_rpm_gpg_check={{user `kubernetes_rpm_gpg_check`}} kubernetes_deb_repo={{user `kubernetes_deb_repo`}} kubernetes_deb_gpg_key={{user `kubernetes_deb_gpg_key`}} kubernetes_cni_deb_version={{user `kubernetes_cni_deb_version`}} kubernetes_cni_rpm_version={{user `kubernetes_cni_rpm_version`}} kubernetes_cni_semver={{user `kubernetes_cni_semver`}} kubernetes_cni_source_type={{user `kubernetes_cni_source_type`}} kubernetes_semver={{user `kubernetes_semver`}} kubernetes_source_type={{user `kubernetes_source_type`}} kubernetes_load_additional_imgs={{user `kubernetes_load_additional_imgs`}} kubernetes_deb_version={{user `kubernetes_deb_version`}} kubernetes_rpm_version={{user `kubernetes_rpm_version`}} no_proxy={{user `no_proxy`}} reenable_public_repos={{user `reenable_public_repos`}} remove_extra_repos={{user `remove_extra_repos`}} "
}
3 changes: 2 additions & 1 deletion images/capi/packer/config/kubernetes.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"kubernetes_rpm_gpg_check": "True",
"kubernetes_deb_repo": "\"https://apt.kubernetes.io/ kubernetes-xenial\"",
"kubernetes_deb_gpg_key": "https://packages.cloud.google.com/apt/doc/apt-key.gpg",
"kubernetes_container_registry": "k8s.gcr.io"
"kubernetes_container_registry": "k8s.gcr.io",
"kubernetes_load_additional_imgs": "false"
}
1 change: 1 addition & 0 deletions images/capi/packer/digitalocean/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"kubernetes_series": null,
"kubernetes_semver": null,
"kubernetes_source_type": null,
"kubernetes_load_additional_imgs": null,
"kubernetes_http_source": null,
"kubernetes_rpm_version": null,
"kubernetes_deb_version": null,
Expand Down
1 change: 1 addition & 0 deletions images/capi/packer/gce/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"kubernetes_series": null,
"kubernetes_semver": null,
"kubernetes_source_type": null,
"kubernetes_load_additional_imgs": null,
"kubernetes_http_source": null,
"kubernetes_rpm_version": null,
"kubernetes_deb_version": null,
Expand Down
1 change: 1 addition & 0 deletions images/capi/packer/ova/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"kubernetes_cni_http_source": null,
"kubernetes_semver": null,
"kubernetes_source_type": null,
"kubernetes_load_additional_imgs": null,
"kubernetes_http_source": null,
"kubernetes_rpm_version": null,
"kubernetes_deb_version": null,
Expand Down
1 change: 1 addition & 0 deletions images/capi/packer/qemu/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"kubernetes_series": null,
"kubernetes_semver": null,
"kubernetes_source_type": null,
"kubernetes_load_additional_imgs": null,
"kubernetes_http_source": null,
"kubernetes_rpm_version": null,
"kubernetes_deb_version": null,
Expand Down