Skip to content

Commit 2186e24

Browse files
detiberk8s-ci-robot
authored andcommitted
Backports for release 0.1 (#924)
* Update CRDs (#863) Generated with `make generate` * fix various shell bugs (#868) * fix errors in scripts/ci-build.gitsh * fix errors in scripts/ci-integration.sh * fix errors in scripts/ci-is-vendor-in-sync.sh * fix errors in scripts/ci-make.sh * fix errors in scripts/ci-test.sh * removed unused variables from scripts/fetch_ext_bins.sh * fix errors in hack/update-bazel.sh * fix errors in hack/verify_clientset.sh * use gnu sed on all platforms (#867) * Fix error message in getCluster (#871) Previously it was showing 'Machine foo in namespace "cluster.k8s.io/cluster-name" doesn't specify "k8s-machine-api" label, assuming nil cluster' * minikube: use --profile instead of --p (#875) It was reported that "minikube start" fails: minikube start --bootstrapper=kubeadm --p=clusterapi Error: unknown flag: --p From "minikube start --help": -p, --profile string Use --profile in minikube.go as --p does not work. The alternative is -p. * nit: fix log to replace Creating with Preparing (#872) saw this log with following flag --bootstrap-cluster-kubeconfig /root/.kube/config I0403 17:32:28.339021 31615 createbootstrapcluster.go:27] Creating bootstrap cluster actually we are reusing ,not creating * Record machine sync error event (#880) * make clusterapi wait timeout configurable (#865) add an environment to make timeout configurable for timeoutMachineReady * Update klog to 0.3.0 release (#890) Signed-off-by: Vince Prignano <[email protected]> * Add missing namespace to Get function (#896) * Add NodeName to Machine's additionalPrinterColumns (#895) Because it is useful to cross-reference between Machines and Nodes. Set priority to >0 so that node names will only be displayed in `-o wide` because the names are often quite long. * additionalPrinterColumns for Machine, added correctly. (#897) Co-authored-by: Danny Berger <[email protected]> * Normalize clusterctl options to underscores (#899) Matches current conventions and implementation of kubectl. This change does not include warning messages when using the previous, underscore option names, but it does recognize those names. Co-authored-by: Leah Hanson <[email protected]> * Update manager-role ClusterRole (#901) * Update Go 1.12 (#898) * Update Go 1.12 Signed-off-by: Vince Prignano <[email protected]> * update Signed-off-by: Vince Prignano <[email protected]> * Update OWNERS_ALIASES and SECURITY_CONTACTS (#884) * Update OWNERS_ALIASES and SECURITY_CONTACTS * Add davidewatson to cluster-api-admins * Clarify log message for machine-controller isDeleteAllowed (#905) Users have noted that this log message is confusing and does not lead to a clear path forward when deleting this machine. This commit makes it clear that the machine will not be deleted. * Clarify MachineDeployment watchers' comments (#887) Signed-off-by: Vince Prignano <[email protected]> * Simplify util.ParseMachinesYaml (#909) Signed-off-by: Vince Prignano <[email protected]> * Add support for passing namespace cmdline flag to the manager (#914) * Bump kubectl version to v1.13.2 in ci (#923) kubectl v1.10.2 does not compatible with cluster v1.14.x anymore Signed-off-by: Hui Luo <[email protected]> * Add /status to MachineSet and MachineDeployment kubebuilder directives (#922) Signed-off-by: Vince Prignano <[email protected]>
1 parent 560b000 commit 2186e24

File tree

69 files changed

+1644
-216
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1644
-216
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# Build the manager binary
16-
FROM golang:1.11.6 as builder
16+
FROM golang:1.12.3 as builder
1717

1818
# Copy in the go src
1919
WORKDIR $GOPATH/src/sigs.k8s.io/cluster-api

Gopkg.lock

Lines changed: 12 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ clean: ## Remove all generated files
111111
docker-build: generate fmt vet manifests ## Build the docker image for controller-manager
112112
docker build . -t ${CONTROLLER_IMG}
113113
@echo "updating kustomize image patch file for manager resource"
114-
sed -i.tmp -e 's@image: .*@image: '"${CONTROLLER_IMG}"'@' ./config/default/manager_image_patch.yaml
114+
hack/sed.sh -i.tmp -e 's@image: .*@image: '"${CONTROLLER_IMG}"'@' ./config/default/manager_image_patch.yaml
115115

116116
.PHONY: docker-push
117117
docker-push: docker-build ## Push the docker image
@@ -121,7 +121,7 @@ docker-push: docker-build ## Push the docker image
121121
docker-build-ci: generate fmt vet manifests ## Build the docker image for example provider
122122
docker build . -f ./pkg/provider/example/container/Dockerfile -t ${EXAMPLE_PROVIDER_IMG}
123123
@echo "updating kustomize image patch file for ci"
124-
sed -i.tmp -e 's@image: .*@image: '"${EXAMPLE_PROVIDER_IMG}"'@' ./config/ci/manager_image_patch.yaml
124+
hack/sed.sh -i.tmp -e 's@image: .*@image: '"${EXAMPLE_PROVIDER_IMG}"'@' ./config/ci/manager_image_patch.yaml
125125

126126
.PHONY: docker-push-ci
127127
docker-push-ci: docker-build-ci ## Build the docker image for ci

OWNERS_ALIASES

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@
33
aliases:
44
sig-cluster-lifecycle-leads:
55
- luxas
6-
- roberthbailey
6+
- justinsb
77
- timothysc
88
cluster-api-admins:
99
- justinsb
10-
- kris-nova
11-
- krousey
12-
- luxas
13-
- roberthbailey
10+
- detiber
11+
- davidewatson
1412
cluster-api-maintainers:
1513
- justinsb
16-
- krousey
17-
- roberthbailey
14+
- detiber
1815
- vincepri

SECURITY_CONTACTS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE
1111
# INSTRUCTIONS AT https://kubernetes.io/security/
1212

13-
lukemarsden
13+
detiber
14+
justinsb
1415
luxas
15-
roberthbailey
1616
timothysc

WORKSPACE

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
33

44
http_archive(
55
name = "io_bazel_rules_go",
6-
sha256 = "77dfd303492f2634de7a660445ee2d3de2960cbd52f97d8c0dffa9362d3ddef9",
7-
url = "https://github.com/bazelbuild/rules_go/releases/download/0.18.1/rules_go-0.18.1.tar.gz",
6+
sha256 = "86ae934bd4c43b99893fc64be9d9fc684b81461581df7ea8fc291c816f5ee8c5",
7+
url = "https://github.com/bazelbuild/rules_go/releases/download/0.18.3/rules_go-0.18.3.tar.gz",
88
)
99

1010
http_archive(
@@ -18,7 +18,7 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe
1818
go_rules_dependencies()
1919

2020
go_register_toolchains(
21-
go_version = "1.11.6",
21+
go_version = "1.12.3",
2222
)
2323

2424
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
@@ -27,13 +27,13 @@ gazelle_dependencies()
2727

2828
go_repository(
2929
name = "io_k8s_sigs_kustomize",
30-
commit = "58492e2d83c59ed63881311f46ad6251f77dabc3",
3130
importpath = "sigs.k8s.io/kustomize",
31+
tag = "v1.0.11",
3232
)
3333

3434
go_repository(
3535
name = "com_github_golangci_golangci-lint",
3636
build_file_generation = "on",
3737
importpath = "github.com/golangci/golangci-lint",
38-
tag = "v1.15.0",
38+
tag = "v1.16.0",
3939
)

cmd/clusterctl/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ If you are using minikube, to choose a specific minikube driver, please use the
5050

5151
Additional advanced flags can be found via help.
5252

53+
Also, some environment variables are supported:
54+
`CLUSTER_API_MACHINE_READY_TIMEOUT`: set this value to adjust the timeout value in minutes for a machine to become ready, The default timeout is currently 30 minutes, `export CLUSTER_API_MACHINE_READY_TIMEOUT=45` will extend the timeout value to 45 minutes.
55+
5356
```shell
5457
./clusterctl create cluster --help
5558
```

cmd/clusterctl/clusterdeployer/bootstrap/minikube/minikube.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func WithOptionsAndKubeConfigPath(options []string, kubeconfigpath string) *Mini
6161
}
6262
return true
6363
}() {
64-
options = append(options, fmt.Sprintf("p=%s", minikubeClusterName))
64+
options = append(options, fmt.Sprintf("profile=%s", minikubeClusterName))
6565
}
6666

6767
return &Minikube{

cmd/clusterctl/clusterdeployer/clusterclient/clusterclient.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ const (
5555
machineClusterLabelName = "cluster.k8s.io/cluster-name"
5656
)
5757

58+
const (
59+
TimeoutMachineReady = "CLUSTER_API_MACHINE_READY_TIMEOUT"
60+
)
61+
5862
// Provides interaction with a cluster
5963
type Client interface {
6064
Apply(string) error
@@ -968,7 +972,17 @@ func waitForClusterResourceReady(cs clientset.Interface) error {
968972
}
969973

970974
func waitForMachineReady(cs clientset.Interface, machine *clusterv1.Machine) error {
971-
err := util.PollImmediate(retryIntervalResourceReady, timeoutMachineReady, func() (bool, error) {
975+
timeout := timeoutMachineReady
976+
if p := os.Getenv(TimeoutMachineReady); p != "" {
977+
t, err := strconv.Atoi(p)
978+
if err == nil {
979+
// only valid value will be used
980+
timeout = time.Duration(t) * time.Minute
981+
klog.V(4).Info("Setting wait for machine timeout value to ", timeout)
982+
}
983+
}
984+
985+
err := util.PollImmediate(retryIntervalResourceReady, timeout, func() (bool, error) {
972986
klog.V(2).Infof("Waiting for Machine %v to become ready...", machine.Name)
973987
m, err := cs.ClusterV1alpha1().Machines(machine.Namespace).Get(machine.Name, metav1.GetOptions{})
974988
if err != nil {

cmd/clusterctl/cmd/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ go_library(
4343
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
4444
"//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
4545
"//vendor/k8s.io/client-go/tools/clientcmd:go_default_library",
46+
"//vendor/k8s.io/component-base/cli/flag:go_default_library",
4647
"//vendor/k8s.io/klog:go_default_library",
4748
"//vendor/sigs.k8s.io/controller-runtime/pkg/client:go_default_library",
4849
"//vendor/sigs.k8s.io/controller-runtime/pkg/client/config:go_default_library",

0 commit comments

Comments
 (0)