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

Several bugfixes to make simulator work with Kubernetes 1.22 #327

Merged
merged 9 commits into from
Feb 24, 2022
Merged

Conversation

jpts
Copy link
Contributor

@jpts jpts commented Feb 23, 2022

  • Please check if the PR fulfills these requirements
  • The commit message follows the conventional commits guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
  • fix: Switch to containerd and pin k8s version (defaults to 1.22.7)

  • fix: switch to nerdctl to query pod status on node

  • fix: remove unused/deprecated env vars

  • fix: Pin yq, to allow use of v3 syntax

  • fix: ensure internet connectivity in private net

  • fix: ensure tests are run during node re-deploy

  • feat: Catch failed cloud-init run before goss

  • feat: Bump AMI to Ubuntu 20.04

  • feat: Remove master->node provisioning dependency (to speed up deployment speed)

  • What is the current behavior? (You can also link to an open issue here)
    simulator clusters do not currently spin up correctly

  • What is the new behavior (if this is a feature change)?
    Major new features:

  • migrate from docker runtime to containerd
  • Update base AMI to Ubuntu 20.04
  • improved error checking

Copy link
Contributor

@denhamparry denhamparry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🧊 🍺 🥅 🍵 🍵

@jpts jpts merged commit 831efa9 into master Feb 24, 2022
@jpts jpts deleted the bugfixes branch February 24, 2022 09:57
@@ -44,7 +44,7 @@ RUN terraform-bundle package terraform-bundle.hcl && \

# Default configuration for dep
ARG JQ_VERSION=1.6
ARG YQ_VERSION=2.7.2
ARG YQ_VERSION=3.4.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC this will be a breaking change for many scenarios

@@ -4,7 +4,4 @@ AWS_SECRET_ACCESS_KEY

# AWS Configuration
AWS_REGION
AWS_DEFAULT_REGION
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do these go? The golang AWS library is difficult and non-obvious WRT to these, I can't recall the detail as to why they're all there but they were necessary once

@@ -28,7 +28,6 @@ resource "aws_instance" "simulator_node_instances" {
associate_public_ip_address = false
subnet_id = var.private_subnet_id
user_data = element(data.template_file.node_cloud_config.*.rendered, count.index)
depends_on = [aws_instance.simulator_master_instances]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on this change?

- 'wget https://docs.projectcalico.org/v3.3/getting-started/kubernetes/installation/hosted/rbac-kdd.yaml -O /run/download/rbac-kdd.yaml'
- 'wget https://docs.projectcalico.org/v3.9/manifests/calico.yaml -O /run/download/calico.yaml'
- 'kubeadm init --pod-network-cidr=192.168.0.0/16'
- 'apt install -y containerd kubelet=${version}-00 kubeadm=${version}-00 kubectl=${version}-00 awscli'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use simulator-private as a base, this needs --allow-downgrades

- "systemctl restart docker"
- "systemctl restart kubelet"
- "while true; do aws s3 ls s3://${s3_bucket_name}/join.txt > /dev/null; if [ $? -ne 0 ]; then sleep 10; else break; fi; done && aws s3 cp s3://${s3_bucket_name}/join.txt /tmp && sh /tmp/join.txt"
- "apt install -y containerd kubelet=${version}-00 kubeadm=${version}-00 kubectl=${version}-00 awscli"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above, downgrade required IIRC

@@ -1,6 +1,10 @@
resource "null_resource" "master_test" {
count = var.number_of_master_instances

triggers = {
cluster_instance_ids = "${join(",", aws_instance.simulator_master_instances.*.id)}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this prevent rebuilds of existing infra?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants