diff --git a/Makefile b/Makefile index dc4a47db24..3dc04f86b6 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 diff --git a/README.md b/README.md index 6f176a2bb8..5f4dc8ee9e 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 | |:----------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| @@ -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 @@ -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. + [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 diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 88ba1bc468..9ee193e401 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -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}" @@ -28,6 +30,9 @@ spec: - containerPort: 9440 name: healthz protocol: TCP + - containerPort: 8443 + name: metrics + protocol: TCP readinessProbe: httpGet: path: /readyz diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 23bb2d6f06..c9e22f1831 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -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: diff --git a/main.go b/main.go index 2e83f76b7c..62240b3210 100644 --- a/main.go +++ b/main.go @@ -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)") diff --git a/test/e2e/config/vsphere-ci.yaml b/test/e2e/config/vsphere-ci.yaml index b35ccf8c5e..0c7d197a78 100644 --- a/test/e2e/config/vsphere-ci.yaml +++ b/test/e2e/config/vsphere-ci.yaml @@ -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 @@ -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: @@ -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: @@ -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: @@ -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"] diff --git a/test/e2e/config/vsphere-dev.yaml b/test/e2e/config/vsphere-dev.yaml index f2b3bf8a29..4043b68f3d 100644 --- a/test/e2e/config/vsphere-dev.yaml +++ b/test/e2e/config/vsphere-dev.yaml @@ -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 @@ -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: @@ -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: @@ -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: @@ -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"] diff --git a/test/e2e/data/shared/main/v1beta1/metadata.yaml b/test/e2e/data/shared/main/v1beta1/metadata.yaml index 39e7dab881..55227b64ef 100644 --- a/test/e2e/data/shared/main/v1beta1/metadata.yaml +++ b/test/e2e/data/shared/main/v1beta1/metadata.yaml @@ -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 @@ -23,4 +26,4 @@ releaseSeries: contract: v1beta1 - major: 1 minor: 0 - contract: v1beta1 \ No newline at end of file + contract: v1beta1 diff --git a/test/integration/integration-dev.yaml b/test/integration/integration-dev.yaml index 3fb377e0c9..d1886f1e11 100644 --- a/test/integration/integration-dev.yaml +++ b/test/integration/integration-dev.yaml @@ -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 @@ -30,9 +30,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: @@ -44,9 +44,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: @@ -58,9 +58,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: @@ -88,5 +88,8 @@ variables: VSPHERE_USERNAME: "admin123" SERVICE_ACCOUNTS_CM_NAMESPACE: "foo-system" SERVICE_ACCOUNTS_CM_NAME: "foo" + CAPI_DIAGNOSTICS_ADDRESS: ":8080" + CAPI_INSECURE_DIAGNOSTICS: "true" + intervals: - default/wait-controllers: ["5m", "10s"] \ No newline at end of file + default/wait-controllers: ["5m", "10s"]