Skip to content

Commit

Permalink
Automated repo sync 20210706
Browse files Browse the repository at this point in the history
Transition go.mod updates from make-deps to ballast-renovate-bot (#1838)
Update from v1.22.0-alpha.3 to v1.22.0-beta.0 (#1839)
Disable StrictHostKeyChecking for vagrant builds like we do for Travis (#1837)
Initial setup for renovate config (go.mod management) (#1836)
Add contributing documentation (#1833)
  • Loading branch information
jenkins committed Jul 6, 2021
1 parent fa512df commit 2cd3627
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 44 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
language: go

go:
- 1.16.4
- 1.16.5

dist: bionic

Expand Down Expand Up @@ -88,12 +88,12 @@ deploy:
skip_cleanup: true
on:
tags: true
condition: ${TRAVIS_TAG} == v1.22.0-alpha.3-*
go: 1.16.4
condition: ${TRAVIS_TAG} == v1.22.0-beta.0-*
go: 1.16.5
- provider: script
script: BUILD_TAG=${TRAVIS_TAG} make dev-deploy
skip_cleanup: true
on:
tags: true
go: 1.16.4
go: 1.16.5
condition: ${TRAVIS_TAG} == dev-*
36 changes: 36 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Contributing

Unfortunately, this repository is not yet enabled for pull request contributions.
However, you are encouraged to [open an issue](https://github.com/IBM-Cloud/cloud-provider-ibm/issues)
to request new features or to get bugs triaged and fixed. Thank you.

# Legal

All files, except documentaion, must include a license header for the
[Apache License, Version 2.0 ](./LICENSE). Using the SPDX format is the
simplest approach. Here is an example:

```
/*******************************************************************************
* IBM Cloud Kubernetes Service, 5737-D43
* (C) Copyright <holder> <YYYY> All Rights Reserved.
*
* SPDX-License-Identifier: Apache2.0
*
* 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.
*******************************************************************************/
```

# Communication

Please feel free to contact us on our [Kubernetes Slack channel](https://kubernetes.slack.com/archives/C90BWDWCE).
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ OSS_FILES := go.mod
GOLANGCI_LINT_EXISTS:=$(shell golangci-lint --version 2>/dev/null)

REGISTRY ?= armada-master
TAG ?= v1.22.0-alpha.3
TAG ?= v1.22.0-beta.0
VPCCTL_SOURCE=$(shell cat addons/vpcctl.yml | awk '/^source:/{print $$2}')
VPCCTL_CHECKSUM=$(shell cat addons/vpcctl.yml | awk '/^checksum:/{print $$2}')

Expand Down Expand Up @@ -73,11 +73,6 @@ setup-artifactory-pip:
# Hide Artifactory APIKey usage for pip via .netrc configuration
@echo "machine na.artifactory.swg-devops.com login ${ARTIFACTORY_USER} password ${ARTIFACTORY_API_KEY}" >> ~/.netrc

.PHONY: updatedeps
updatedeps:
go get -u=patch ./...
go mod tidy

.PHONY: kube-update
kube-update:
./kube-update.sh ${KUBE_VERSION}
Expand Down
24 changes: 8 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ infrastructure node and load balancer support to
[Kubernetes](https://kubernetes.io/docs/home/) or
[OpenShift](https://docs.openshift.com/) clusters running on
[IBM Cloud](https://cloud.ibm.com/docs). This repository branch is based on
[Kubernetes version v1.22.0-alpha.3](https://github.com/kubernetes/kubernetes/tree/v1.22.0-alpha.3).
[Kubernetes version v1.22.0-beta.0](https://github.com/kubernetes/kubernetes/tree/v1.22.0-beta.0).
See [CONTRIBUTING.md](./CONTRIBUTING.md) for contribution guidelines.

## Local Build and Deploy Instructions

Expand Down Expand Up @@ -116,24 +117,15 @@ for a new Kubernetes version.
- This task can also be run manually to skip having to wait for the cron job
to trigger. Running the following steps will create the PR:

If the update is for a new Kubernetes major or minor version, you will need
to do these steps first:

1. `git checkout -b manual-deps`
1. Manually update the `k8s.io` dependencies in `go.mod` to the new version.
- Several `k8s.io/*` dependencies in `go.mod` should all be at the same version.
- That version should match current Kubernetes version, with the exception that
the major version is a 0 instead of a 1 (e.g. v0.21.4 instead of v1.21.4).
- Manually modify those versions in `go.mod` to the latest release of the
new major/minor version, again using a 0 instead of a 1 for the major
version (e.g. v0.22.0-alpha.3)

Then these steps can be run:

1. `cd vagrant-kube-build`
1. `./build.sh make kube-update KUBE_VERSION=vX.Y.Z` (e.g `v1.22.0-alpha.3`)
1. `./build.sh make kube-update KUBE_VERSION=vX.Y.Z` (e.g `v1.22.0-beta.0`)
1. Go to the URL displayed in the build output to create the pull request.

1. go.mod and go.sum dependencies are kept up to date with the
[renovate](https://docs.renovatebot.com/golang/) application.
One or more pull requests with the necessary changes will be created
and must be reviewed and merged.

1. If the current branch is the latest branch, update this repository's branch
settings to make it the default branch.

Expand Down
2 changes: 1 addition & 1 deletion ibm/ibm_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var (
)

// Version is overwritten during builds.
var Version = "v1.22.0-alpha.3"
var Version = "v1.22.0-beta.0"

func PrintVersionAndExitIfRequested() {
if versionFlag {
Expand Down
10 changes: 0 additions & 10 deletions kube-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,6 @@ if [[ "${K8S_GOLANG_CURRENT_VERSION}" != "${K8S_GOLANG_UPDATE_VERSION}" ]]; then
done
fi

make updatedeps
echo "INFO: Updated dependencies in go.mod and go.sum"

git add go.mod go.sum
NON_INDEXED_FILES_NUM=$(git diff --name-only | wc -l)
if [[ ${NON_INDEXED_FILES_NUM} -gt 0 ]]; then
echo "FAIL: Files found not indexed in git."
exit 1
fi

COMMIT_MESSAGE="Update from ${K8S_CURRENT_VERSION} to ${K8S_UPDATE_VERSION}"
git checkout -b "${K8S_UPDATE_VERSION}-initial"
git commit --no-verify -m "${COMMIT_MESSAGE}"
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*******************************************************************************/

// References:
// - https://raw.githubusercontent.com/kubernetes/kubernetes/v1.22.0-alpha.3/staging/src/k8s.io/cloud-provider/app/controllermanager.go
// - https://raw.githubusercontent.com/kubernetes/kubernetes/v1.22.0-alpha.3/staging/src/k8s.io/cloud-provider/sample/basic_main.go
// - https://raw.githubusercontent.com/kubernetes/kubernetes/v1.22.0-beta.0/staging/src/k8s.io/cloud-provider/app/controllermanager.go
// - https://raw.githubusercontent.com/kubernetes/kubernetes/v1.22.0-beta.0/staging/src/k8s.io/cloud-provider/sample/basic_main.go

package main

Expand Down
3 changes: 3 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}
2 changes: 1 addition & 1 deletion scripts/publishTag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if [[ -n "${EXISTING_TAG}" && "${FORCE_TAG}" != "true" ]]; then
fi

# Set default tag.
BASE_TAG="v1.22.0-alpha.3"
BASE_TAG="v1.22.0-beta.0"

# Determine the next build tag.
BASE_TAGS=$(git tag --list "${BASE_TAG}-[0-9]*" --sort=v:refname)
Expand Down
6 changes: 3 additions & 3 deletions vagrant-kube-build/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ function exit_build {
apt-get install -y make
if ! hash go 2>/dev/null; then
# Add apt-repository ppa:ubuntu-lxc/lxd-stable
curl -O https://dl.google.com/go/go1.16.4.linux-amd64.tar.gz
curl -O https://dl.google.com/go/go1.16.5.linux-amd64.tar.gz
if [[ $? -ne 0 ]]; then exit_build ; fi
tar -C /usr/local -xzf go1.16.4.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.16.5.linux-amd64.tar.gz
if [[ $? -ne 0 ]]; then exit_build ; fi
if [ ! -n "$(grep "/usr/local/go/bin" /etc/profile)" ]; then
echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile
Expand All @@ -95,7 +95,7 @@ apt-get install -y mercurial apt-transport-https ca-certificates \
docker.io sshpass shellcheck gcc
if [[ $? -ne 0 ]]; then exit_build ; fi
echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> /etc/ssh/ssh_config
echo -e "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
echo 'Starting docker ...'
usermod -a -G docker vagrant
Expand Down
2 changes: 1 addition & 1 deletion vagrant-kube-build/provisioning/build_docker_registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function exit_build {
exit 1
}

BUILD_VERSION="v1.22.0-alpha.3"
BUILD_VERSION="v1.22.0-beta.0"
BUILD_REGISTRY_NAME="armada-master"
BUILD_REGISTRY_IP_ADDRESS="192.168.10.10"
BUILD_REGISTRY_PORT="5000"
Expand Down

0 comments on commit 2cd3627

Please sign in to comment.