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

🌱 Finalize CAPI v1.6.0-beta.1 bump & diagnostics implementation #2498

Merged
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
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ IMPORT_BOSS_VER := v0.28.1
IMPORT_BOSS := $(abspath $(TOOLS_BIN_DIR)/$(IMPORT_BOSS_BIN))
IMPORT_BOSS_PKG := k8s.io/code-generator/cmd/import-boss

CAPI_HACK_TOOLS_VER := 4abf44cd85c4590602e4c10543d53cd4ec914845 # Note: this is the commit ID of the dependend CAPI release tag, currently v1.5.0
CAPI_HACK_TOOLS_VER := a02a9939f4f0b3dc3e6743b89e5244d02fe31be3 # Note: this is the commit ID of the dependend CAPI release tag, currently v1.6.0-beta.1

CONVERSION_VERIFIER_VER := $(CAPI_HACK_TOOLS_VER)
CONVERSION_VERIFIER_BIN := conversion-verifier
Expand Down Expand Up @@ -256,6 +256,7 @@ generate-manifests: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc.
output:webhook:dir=$(WEBHOOK_ROOT) \
webhook
$(CONTROLLER_GEN) \
paths=./ \
paths=./controllers/... \
output:rbac:dir=$(RBAC_ROOT) \
rbac:roleName=manager-role
Expand Down
56 changes: 40 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ Kubernetes-native declarative infrastructure for vSphere.

## What is the Cluster API Provider vSphere

The [Cluster API][cluster_api] brings declarative, Kubernetes-style APIs to cluster creation, configuration and management. Cluster API Provider for vSphere is a concrete implementation of Cluster API for vSphere.
The [Cluster API][cluster_api] brings declarative, Kubernetes-style APIs to cluster creation, configuration and management. Cluster API Provider for vSphere is a concrete implementation of Cluster API
for vSphere.

The API itself is shared across multiple cloud providers allowing for true vSphere hybrid deployments of Kubernetes. It is built atop the lessons learned from previous cluster managers such as [kops][kops] and [kubicorn][kubicorn].
The API itself is shared across multiple cloud providers allowing for true vSphere hybrid deployments of Kubernetes. It is built atop the lessons learned from previous cluster managers such
as [kops][kops] and [kubicorn][kubicorn].

## Launching a Kubernetes cluster on vSphere

Expand All @@ -31,25 +33,29 @@ Check out the [getting started guide](./docs/getting_started.md) for launching a

This provider's versions are compatible with the following versions of Cluster API:

| | Cluster API v1beta1 (v1.3) | Cluster API v1beta1 (v1.4) | Cluster API v1beta1 (v1.5) |
|----------------------------------|:--------------------------:|:--------------------------:|:--------------------------:|
| CAPV v1beta1 (v1.5) | ✓ | ✓ | ☓ |
| CAPV v1beta1 (v1.6) | ✓ | ✓ | ☓ |
| CAPV v1beta1 (v1.7) | ✓ | ✓ | ☓ |
| CAPV v1beta1 (v1.8) | ☓ | ☓ | ✓ |
| | Cluster API v1beta1 (v1.3) | Cluster API v1beta1 (v1.4) | Cluster API v1beta1 (v1.5) | Cluster API v1beta1 (v1.6) |
|---------------------|:--------------------------:|:--------------------------:|:--------------------------:|:--------------------------:|
| CAPV v1beta1 (v1.5) | ✓ | ✓ | ☓ | ☓ |
| CAPV v1beta1 (v1.6) | ✓ | ✓ | ☓ | ☓ |
| CAPV v1beta1 (v1.7) | ✓ | ✓ | ☓ | ☓ |
| CAPV v1beta1 (v1.8) | ☓ | ☓ | ✓ | ☓ |
| CAPV v1beta1 (v1.9) | ☓ | ☓ | ☓ | ✓ |

As CAPV doesn't dictate supported K8s versions, and it supports whatever CAPI supported, about the provider's compatibility with K8s versions, please refer to [CAPI Supported Kubernetes Versions](https://cluster-api.sigs.k8s.io/reference/versions.html).
As CAPV doesn't dictate supported K8s versions, and it supports whatever CAPI supported, about the provider's compatibility with K8s versions, please refer
to [CAPI Supported Kubernetes Versions](https://cluster-api.sigs.k8s.io/reference/versions.html).

Basically:

- 4 Kubernetes minor releases for the management cluster (N - N-3)
- 6 Kubernetes minor releases for the workload cluster (N - N-5)

**NOTE:** As the versioning for this project is tied to the versioning of Cluster API, future modifications to this policy may be made to more closely align with other providers in the Cluster API ecosystem.
**NOTE:** As the versioning for this project is tied to the versioning of Cluster API, future modifications to this policy may be made to more closely align with other providers in the Cluster API
ecosystem.

## Kubernetes versions with published OVAs

Note: These OVAs are not updated for security fixes and it is recommended to always use the latest patch version for the Kubernetes version you wish to run. For production-like environments, it is highly recommended to build and use your own custom images.
Note: These OVAs are not updated for security fixes and it is recommended to always use the latest patch version for the Kubernetes version you wish to run. For production-like environments, it is
highly recommended to build and use your own custom images.

| Kubernetes | Ubuntu 18.04 | Ubuntu 20.04 | Ubuntu 22.04 | Photon 3 | Flatcar Stable |
|:----------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
Expand Down Expand Up @@ -77,15 +83,18 @@ Further documentation is available in the `/docs` directory.

## Getting involved and contributing

Are you interested in contributing to cluster-api-provider-vsphere? We, the maintainers and community, would love your suggestions, contributions, and help! Also, the maintainers can be contacted at any time to learn more about how to get involved.
Are you interested in contributing to cluster-api-provider-vsphere? We, the maintainers and community, would love your suggestions, contributions, and help! Also, the maintainers can be contacted at
any time to learn more about how to get involved.

In the interest of getting more new people involved we tag issues with [`good first issue`][good_first_issue]. These are typically issues that have smaller scope but are good ways to start to get acquainted with the codebase.
In the interest of getting more new people involved we tag issues with [`good first issue`][good_first_issue]. These are typically issues that have smaller scope but are good ways to start to get
acquainted with the codebase.

We also encourage ALL active community participants to act as if they are maintainers, even if you don't have "official" write permissions. This is a community effort, we are here to serve the Kubernetes community. If you have an active interest and you want to get involved, you have real power! Don't assume that the only people who can get things done around here are the "maintainers".
We also encourage ALL active community participants to act as if they are maintainers, even if you don't have "official" write permissions. This is a community effort, we are here to serve the
Kubernetes community. If you have an active interest and you want to get involved, you have real power! Don't assume that the only people who can get things done around here are the "maintainers".

We also would love to add more "official" maintainers, so show us what you can do!

This repository uses the Kubernetes bots. See a full list of the commands [here][prow].
This repository uses the Kubernetes bots. See a full list of the commands [here][prow].

## Code of conduct

Expand Down Expand Up @@ -121,22 +130,37 @@ We also use the issue tracker to track features. If you have an idea for a featu
- Remember that users might be searching for your issue in the future, so please give it a meaningful title to help others.
- Clearly define the use case, using concrete examples. EG: I type `this` and cluster-api-provider-vsphere does `that`.
- Some of our larger features will require some design. If you would like to include a technical design for your feature please include it in the issue.
- After the new feature is well understood, and the design agreed upon, we can start coding the feature. We would love for you to code it. So please open up a **WIP** *(work in progress)* pull request, and happy coding.
- After the new feature is well understood, and the design agreed upon, we can start coding the feature. We would love for you to code it. So please open up a **WIP** *(work in progress)* pull
request, and happy coding.

<!-- References -->

[cluster_api]: https://github.com/kubernetes-sigs/cluster-api

[code_of_conduct]: https://git.k8s.io/community/code-of-conduct.md

[good_first_issue]: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

[kops]: https://github.com/kubernetes/kops

[kubicorn]: http://kubicorn.io/

[mailint_list]: https://groups.google.com/forum/#!forum/kubernetes-sig-cluster-lifecycle

[meeting_notes]: https://docs.google.com/document/d/1jQrQiOW75uWraPk4b_LWtCTHwT7EZwrWWwMdxeWOEvk/edit?usp=sharing

[new_issue]: https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/issues/new

[prow]: https://prow.k8s.io/command-help?repo=kubernetes-sigs%2Fcluster-api-provider-vsphere

[slack]: https://kubernetes.slack.com/messages/CKFGK3SSD

[slack_info]: https://github.com/kubernetes/community/tree/master/communication#communication

[troubleshooting]: ./docs/troubleshooting.md

[zoom_meeting]: https://zoom.us/j/92253194848?pwd=cVVVNDMxeTl1QVJPUlpvLzNSVU1JZz09

[time_zone_converter]: http://www.thetimezoneconverter.com/?t=08:00&tz=PT%20%28Pacific%20Time%29

<!-- markdownlint-disable-file MD033 -->
5 changes: 5 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ spec:
containers:
- args:
- --leader-elect
- "--diagnostics-address=${CAPI_DIAGNOSTICS_ADDRESS:=:8443}"
- "--insecure-diagnostics=${CAPI_INSECURE_DIAGNOSTICS:=false}"
- --v=4
- --enable-keep-alive
- "--feature-gates=NodeAntiAffinity=${EXP_NODE_ANTI_AFFINITY:=false}"
Expand All @@ -28,6 +30,9 @@ spec:
- containerPort: 9440
name: healthz
protocol: TCP
- containerPort: 8443
name: metrics
protocol: TCP
readinessProbe:
httpGet:
path: /readyz
Expand Down
12 changes: 12 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@ rules:
- services/status
verbs:
- get
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
- apiGroups:
- cluster.x-k8s.io
resources:
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func InitFlags(fs *pflag.FlagSet) {
"Bind address to expose the pprof profiler (e.g. localhost:6060)")

fs.BoolVar(&enableContentionProfiling, "contention-profiling", false,
"Enable block profiling, if profiler-address is set.")
"Enable block profiling.")

fs.DurationVar(&syncPeriod, "sync-period", defaultSyncPeriod,
"The minimum interval at which watched resources are reconciled (e.g. 15m)")
Expand Down
20 changes: 11 additions & 9 deletions test/e2e/config/vsphere-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
# For creating local images, run ./hack/e2e.sh

images:
- name: registry.k8s.io/cluster-api/cluster-api-controller:v1.5.2
- name: registry.k8s.io/cluster-api/cluster-api-controller:v1.6.0-beta.1
loadBehavior: tryLoad
- name: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.5.2
- name: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.6.0-beta.1
loadBehavior: tryLoad
- name: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.5.2
- name: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.6.0-beta.1
loadBehavior: tryLoad
- name: gcr.io/k8s-staging-cluster-api/capv-manager:e2e
loadBehavior: mustLoad
Expand All @@ -28,9 +28,9 @@ providers:
- name: cluster-api
type: CoreProvider
versions:
- name: v1.5.2
- name: v1.6.0-beta.1
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.2/core-components.yaml"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.0-beta.1/core-components.yaml"
type: "url"
contract: v1beta1
files:
Expand All @@ -42,9 +42,9 @@ providers:
- name: kubeadm
type: BootstrapProvider
versions:
- name: v1.5.2
- name: v1.6.0-beta.1
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.2/bootstrap-components.yaml"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.0-beta.1/bootstrap-components.yaml"
type: "url"
contract: v1beta1
files:
Expand All @@ -56,9 +56,9 @@ providers:
- name: kubeadm
type: ControlPlaneProvider
versions:
- name: v1.5.2
- name: v1.6.0-beta.1
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.2/control-plane-components.yaml"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.0-beta.1/control-plane-components.yaml"
type: "url"
contract: v1beta1
files:
Expand Down Expand Up @@ -125,6 +125,8 @@ variables:
VENDOR_ID: 4318
# CAPV feature flags
EXP_NODE_ANTI_AFFINITY: "true"
CAPI_DIAGNOSTICS_ADDRESS: ":8080"
CAPI_INSECURE_DIAGNOSTICS: "true"

intervals:
default/wait-controllers: ["5m", "10s"]
Expand Down
21 changes: 11 additions & 10 deletions test/e2e/config/vsphere-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
# - from the CAPV repository root, `make e2e` to build the vsphere provider image and run e2e tests.

images:
- name: registry.k8s.io/cluster-api/cluster-api-controller:v1.5.2
- name: registry.k8s.io/cluster-api/cluster-api-controller:v1.6.0-beta.1
loadBehavior: tryLoad
- name: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.5.2
- name: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.6.0-beta.1
loadBehavior: tryLoad
- name: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.5.2
- name: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.6.0-beta.1
loadBehavior: tryLoad
- name: gcr.io/k8s-staging-cluster-api/capv-manager:e2e
loadBehavior: mustLoad
Expand All @@ -31,9 +31,9 @@ providers:
- name: cluster-api
type: CoreProvider
versions:
- name: v1.5.2
- name: v1.6.0-beta.1
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.2/core-components.yaml"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.0-beta.1/core-components.yaml"
type: "url"
contract: v1beta1
files:
Expand All @@ -45,9 +45,9 @@ providers:
- name: kubeadm
type: BootstrapProvider
versions:
- name: v1.5.2
- name: v1.6.0-beta.1
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.2/bootstrap-components.yaml"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.0-beta.1/bootstrap-components.yaml"
type: "url"
contract: v1beta1
files:
Expand All @@ -59,9 +59,9 @@ providers:
- name: kubeadm
type: ControlPlaneProvider
versions:
- name: v1.5.2
- name: v1.6.0-beta.1
# Use manifest from source files
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.2/control-plane-components.yaml"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.0-beta.1/control-plane-components.yaml"
type: "url"
contract: v1beta1
files:
Expand Down Expand Up @@ -149,7 +149,8 @@ variables:
# Following variables are also required and please use env variables to avoid disclosure of sensitive data
VSPHERE2_USERNAME:
VSPHERE2_PASSWORD:

CAPI_DIAGNOSTICS_ADDRESS: ":8080"
CAPI_INSECURE_DIAGNOSTICS: "true"

intervals:
default/wait-controllers: ["5m", "10s"]
Expand Down
5 changes: 4 additions & 1 deletion test/e2e/data/shared/main/v1beta1/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3
kind: Metadata
releaseSeries:
- major: 1
minor: 6
contract: v1beta1
- major: 1
minor: 5
contract: v1beta1
Expand All @@ -23,4 +26,4 @@ releaseSeries:
contract: v1beta1
- major: 1
minor: 0
contract: v1beta1
contract: v1beta1
Loading
Loading