-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'kubernetes-sigs:master' into cilium-update
- Loading branch information
Showing
75 changed files
with
868 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
--- | ||
|
||
.molecule: | ||
tags: [c3.small.x86] | ||
only: [/^pr-.*$/] | ||
except: ['triggers'] | ||
image: quay.io/kubespray/vagrant:$KUBESPRAY_VERSION | ||
services: [] | ||
stage: deploy-part1 | ||
before_script: | ||
- tests/scripts/rebase.sh | ||
- apt-get update && apt-get install -y python3-pip | ||
- update-alternatives --install /usr/bin/python python /usr/bin/python3 10 | ||
- python -m pip uninstall -y ansible ansible-base ansible-core | ||
- python -m pip install -r tests/requirements.txt | ||
- ./tests/scripts/vagrant_clean.sh | ||
script: | ||
- ./tests/scripts/molecule_run.sh | ||
after_script: | ||
- chronic ./tests/scripts/molecule_logs.sh | ||
artifacts: | ||
when: always | ||
paths: | ||
- molecule_logs/ | ||
|
||
# CI template for periodic CI jobs | ||
# Enabled when PERIODIC_CI_ENABLED var is set | ||
.molecule_periodic: | ||
only: | ||
variables: | ||
- $PERIODIC_CI_ENABLED | ||
allow_failure: true | ||
extends: .molecule | ||
|
||
molecule_full: | ||
extends: .molecule_periodic | ||
|
||
molecule_no_container_engines: | ||
extends: .molecule | ||
script: | ||
- ./tests/scripts/molecule_run.sh -e container-engine | ||
when: on_success | ||
|
||
molecule_docker: | ||
extends: .molecule | ||
script: | ||
- ./tests/scripts/molecule_run.sh -i container-engine/docker | ||
when: on_success | ||
|
||
molecule_containerd: | ||
extends: .molecule | ||
script: | ||
- ./tests/scripts/molecule_run.sh -i container-engine/containerd | ||
when: on_success | ||
|
||
molecule_cri-o: | ||
extends: .molecule | ||
stage: deploy-part2 | ||
script: | ||
- ./tests/scripts/molecule_run.sh -i container-engine/cri-o | ||
when: on_success | ||
|
||
molecule_cri-dockerd: | ||
extends: .molecule | ||
stage: deploy-part2 | ||
script: | ||
- ./tests/scripts/molecule_run.sh -i container-engine/cri-dockerd | ||
when: on_success | ||
|
||
# Stage 3 container engines don't get as much attention so allow them to fail | ||
molecule_kata: | ||
extends: .molecule | ||
stage: deploy-part3 | ||
allow_failure: true | ||
script: | ||
- ./tests/scripts/molecule_run.sh -i container-engine/kata-containers | ||
when: on_success | ||
|
||
molecule_gvisor: | ||
extends: .molecule | ||
stage: deploy-part3 | ||
allow_failure: true | ||
script: | ||
- ./tests/scripts/molecule_run.sh -i container-engine/gvisor | ||
when: on_success | ||
|
||
molecule_youki: | ||
extends: .molecule | ||
stage: deploy-part3 | ||
allow_failure: true | ||
script: | ||
- ./tests/scripts/molecule_run.sh -i container-engine/youki | ||
when: on_success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
29 changes: 14 additions & 15 deletions
29
contrib/terraform/packet/kubespray.tf → contrib/terraform/metal/kubespray.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,62 @@ | ||
# Configure the Equinix Metal Provider | ||
provider "packet" { | ||
version = "~> 2.0" | ||
provider "metal" { | ||
} | ||
|
||
resource "packet_ssh_key" "k8s" { | ||
resource "metal_ssh_key" "k8s" { | ||
count = var.public_key_path != "" ? 1 : 0 | ||
name = "kubernetes-${var.cluster_name}" | ||
public_key = chomp(file(var.public_key_path)) | ||
} | ||
|
||
resource "packet_device" "k8s_master" { | ||
depends_on = [packet_ssh_key.k8s] | ||
resource "metal_device" "k8s_master" { | ||
depends_on = [metal_ssh_key.k8s] | ||
|
||
count = var.number_of_k8s_masters | ||
hostname = "${var.cluster_name}-k8s-master-${count.index + 1}" | ||
plan = var.plan_k8s_masters | ||
facilities = [var.facility] | ||
operating_system = var.operating_system | ||
billing_cycle = var.billing_cycle | ||
project_id = var.packet_project_id | ||
project_id = var.metal_project_id | ||
tags = ["cluster-${var.cluster_name}", "k8s_cluster", "kube_control_plane", "etcd", "kube_node"] | ||
} | ||
|
||
resource "packet_device" "k8s_master_no_etcd" { | ||
depends_on = [packet_ssh_key.k8s] | ||
resource "metal_device" "k8s_master_no_etcd" { | ||
depends_on = [metal_ssh_key.k8s] | ||
|
||
count = var.number_of_k8s_masters_no_etcd | ||
hostname = "${var.cluster_name}-k8s-master-${count.index + 1}" | ||
plan = var.plan_k8s_masters_no_etcd | ||
facilities = [var.facility] | ||
operating_system = var.operating_system | ||
billing_cycle = var.billing_cycle | ||
project_id = var.packet_project_id | ||
project_id = var.metal_project_id | ||
tags = ["cluster-${var.cluster_name}", "k8s_cluster", "kube_control_plane"] | ||
} | ||
|
||
resource "packet_device" "k8s_etcd" { | ||
depends_on = [packet_ssh_key.k8s] | ||
resource "metal_device" "k8s_etcd" { | ||
depends_on = [metal_ssh_key.k8s] | ||
|
||
count = var.number_of_etcd | ||
hostname = "${var.cluster_name}-etcd-${count.index + 1}" | ||
plan = var.plan_etcd | ||
facilities = [var.facility] | ||
operating_system = var.operating_system | ||
billing_cycle = var.billing_cycle | ||
project_id = var.packet_project_id | ||
project_id = var.metal_project_id | ||
tags = ["cluster-${var.cluster_name}", "etcd"] | ||
} | ||
|
||
resource "packet_device" "k8s_node" { | ||
depends_on = [packet_ssh_key.k8s] | ||
resource "metal_device" "k8s_node" { | ||
depends_on = [metal_ssh_key.k8s] | ||
|
||
count = var.number_of_k8s_nodes | ||
hostname = "${var.cluster_name}-k8s-node-${count.index + 1}" | ||
plan = var.plan_k8s_nodes | ||
facilities = [var.facility] | ||
operating_system = var.operating_system | ||
billing_cycle = var.billing_cycle | ||
project_id = var.packet_project_id | ||
project_id = var.metal_project_id | ||
tags = ["cluster-${var.cluster_name}", "k8s_cluster", "kube_node"] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
output "k8s_masters" { | ||
value = metal_device.k8s_master.*.access_public_ipv4 | ||
} | ||
|
||
output "k8s_masters_no_etc" { | ||
value = metal_device.k8s_master_no_etcd.*.access_public_ipv4 | ||
} | ||
|
||
output "k8s_etcds" { | ||
value = metal_device.k8s_etcd.*.access_public_ipv4 | ||
} | ||
|
||
output "k8s_nodes" { | ||
value = metal_device.k8s_node.*.access_public_ipv4 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.