diff --git a/.github/.markdownlint-cli2.yaml b/.github/.markdownlint-cli2.yaml new file mode 100644 index 0000000000..2f990b4752 --- /dev/null +++ b/.github/.markdownlint-cli2.yaml @@ -0,0 +1,7 @@ +config: + # First line in a file should be a top-level heading + MD041: false + # Multiple consecutive blank lines + MD012: false + # Trailing spaces + MD009: false diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 4a8bf5ee2c..86eb962e2f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -21,4 +21,4 @@ about: Tell us about a problem you are experiencing - Cluster-api-provider-vsphere version: - Kubernetes version: (use `kubectl version`): -- OS (e.g. from `/etc/os-release`): \ No newline at end of file +- OS (e.g. from `/etc/os-release`): diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index f57abd1164..62d840f350 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -18,4 +18,4 @@ about: Suggest an idea for this project - Cluster-api-provider-vsphere version: - Kubernetes version: (use `kubectl version`): -- OS (e.g. from `/etc/os-release`): \ No newline at end of file +- OS (e.g. from `/etc/os-release`): diff --git a/.github/ISSUE_TEMPLATE/release_tracking.md b/.github/ISSUE_TEMPLATE/release_tracking.md index f2d03edb27..8b78f61161 100644 --- a/.github/ISSUE_TEMPLATE/release_tracking.md +++ b/.github/ISSUE_TEMPLATE/release_tracking.md @@ -12,17 +12,21 @@ Please see the corresponding sections in [release-tasks.md](https://github.com/k ## Tasks Early in the cycle: + * [ ] [Prepare main branch for development of the new release](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/main/docs/release/release-tasks.md#prepare-main-branch-for-development-of-the-new-release) * [ ] [Remove previously deprecated code](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/main/docs/release/release-tasks.md#remove-previously-deprecated-code) If and when necessary: + * [ ] [Bump the Kubernetes version](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/main/docs/release/release-tasks.md#optional-bump-the-kubernetes-version) Late in the cycle: + * [ ] [Bump dependencies](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/main/docs/release/release-tasks.md#bump-dependencies) * [ ] [Create the new release branch](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/main/docs/release/release-tasks.md#create-a-release-branch) * [ ] [opt] [Cut beta/rc releases](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/main/docs/release/release-tasks.md#cut-a-release) * [ ] [Cut the minor release](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/main/docs/release/release-tasks.md#cut-a-release) Continuously: + * [Reduce the amount of flaky tests](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/main/docs/release/release-tasks.md#continuously-reduce-the-amount-of-flaky-tests) diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml new file mode 100644 index 0000000000..d318325da9 --- /dev/null +++ b/.markdownlint-cli2.yaml @@ -0,0 +1,6 @@ +config: + default: true + line_length: false +ignores: +- _releasenotes +# - .github diff --git a/.markdownlintrc b/.markdownlintrc deleted file mode 100644 index 7311210fa1..0000000000 --- a/.markdownlintrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "default": true, - "line_length": false -} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 76b96559f6..7de52fae4c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,7 +62,7 @@ The steps to add someone as a maintainer are: * Open PR to add Github username to **cluster-api-provider-vsphere-maintainers** to [kubernetes/org/config/kubernetes-sigs/sig-cluster-lifecycle/teams.yaml](https://github.com/kubernetes/org/blob/main/config/kubernetes-sigs/sig-cluster-lifecycle/teams.yaml) * Open PR to add Github username to [kubernetes/test-infra/config/jobs/kubernetes-sigs/cluster-api-provider-vsphere/OWNERS](https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes-sigs/cluster-api-provider-vsphere/OWNERS) -* Open PR to add Google ID to the k8s-infra-staging-capi-vsphere@kubernetes.io and sig-cluster-lifecycle-cluster-api-vsphere-alerts@kubernetes.io Google groups in [kubernetes/k8s.io/groups/sig-cluster-lifecycle/groups.yaml](https://github.com/kubernetes/k8s.io/blob/main/groups/sig-cluster-lifecycle/groups.yaml) +* Open PR to add Google ID to the and Google groups in [kubernetes/k8s.io/groups/sig-cluster-lifecycle/groups.yaml](https://github.com/kubernetes/k8s.io/blob/main/groups/sig-cluster-lifecycle/groups.yaml) * Open PR to add approvers/reviewers to [CAPV image promotion](https://github.com/kubernetes/k8s.io/blob/main/registry.k8s.io/images/k8s-staging-capi-vsphere/OWNERS). * Open PR to image-builder to modify `cluster-api-vsphere-maintainers` in [OWNERS_ALIASES](https://github.com/kubernetes-sigs/image-builder/blob/main/OWNERS_ALIASES) diff --git a/Makefile b/Makefile index 82a1ccfc3b..ce990961b7 100644 --- a/Makefile +++ b/Makefile @@ -183,6 +183,10 @@ RELEASE_NOTES_BIN := release-notes RELEASE_NOTES := $(abspath $(TOOLS_BIN_DIR)/$(RELEASE_NOTES_BIN)-$(RELEASE_NOTES_VER)) RELEASE_NOTES_PKG := sigs.k8s.io/cluster-api/hack/tools/release +# Defines the version used for lint-markdown. Make sure to run ./hack/markdownlint-sync-image.sh after updating the image. +MARKDOWNLINT_CLI2_VERSION ?= "v0.8.1" +MARKDOWNLINT_CLI2_IMAGE_NAME ?= "gcr.io/cluster-api-provider-vsphere/extra/markdownlint-cli2" + # Define Docker related variables. Releases should modify and double check these vars. REGISTRY ?= gcr.io/$(shell gcloud config get-value project) PROD_REGISTRY ?= registry.k8s.io/cluster-api-vsphere @@ -334,7 +338,7 @@ lint-go-full: lint-go ## Run slower linters to detect possible issues .PHONY: lint-markdown lint-markdown: ## Lint the project's markdown - docker run --rm -v "$$(pwd)":/build$(DOCKER_VOL_OPTS) gcr.io/cluster-api-provider-vsphere/extra/mdlint:0.17.0 -- /md/lint -i _releasenotes . + docker run --rm -v "$$(pwd)":/workdir$(DOCKER_VOL_OPTS) --entrypoint="markdownlint-cli2-config" $(MARKDOWNLINT_CLI2_IMAGE_NAME):$(MARKDOWNLINT_CLI2_VERSION) ".markdownlint-cli2.yaml" "**/*.md" .PHONY: lint-fix lint-fix: $(GOLANGCI_LINT) ## Lint the codebase and run auto-fixers if supported by the linter diff --git a/README.md b/README.md index 17cfca419c..78b22aeb96 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Check out the [getting started guide](./docs/getting_started.md) for launching a - Native Kubernetes manifests and API - Manages the bootstrapping of VMs on cluster. -- Choice of Linux distribution between Ubuntu 18.04 and CentOS 7 using VM Templates based on [OVA images](#Kubernetes-versions-with-published-OVAs). +- Choice of Linux distribution between Ubuntu 18.04 and CentOS 7 using VM Templates based on [OVA images](#kubernetes-versions-with-published-ovas). - Deploys Kubernetes control planes into provided clusters on vSphere. - Doesn't use SSH for bootstrapping nodes. - Installs only the minimal components to bootstrap a control plane and workers. @@ -128,7 +128,7 @@ We also use the issue tracker to track features. If you have an idea for a featu [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 +[mailing_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://go.k8s.io/bot-commands diff --git a/docs/getting_started.md b/docs/getting_started.md index d3c92d909e..77e90d7939 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -208,9 +208,7 @@ $ clusterctl generate custom-cluster vsphere-quickstart \ [vm-template]: https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.vm_admin.doc/GUID-17BEDA21-43F6-41F4-8FB2-E01D275FE9B4.html [cluster-api-book]: https://cluster-api.sigs.k8s.io/ -[glossary-bootstrapping]: https://cluster-api.sigs.k8s.io/reference/glossary.html#bootstrap [kind]: https://kind.sigs.k8s.io -[glossary-management-cluster]: https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/book/GLOSSARY.md#management-cluster [releases]: https://github.com/kubernetes-sigs/cluster-api/releases [docker]: https://docs.docker.com/glossary/?term=install [kubectl]: https://kubernetes.io/docs/tasks/tools/install-kubectl/ diff --git a/docs/gpu-pci.md b/docs/gpu-pci.md index fd392262f2..45731dc701 100644 --- a/docs/gpu-pci.md +++ b/docs/gpu-pci.md @@ -21,14 +21,14 @@ Let's create a CAPV cluster with GPU enabled via PCI passthrough mode and run a - Browse to a host in the vSphere Client navigator. - On the **Configure** tab, expand **Hardware** and click **PCI Devices**. - Select the GPU device to be used for passthrough and click **TOGGLE PASSTHROUGH**. This sets the device to be available in the passthrough mode. - image + ![image](https://user-images.githubusercontent.com/8758225/178333983-0dcc9771-ba41-4c90-918f-388795d77846.png) - Find the Device ID and Vendor ID of the PCI device. - Browse to a host in the vSphere Client navigator. - On the **Configure** tab, expand **Hardware** and click **PCI Devices**. - Click on the **PASSTHROUGH-ENABLED DEVICES** tab and select the device you want to use. - As shown below, the **General Information** section lists out the Device ID and Vendor ID information. - image + ![image](https://user-images.githubusercontent.com/8758225/178334149-def48b35-1142-4c05-b455-fefd15b1e41a.png) **Note**: The device and vendor ID combination is the same for a single family of GPU cards. So, for all the Tesla T4 cards, the values would be the ones listed above. diff --git a/docs/proposal/20211006-supervisor-based-apis.md b/docs/proposal/20211006-supervisor-based-apis.md index 6f61e51599..5835cdd940 100644 --- a/docs/proposal/20211006-supervisor-based-apis.md +++ b/docs/proposal/20211006-supervisor-based-apis.md @@ -13,7 +13,7 @@ status: implementable ## Table of Contents -- [Title](#title) +- [supervisor-based APIs for CAPV](#supervisor-based-apis-for-capv) - [Table of Contents](#table-of-contents) - [Glossary](#glossary) - [Summary](#summary) @@ -21,14 +21,21 @@ status: implementable - [Goals](#goals) - [Non-Goals/Future Work](#non-goalsfuture-work) - [Proposal](#proposal) + - [Release engineering](#release-engineering) - [User Stories](#user-stories) - [Story 1](#story-1) - [Story 2](#story-2) - - [Story 3](#story-3) + - [Story 3](#story-3) - [Implementation Details/Notes/Constraints](#implementation-detailsnotesconstraints) + - [Controller changes](#controller-changes) + - [Newly added Controllers](#newly-added-controllers) + - [ServiceDiscovery controller](#servicediscovery-controller) + - [CI and test coverage](#ci-and-test-coverage) - [Security Model](#security-model) - [Risks and Mitigations](#risks-and-mitigations) - [Alternatives](#alternatives) + - [Use a separate branch to host the new APIs and controllers](#use-a-separate-branch-to-host-the-new-apis-and-controllers) + - [Add new fields to current API and heavily rely on webhook for field compatibility](#add-new-fields-to-current-api-and-heavily-rely-on-webhook-for-field-compatibility) - [Upgrade Strategy](#upgrade-strategy) - [Implementation History](#implementation-history) diff --git a/docs/proposal/20220907-node-affinity-and-anti-affinity.md b/docs/proposal/20220907-node-affinity-and-anti-affinity.md index 4b75af0faf..6c9ea75882 100644 --- a/docs/proposal/20220907-node-affinity-and-anti-affinity.md +++ b/docs/proposal/20220907-node-affinity-and-anti-affinity.md @@ -15,7 +15,7 @@ status: proposed ## Table of Contents -* [Support for Node affinity and anti-affinity](#support-for-node-affinity-and-anti-affinity) +* [Support for Node anti-affinity](#support-for-node-anti-affinity) * [Table of Contents](#table-of-contents) * [Glossary](#glossary) * [Summary](#summary) diff --git a/hack/markdownlint-sync-image.sh b/hack/markdownlint-sync-image.sh new file mode 100755 index 0000000000..4a5322e4cf --- /dev/null +++ b/hack/markdownlint-sync-image.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Copyright 2023 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o nounset +set -o pipefail + +MAKEFILE_PATH="$(dirname "${0}")/../Makefile" + +MARKDOWNLINT_CLI2_VERSION="$(grep '^MARKDOWNLINT_CLI2_VERSION ' < "${MAKEFILE_PATH}" | awk '{print $NF}' | tr -d '"')" +TARGET_IMAGE_NAME="$(grep '^MARKDOWNLINT_CLI2_IMAGE_NAME ' < "${MAKEFILE_PATH}" | awk '{print $NF}' | tr -d '"')" + +ORIGINAL_IMAGE="davidanson/markdownlint-cli2:${MARKDOWNLINT_CLI2_VERSION}" +TARGET_IMAGE="${TARGET_IMAGE_NAME}:${MARKDOWNLINT_CLI2_VERSION}" + +echo docker pull "${ORIGINAL_IMAGE}" +echo docker tag "${ORIGINAL_IMAGE}" "${TARGET_IMAGE}" +echo docker push "${TARGET_IMAGE}" diff --git a/hack/tools/mdlint/Dockerfile b/hack/tools/mdlint/Dockerfile deleted file mode 100644 index 9de4a4d85d..0000000000 --- a/hack/tools/mdlint/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -# syntax=docker/dockerfile:1.4 - -# Copyright 2019 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################ -## INSTALL MDLINT ## -################################################################################ -FROM node:12.6.0-slim as build -ARG MDLINT_CLI_VERSION=0.31.1 -ENV MDLINT_CLI_VERSION=${MDLINT_CLI_VERSION} -RUN npm install -g --prefix=/md markdownlint-cli@${MDLINT_CLI_VERSION} && \ - ln -s /md/lib/node_modules/markdownlint-cli/markdownlint.js /md/lint - -################################################################################ -## RUN MDLINT ## -################################################################################ -FROM gcr.io/distroless/nodejs:latest -LABEL "maintainer" "Andrew Kutz " -COPY --from=build /md/ /md/ -WORKDIR /build -CMD [ "/md/lint", "-i", "vendor", "." ] -ENTRYPOINT [ "/nodejs/bin/node" ] diff --git a/hack/tools/mdlint/Makefile b/hack/tools/mdlint/Makefile deleted file mode 100644 index 60af48c611..0000000000 --- a/hack/tools/mdlint/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2019 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -all: build - -MDLINT_CLI_VERSION ?= 0.31.1 -IMAGE_NAME ?= gcr.io/cluster-api-provider-vsphere/extra/mdlint -IMAGE_TAG ?= $(IMAGE_NAME):$(MDLINT_CLI_VERSION) - -build: - docker build --build-arg MDLINT_CLI_VERSION=$(MDLINT_CLI_VERSION) -t $(IMAGE_TAG) . - docker tag $(IMAGE_TAG) $(IMAGE_NAME):latest -.PHONY: build - -push: - docker push $(IMAGE_TAG) - docker push $(IMAGE_NAME):latest -.PHONY: push