Skip to content

Conversation

@ecpullen
Copy link
Contributor

Issue number:

#415

Description of changes:

This adds the metal-k8s-cluster-resource-agent which takes and encoded management cluster kubeconfig, hardware csv, and eks anywhere config and creates a metal k8s cluster and registers all machines to ssm.

Testing done:

Created the test manifest with cargo make create metal-sonobuoy-test.
Applied the manifest with cli run file <>
Verified that the sonobuoy test passed, and the resource destruction was performed correctly.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@jpmcb
Copy link
Contributor

jpmcb commented Feb 24, 2023

Hmmm dependency mis/match? CI/CD failed with an openssh build failure:

error: package openssh v0.9.9 cannot be built because it requires rustc 1.63.0 or newer, while the currently active rustc version is 1.62.1

@ecpullen
Copy link
Contributor Author

I added a pr #774 to update the rustc version to align with the Bottlerocket SDK.

Copy link
Contributor

@webern webern left a comment

Choose a reason for hiding this comment

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

This is great but we need documentation that describes what this is, how it works, that it uses EKS-A and CAPI, that it needs a pre-existing management cluster, etc.

EKS_RESOURCE_AGENT_IMAGE_URI = { value = "${AGENT_IMAGE_REGISTRY}/eks-resource-agent:v${AGENT_IMAGE_VERSION}", condition = { env_not_set = ["EKS_RESOURCE_AGENT_IMAGE_URI"] } }
VSPHERE_K8S_CLUSTER_RESOURCE_AGENT_IMAGE_URI = { value = "${AGENT_IMAGE_REGISTRY}/vsphere-k8s-cluster-resource-agent:v${AGENT_IMAGE_VERSION}", condition = { env_not_set = ["VSPHERE_K8S_CLUSTER_RESOURCE_AGENT_IMAGE_URI"] } }
VSPHERE_VM_RESOURCE_AGENT_IMAGE_URI = { value = "${AGENT_IMAGE_REGISTRY}/vsphere-vm-resource-agent:v${AGENT_IMAGE_VERSION}", condition = { env_not_set = ["VSPHERE_VM_RESOURCE_AGENT_IMAGE_URI"] } }
METAL_K8S_CLUSTER_RESOURCE_AGENT_IMAGE_URI = { value = "${AGENT_IMAGE_REGISTRY}/metal-k8s-cluster-resource-agent:v${AGENT_IMAGE_VERSION}", condition = { env_not_set = ["METAL_K8S_CLUSTER_RESOURCE_AGENT_IMAGE_URI"] } }
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not asking for it to change now but I regret the formatting of this makefile. I generally like to spend currency in newlines to make things easier to read.

@ecpullen
Copy link
Contributor Author

ecpullen commented Mar 1, 2023

^ added a doc comment to the metal resource provider explaining prerequisites and how the agent works.

@ecpullen ecpullen requested a review from webern March 1, 2023 20:23
Copy link
Contributor

@mjsterckx mjsterckx left a comment

Choose a reason for hiding this comment

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

I think this should be rebased now that #772 is merged.

Copy link
Contributor

@mjsterckx mjsterckx left a comment

Choose a reason for hiding this comment

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

LGTM

@ecpullen ecpullen merged commit ca5cd1d into bottlerocket-os:develop Mar 2, 2023
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.

5 participants