Skip to content

Commit

Permalink
Merge pull request #270 from feiskyer/enable-spell-checking
Browse files Browse the repository at this point in the history
Enable spell checking and fix spelling issues
  • Loading branch information
k8s-ci-robot authored Dec 15, 2019
2 parents 8074fd7 + 7ca933d commit ef7d255
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 16 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ ifdef JUNIT
endif

.PHONY: test-check
test-check: test-lint-prepare test-lint test-boilerplate
test-check: test-lint-prepare test-lint test-boilerplate test-spelling

.PHONY: test-lint-prepare
test-lint-prepare:
Expand All @@ -126,6 +126,10 @@ test-lint:
test-boilerplate:
hack/verify-boilerplate.sh

.PHONY: test-spelling
test-spelling:
hack/verify-spelling.sh

.PHONY: test-bazel
test-bazel:
hack/verify-bazel.sh
Expand All @@ -135,16 +139,16 @@ update-prepare:
go get -u github.com/sgotti/glide-vc
go get -u github.com/Masterminds/glide

.PHONY: update-dependencie
.PHONY: update-dependencies
update:
hack/update-dependencies.sh
hack/update-dependenciess.sh

.PHONY: update-bazel
update-bazel:
hack/update-bazel.sh

.PHONY: test-update
test-update: update-prepare update-dependencie update-bazel
test-update: update-prepare update-dependencies update-bazel
git checkout glide.lock
git add -A .
git diff --staged --name-status --exit-code || { \
Expand Down
4 changes: 2 additions & 2 deletions docs/azure-permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Microsoft.Compute/virtualMachineScaleSets/read
Microsoft.Compute/virtualMachineScaleSets/virtualMachines/read
Microsoft.Compute/virtualMachineScaleSets/virtualmachines/instanceView/read

// Requred to add VM to LoadBalancer backendAddressPools
// Required to add VM to LoadBalancer backendAddressPools
Microsoft.Network/networkInterfaces/write
// Required to add vmss to LoadBalancer backendAddressPools
Microsoft.Compute/virtualMachineScaleSets/write
Expand Down Expand Up @@ -81,4 +81,4 @@ Microsoft.Compute/snapshots/write
// Required to get vm sizes for getting AzureDisk volume limit
Microsoft.Compute/locations/vmSizes/read
Microsoft.Compute/locations/operations/read
```
```
8 changes: 4 additions & 4 deletions docs/e2e-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
On Windows, you can install aks-engine via [Chocolatey](https://chocolatey.org/) by executing the command `choco install aks-engine`. You can install Chocolatey following the [instructions](https://chocolatey.org/install).

On Linux, it could also be installed by following commands:

```sh
$ curl -o get-akse.sh https://raw.githubusercontent.com/Azure/aks-engine/master/scripts/get-akse.sh
$ chmod 700 get-akse.sh
Expand All @@ -43,7 +43,7 @@
- [kubectl](https://kubectl.docs.kubernetes.io/)

Kubectl allows you to run command against Kubernetes cluster, which is also used for deploying CSI plugins. You can follow [here](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-binary-with-curl) to install kubectl. e.g. on Linux

```sh
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x kubectl
Expand All @@ -61,7 +61,7 @@

3. Deploy a Kubernetes cluster with the above `azure-cloud-controller-manager` image.

To deploy a cluster, export all the required environmetal variables first and then invoke `make deploy`:
To deploy a cluster, export all the required environmental variables first and then invoke `make deploy`:

```sh
export RESOURCE_GROUP_NAME=<resource group name>
Expand All @@ -71,7 +71,7 @@
export K8S_AZURE_SPSEC=<client secret>
export K8S_AZURE_TENANTID=<tenant id>
export USE_CSI_DEFAULT_STORAGECLASS=<true/false>
make deploy
```

Expand Down
8 changes: 4 additions & 4 deletions docs/release-versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Fixes to releasing branches should be merged in master branch first, and then po

Version tags:
- X.Y.0-alpha.0
- This is initial tag for a new release, it will be applied when a release branch is created. See below for detail
- X.Y.0-alpha.W, W > 0
- This is initial tag for a new release, it will be applied when a release branch is created. See below for detail
- X.Y.0-alpha.W, W > 0
- Those version tags are periodically created if enough change accumulated. It does not have direct mapping with `X.Y.0-alpha.W` in Kubernetes upstream

#### releasing branch
Expand All @@ -48,9 +48,9 @@ Release branch would be created when upstream release branch is created and firs

Version tags:
- X.Y.0-beta.0
- `X.Y.0-beta.0` would be tagged at first independent commit on release branch, the corresponding seperation point commit on master would be tagged `X.Y+1.0-alpha.0`
- `X.Y.0-beta.0` would be tagged at first independent commit on release branch, the corresponding separation point commit on master would be tagged `X.Y+1.0-alpha.0`
- No new feature changes are allowed from this time on
- X.Y.0-beta.W, W > 0
- X.Y.0-beta.W, W > 0
- Those version tags are periodically created if enough change accumulated. It does not have direct mapping with `X.Y.0-beta.W` in Kubernetes upstream
- X.Y.0
- This is the final release version. When upstream `X.Y.0` tag rolls out, we will begin prepare `X.Y.0` release
Expand Down
2 changes: 1 addition & 1 deletion docs/services/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Because the load balancer in a Kubernetes cluster is managed by Azure cloud prov
>
> * Public IP's used as instance-level public IP are mutually exclusive with outbound rules.
Here is the recommend way to define the [outbound rules](https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-rules-overview) when using seperate provisioning tools:
Here is the recommend way to define the [outbound rules](https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-rules-overview) when using separate provisioning tools:

* Create a separate IP (or multiple IPs for scale) in standard SKU for outbound rules. Make use of the [allocatedOutboundPorts](https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-rules-overview#snatports) parameter to allocate sufficient ports for your desired scenario scale.
* Create a separate pool definition for outbound, and ensure all virtual machines or VMSS virtual machines are in this pool. Azure cloud provider will manage the load balancer rules with another pool, so that provisioning tools and Azure cloud provider won't affect each other.
Expand Down
54 changes: 54 additions & 0 deletions hack/verify-spelling.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env bash

# 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.

set -o errexit
set -o nounset
set -o pipefail

TOOL_VERSION="v0.3.4"

# cd to the root path
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
cd "${ROOT}"

# create a temporary directory
TMP_DIR=$(mktemp -d)

# cleanup
exitHandler() (
echo "Cleaning up..."
rm -rf "${TMP_DIR}"
)
trap exitHandler EXIT

# perform go get in a temp dir as we are not tracking this version in a go module
# if we do the go get in the repo, it will create / update a go.mod and go.sum
cd "${TMP_DIR}"
GO111MODULE=on GOBIN="${TMP_DIR}" go get "github.com/client9/misspell/cmd/misspell@${TOOL_VERSION}"
export PATH="${TMP_DIR}:${PATH}"
cd "${ROOT}"

# check spelling
RES=0
echo "Checking spelling..."
ERROR_LOG="${TMP_DIR}/errors.log"
git ls-files | grep -v vendor | xargs misspell > "${ERROR_LOG}"
if [[ -s "${ERROR_LOG}" ]]; then
sed 's/^/error: /' "${ERROR_LOG}" # add 'error' to each line to highlight in e2e status
echo "Found spelling errors!"
RES=1
fi
exit "${RES}"
2 changes: 1 addition & 1 deletion tests/e2e/network/network_security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ var _ = FDescribe("Network security group", func() {
Expect(validateSharedSecurityRuleExists(nsg, ipList, port)).To(BeTrue(), "Security rule for service %s not exists", serviceName)
})

It("can set source IP prefixes automatically accroding to corresponding service tag", func() {
It("can set source IP prefixes automatically according to corresponding service tag", func() {
By("Creating service and wait it to expose")
annotation := map[string]string{
azure.ServiceAnnotationAllowedServiceTag: "AzureCloud",
Expand Down

0 comments on commit ef7d255

Please sign in to comment.