Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vmware-tanzu/cluster-api-provider-bringyourownhost
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9aeffcabd2410ce0376fe8df6321185e637d0390
Choose a base ref
..
head repository: vmware-tanzu/cluster-api-provider-bringyourownhost
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f80281a32313739bc0658da760eb83a6f457fde0
Choose a head ref
65 changes: 65 additions & 0 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Cluster API Provider for Bring Your Own Host Governance

This document defines the project governance for Cluster API Provider for Bring Your Own Host.

## Overview

**Cluster API Provider for Bring Your Own Host** is committed to building an open, inclusive, productive and
self-governing open source community focused on building a high-quality
[Cluster API Provider](https://cluster-api.sigs.k8s.io/developer/providers/implementers-guide/overview.html). The
community is governed by this document which defines how all members should work
together to achieve this goal.

## Code of Conduct

The Bring Your Own Host community abides by this [code of conduct](CODE-OF-CONDUCT.md).

## Community Roles

* **Users:** Members that engage with the Bring Your Own Host community via any medium
(Slack, GitHub, mailing lists, etc.).
* **Contributors:** Do regular contributions to the Bring Your Own Host project
(documentation, code reviews, responding to issues, participating in proposal
discussions, contributing code, etc.).
* **Maintainers**: Responsible for the overall health and direction of the
project. They are the final reviewers of PRs and responsible for Bring Your Own Host
releases.

### Contributors

Anyone can contribute to the project (e.g. open a PR) as long as they follow the
guidelines in [CONTRIBUTING.md](CONTRIBUTING.md).


### Maintainers

The list of current maintainers can be found in
[MAINTAINERS.md](MAINTAINERS.md).

While anyone can review a PR and is encouraged to do so, only maintainers are
allowed to merge the PR. To maintain velocity, two approvals (either maintainers or reviewers) are
required to merge a given PR. In case of a disagreement between maintainers, a
vote should be called (on GitHub or Slack) and a simple majority is required in
order for the PR to be merged.

New maintainers must be nominated from contributors by an existing maintainer
and must be elected by a [supermajority](#supermajority) of the current
maintainers. Likewise, maintainers can be removed by a supermajority of the
maintainers or can resign by notifying the maintainers.

### Supermajority

A supermajority is defined as two-thirds of members in the group.

## Code of Conduct

The code of conduct is overseen by the Bring Your Own Host project maintainers. Possible code
of conduct violations should be emailed to the project maintainers.

If the possible violation is against one of the project maintainers that member
will be recused from voting on the issue.

## Updating Governance

All substantive changes in Governance require a supermajority vote of the
maintainers.
10 changes: 5 additions & 5 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@

## Maintainers

| Maintainer | GitHub ID | Affiliation |
|------------|-----------|-------------|
|Anusha Hegde | [anusha94](https://github.com/anusha94 ) | [VMware](https://www.github.com/vmware/) |
|Dharmjit Singh | [dharmjit](https://github.com/dharmjit/ ) | [VMware](https://www.github.com/vmware/) |
|Jamie Monserrate | [jamiemonserrate](https://github.com/jamiemonserrate ) | [VMware](https://www.github.com/vmware/) |
| Maintainer | GitHub ID | Affiliation |
|------------------|--------------------------------------------------------|------------------------------------------|
| Anusha Hegde | [anusha94](https://github.com/anusha94 ) | [VMware](https://www.github.com/vmware/) |
| Dharmjit Singh | [dharmjit](https://github.com/dharmjit/ ) | [VMware](https://www.github.com/vmware/) |
| Jamie Monserrate | [jamiemonserrate](https://github.com/jamiemonserrate ) | [VMware](https://www.github.com/vmware/) |

## Core Contributors and Stakeholders

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ webhook-test:
# More info on the usage of ANSI control characters for terminal formatting:
# https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters
# More info on the awk command:
# http://linuxcommand.org/lc3_adv_awk.php
# https://linuxcommand.org/lc3_adv_awk.php

help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
51 changes: 25 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Kubernetes Cluster API Provider BYOH(Bring Your Own Host)
# Kubernetes Cluster API Provider Bring Your Own Host (BYOH)
<p align="center">
<!-- lint card --><a href="https://github.com/vmware-tanzu/cluster-api-provider-bringyourownhost/actions/workflows/lint.yml">
<img src="https://github.com/vmware-tanzu/cluster-api-provider-bringyourownhost/actions/workflows/lint.yml/badge.svg"></a>
@@ -23,11 +23,31 @@

## What is Cluster API Provider BYOH

[Cluster API][cluster_api] brings
[Cluster API](https://github.com/kubernetes-sigs/cluster-api) brings
declarative, Kubernetes-style APIs to cluster creation, configuration and
management.

__BYOH__ is a Cluster API v1beta1 Infrastructure Provider for already-provisioned hosts running Linux.
__BYOH__ is a Cluster API Infrastructure Provider for already-provisioned hosts running Linux. This provider allows operators to adopt Cluster API for deploying and managing kubernetes nodes without also having to adopt a specific infrastructure service. This enables users to decouple kubernetes node provisioning from host and infrastructure provisioning.

## BYOH Glossary
**Host** - A host is a running computer system. It could be physical or virtual. It has a kernel and some base operating system

**BYO Host** - A Linux host provisioned and managed outside of Cluster API

**BYOH Capacity Pool** - A set of BYO Hosts registered in a management cluster & authorized for usage as a capacity for deploying Kubernetes nodes

**Kubernetes Node** - A Kubernetes Node that runs on top of a Host. There is a 1-to-1 relationship between nodes and hosts (every host has zero or one nodes). Node provisioning and lifecycle management is a Cluster API responsibility

**Kubernetes Host Components** - The components that run uncontainerized on the host and are required to bootstrap a Kubernetes node. Typically, this is at least kubelet, containerd and kubeadm, but different OS might require different components in this category

## Features

- Native Kubernetes manifests and API
- Support for single and multi-node control plane clusters
- Support already provisioned Linux VMs with Ubuntu 20.04

## Getting Started
Check out the [getting_started](https://github.com/vmware-tanzu/cluster-api-provider-bringyourownhost/blob/main/docs/getting_started.md) guide for launching a BYOH workload cluster

## Community, discussion, contribution, and support

@@ -46,18 +66,11 @@ also feel free to reach out to discuss.

See also our [contributor guide](CONTRIBUTING.md) and the Kubernetes [community page](https://kubernetes.io/community) for more details on how to get involved.

## Getting Started
Check out the [getting_started](https://github.com/vmware-tanzu/cluster-api-provider-bringyourownhost/blob/main/docs/getting_started.md) guide for launching a BYOH workload cluster

## Project Status

This project is currently a work-in-progress, in an Alpha state, so it may not be production ready. There is no backwards-compatibility guarantee at this point. For more details on the roadmap and upcoming features, check out [the project's issue tracker on GitHub][issue].

## Features

- Native Kubernetes manifests and API
- Support for single and multi-node control plane clusters
- Support already provisioned Linux VMs with Ubuntu 20.04

## Getting involved and contributing

@@ -71,26 +84,12 @@ More about development and contributing practices can be found in [`CONTRIBUTING

## Compatibility with Cluster API and Kubernetes Versions

### Cluster API compatibility Matrix:

||Cluster API v1alpha4 (v0.4)|Cluster API v1beta1 (v1.0)|
|-|-|-|
|BYOH Provider v1alpha1 (v0.1.0)|||

- BYOH is currently compatible wth Cluster API v1beta1 (v1.0)
- BYOH installer support is present and tested only for Kubernetes version `v1.22.3`. You may however use it to provision clusters of a different version by manually installing the Kubernetes components (use the `--skip-installation` flag when starting the agent)

### Kubernetes compatibility Matrix:

||Kubernetes 1.20|Kubernetes 1.21|Kubernetes 1.22|
|-|-|-|-|
|BYOH Provider v1alpha1 (v0.1.0)||||

## BYOH in News
- [TGIK episode on BYOH](https://www.youtube.com/watch?v=Xwm5Ka27-Io&t=2838s)
- BYOH presented during [Cluster API Office Hours](https://www.youtube.com/watch?v=6ODMLgX-dz4&t=572s)
- [BYOH on ARM](https://williamlam.com/2021/11/hybrid-x86-and-arm-kubernetes-clusters-using-tanzu-community-edition-tce-and-esxi-arm.html)


<!-- References -->

[cluster_api]: https://github.com/kubernetes-sigs/cluster-api
[issue]: https://github.com/vmware-tanzu/cluster-api-provider-bringyourownhost/issues
33 changes: 12 additions & 21 deletions agent/help_flag_test.go
Original file line number Diff line number Diff line change
@@ -17,42 +17,33 @@ var _ = Describe("Help flag for host agent", func() {
Context("When the help flag is provided", func() {
var (
expectedOptions = []string{
"-downloadpath string",
"-kubeconfig string",
"-label value",
"-metricsbindaddress string",
"-namespace string",
"-skip-installation",
"-version",
"-add_dir_header",
"-alsologtostderr",
"-log_backtrace_at value",
"-log_dir string",
"-log_file string",
"-log_file_max_size uint",
"-logtostderr",
"-skip_headers",
"-skip_log_headers",
"-stderrthreshold value",
"-v value",
"-vmodule value",
"--downloadpath string",
"--kubeconfig string",
"--label labelFlags",
"--metricsbindaddress string",
"--namespace string",
"--skip-installation",
"--version",
"-v, --v",
}
)

It("should output the expected option", func() {
command := exec.Command(pathToHostAgentBinary, "--help")
session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter)
Expect(err).NotTo(HaveOccurred())
Eventually(session, "5s").Should(gexec.Exit(0))
Eventually(session, "5s").Should(gexec.Exit())

output := string(session.Err.Contents())
for _, line := range strings.Split(strings.TrimRight(output, "\n"), "\n") {
line = strings.TrimSpace(line)
if !strings.HasPrefix(line, "-") {
continue
}
words := strings.Split(line, " ")
line = (words[0] + " " + words[1]) // checking the first two words
// Any option not belongs to expectedOptions is not allowed.
Expect(line).To(BeElementOf(expectedOptions))
Expect(strings.TrimSpace(line)).To(BeElementOf(expectedOptions))
}

})
6 changes: 3 additions & 3 deletions agent/installer/bundle_downloader_test.go
Original file line number Diff line number Diff line change
@@ -92,14 +92,14 @@ var _ = Describe("Byohost Installer Tests", func() {
k8sVersion,
testTag,
mi.Get)
Expect(err).ShouldNot((HaveOccurred()))
Expect(err).ShouldNot(HaveOccurred())
_, err = os.Stat(bd.GetBundleDirPath(k8sVersion, testTag))
Expect(err).ShouldNot((HaveOccurred()))
Expect(err).ShouldNot(HaveOccurred())
notExist := os.IsNotExist(err)
Expect(notExist).ShouldNot(BeTrue())

_, err = os.Stat(bd.GetBundleDirPath(k8sVersion+"a", testTag))
Expect(err).Should((HaveOccurred()))
Expect(err).Should(HaveOccurred())
notExist = os.IsNotExist(err)
Expect(notExist).Should(BeTrue())
})
File renamed without changes.
12 changes: 6 additions & 6 deletions agent/installer/installer_test.go
Original file line number Diff line number Diff line change
@@ -17,13 +17,13 @@ var _ = Describe("Byohost Installer Tests", func() {
Context("When installer is created for unsupported OS", func() {
It("Should return error", func() {
_, err := newUnchecked("Ubuntu_99.04.3_x86-64", "", logr.Discard(), nil)
Expect(err).Should((HaveOccurred()))
Expect(err).Should(HaveOccurred())
})
})
Context("When installer is created with empty download path", func() {
It("Should return error", func() {
_, err := New("", logr.Discard())
Expect(err).Should((HaveOccurred()))
Expect(err).Should(HaveOccurred())
})
})
Context("When installer is created", func() {
@@ -33,10 +33,10 @@ var _ = Describe("Byohost Installer Tests", func() {
i := NewPreviewInstaller(os, nil)

err := i.Install("", "unsupported-k8s", testTag)
Expect(err).Should((HaveOccurred()))
Expect(err).Should(HaveOccurred())

err = i.Uninstall("", "unsupported-k8s", testTag)
Expect(err).Should((HaveOccurred()))
Expect(err).Should(HaveOccurred())
}
})
})
@@ -49,15 +49,15 @@ var _ = Describe("Byohost Installer Tests", func() {
ob := algo.OutputBuilderCounter{}
i := NewPreviewInstaller(os, &ob)
err := i.Install("", k8s, testTag)
Expect(err).ShouldNot((HaveOccurred()))
Expect(err).ShouldNot(HaveOccurred())
Expect(ob.LogCalledCnt).Should(Equal(22))
}

{
ob := algo.OutputBuilderCounter{}
i := NewPreviewInstaller(os, &ob)
err := i.Uninstall("", k8s, testTag)
Expect(err).ShouldNot((HaveOccurred()))
Expect(err).ShouldNot(HaveOccurred())
Expect(ob.LogCalledCnt).Should(Equal(22))
}
}
Loading