Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1221dc1
Update CRDs (#863)
justinsb Mar 30, 2019
b3a6bb9
fix various shell bugs (#868)
BenTheElder Apr 1, 2019
ef592ee
use gnu sed on all platforms (#867)
BenTheElder Apr 1, 2019
ad95564
Fix error message in getCluster (#871)
vrutkovs Apr 3, 2019
574bf10
minikube: use --profile instead of --p (#875)
neolit123 Apr 4, 2019
21da28c
nit: fix log to replace Creating with Preparing (#872)
jichenjc Apr 4, 2019
75a4d3b
Record machine sync error event (#880)
vikaschoudhary16 Apr 9, 2019
4d88293
make clusterapi wait timeout configurable (#865)
jichenjc Apr 9, 2019
15db8ec
Update klog to 0.3.0 release (#890)
vincepri Apr 11, 2019
433bf5f
Add missing namespace to Get function (#896)
h0tbird Apr 15, 2019
04794d9
Add NodeName to Machine's additionalPrinterColumns (#895)
astrieanna Apr 15, 2019
2f01b51
additionalPrinterColumns for Machine, added correctly. (#897)
astrieanna Apr 15, 2019
fc4c3dd
Normalize clusterctl options to underscores (#899)
astrieanna Apr 16, 2019
443b51d
Update manager-role ClusterRole (#901)
h0tbird Apr 16, 2019
93b5445
Update Go 1.12 (#898)
vincepri Apr 16, 2019
91946e0
Update OWNERS_ALIASES and SECURITY_CONTACTS (#884)
detiber Apr 17, 2019
ba18c58
Clarify log message for machine-controller isDeleteAllowed (#905)
michaelgugino Apr 18, 2019
67f14ad
Clarify MachineDeployment watchers' comments (#887)
vincepri Apr 18, 2019
bd71be5
Simplify util.ParseMachinesYaml (#909)
vincepri Apr 19, 2019
54d8ef8
Add support for passing namespace cmdline flag to the manager (#914)
vikaschoudhary16 Apr 24, 2019
204e2f3
Bump kubectl version to v1.13.2 in ci (#923)
figo May 1, 2019
d716baf
Add /status to MachineSet and MachineDeployment kubebuilder directive…
vincepri May 1, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

# Build the manager binary
FROM golang:1.11.6 as builder
FROM golang:1.12.3 as builder

# Copy in the go src
WORKDIR $GOPATH/src/sigs.k8s.io/cluster-api
Expand Down
15 changes: 12 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ clean: ## Remove all generated files
docker-build: generate fmt vet manifests ## Build the docker image for controller-manager
docker build . -t ${CONTROLLER_IMG}
@echo "updating kustomize image patch file for manager resource"
sed -i.tmp -e 's@image: .*@image: '"${CONTROLLER_IMG}"'@' ./config/default/manager_image_patch.yaml
hack/sed.sh -i.tmp -e 's@image: .*@image: '"${CONTROLLER_IMG}"'@' ./config/default/manager_image_patch.yaml

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

.PHONY: docker-push-ci
docker-push-ci: docker-build-ci ## Build the docker image for ci
Expand Down
11 changes: 4 additions & 7 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
aliases:
sig-cluster-lifecycle-leads:
- luxas
- roberthbailey
- justinsb
- timothysc
cluster-api-admins:
- justinsb
- kris-nova
- krousey
- luxas
- roberthbailey
- detiber
- davidewatson
cluster-api-maintainers:
- justinsb
- krousey
- roberthbailey
- detiber
- vincepri
4 changes: 2 additions & 2 deletions SECURITY_CONTACTS
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE
# INSTRUCTIONS AT https://kubernetes.io/security/

lukemarsden
detiber
justinsb
luxas
roberthbailey
timothysc
10 changes: 5 additions & 5 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

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

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

go_register_toolchains(
go_version = "1.11.6",
go_version = "1.12.3",
)

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

go_repository(
name = "io_k8s_sigs_kustomize",
commit = "58492e2d83c59ed63881311f46ad6251f77dabc3",
importpath = "sigs.k8s.io/kustomize",
tag = "v1.0.11",
)

go_repository(
name = "com_github_golangci_golangci-lint",
build_file_generation = "on",
importpath = "github.com/golangci/golangci-lint",
tag = "v1.15.0",
tag = "v1.16.0",
)
3 changes: 3 additions & 0 deletions cmd/clusterctl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ If you are using minikube, to choose a specific minikube driver, please use the

Additional advanced flags can be found via help.

Also, some environment variables are supported:
`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.

```shell
./clusterctl create cluster --help
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func WithOptionsAndKubeConfigPath(options []string, kubeconfigpath string) *Mini
}
return true
}() {
options = append(options, fmt.Sprintf("p=%s", minikubeClusterName))
options = append(options, fmt.Sprintf("profile=%s", minikubeClusterName))
}

return &Minikube{
Expand Down
16 changes: 15 additions & 1 deletion cmd/clusterctl/clusterdeployer/clusterclient/clusterclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ const (
machineClusterLabelName = "cluster.k8s.io/cluster-name"
)

const (
TimeoutMachineReady = "CLUSTER_API_MACHINE_READY_TIMEOUT"
)

// Provides interaction with a cluster
type Client interface {
Apply(string) error
Expand Down Expand Up @@ -968,7 +972,17 @@ func waitForClusterResourceReady(cs clientset.Interface) error {
}

func waitForMachineReady(cs clientset.Interface, machine *clusterv1.Machine) error {
err := util.PollImmediate(retryIntervalResourceReady, timeoutMachineReady, func() (bool, error) {
timeout := timeoutMachineReady
if p := os.Getenv(TimeoutMachineReady); p != "" {
t, err := strconv.Atoi(p)
if err == nil {
// only valid value will be used
timeout = time.Duration(t) * time.Minute
klog.V(4).Info("Setting wait for machine timeout value to ", timeout)
}
}

err := util.PollImmediate(retryIntervalResourceReady, timeout, func() (bool, error) {
klog.V(2).Infof("Waiting for Machine %v to become ready...", machine.Name)
m, err := cs.ClusterV1alpha1().Machines(machine.Namespace).Get(machine.Name, metav1.GetOptions{})
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions cmd/clusterctl/cmd/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ go_library(
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
"//vendor/k8s.io/client-go/tools/clientcmd:go_default_library",
"//vendor/k8s.io/component-base/cli/flag:go_default_library",
"//vendor/k8s.io/klog:go_default_library",
"//vendor/sigs.k8s.io/controller-runtime/pkg/client:go_default_library",
"//vendor/sigs.k8s.io/controller-runtime/pkg/client/config:go_default_library",
Expand Down
2 changes: 2 additions & 0 deletions cmd/clusterctl/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"os"

"github.com/spf13/cobra"
cliflag "k8s.io/component-base/cli/flag"
"k8s.io/klog"
)

Expand Down Expand Up @@ -54,6 +55,7 @@ func exitWithHelp(cmd *cobra.Command, err string) {
func init() {
klog.InitFlags(flag.CommandLine)
flag.CommandLine.Set("logtostderr", "true")
RootCmd.SetGlobalNormalizationFunc(cliflag.WordSepNormalizeFunc)
RootCmd.PersistentFlags().AddGoFlagSet(flag.CommandLine)
InitLogs()
}
2 changes: 1 addition & 1 deletion cmd/clusterctl/phases/createbootstrapcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

func CreateBootstrapCluster(provisioner bootstrap.ClusterProvisioner, cleanupBootstrapCluster bool, clientFactory clusterclient.Factory) (clusterclient.Client, func(), error) {
klog.Info("Creating bootstrap cluster")
klog.Info("Preparing bootstrap cluster")

cleanupFn := func() {}
if err := provisioner.Create(); err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ Flags:
Global Flags:
--alsologtostderr log to standard error as well as files
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory
--log-file string If non-empty, use this log file
--log-file-max-size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
--log-flush-frequency duration Maximum number of seconds between log flushes (default 5s)
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--log_file string If non-empty, use this log file
--logtostderr log to standard error instead of files (default true)
--master string The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.
--skip_headers If true, avoid header prefixes in the log messages
--skip-headers If true, avoid header prefixes in the log messages
--skip-log-headers If true, avoid headers when openning log files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
-v, --v Level number for the log level verbosity
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging

unknown flag: --invalid-flag
12 changes: 7 additions & 5 deletions cmd/clusterctl/testdata/create-cluster-no-args.golden
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ Flags:
Global Flags:
--alsologtostderr log to standard error as well as files
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory
--log-file string If non-empty, use this log file
--log-file-max-size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
--log-flush-frequency duration Maximum number of seconds between log flushes (default 5s)
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--log_file string If non-empty, use this log file
--logtostderr log to standard error instead of files (default true)
--master string The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.
--skip_headers If true, avoid header prefixes in the log messages
--skip-headers If true, avoid header prefixes in the log messages
--skip-log-headers If true, avoid headers when openning log files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
-v, --v Level number for the log level verbosity
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging

required flag(s) "cluster", "machines", "provider", "provider-components" not set
12 changes: 7 additions & 5 deletions cmd/clusterctl/testdata/create-no-args-invalid-flag.golden
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ Flags:
Global Flags:
--alsologtostderr log to standard error as well as files
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory
--log-file string If non-empty, use this log file
--log-file-max-size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
--log-flush-frequency duration Maximum number of seconds between log flushes (default 5s)
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--log_file string If non-empty, use this log file
--logtostderr log to standard error instead of files (default true)
--master string The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.
--skip_headers If true, avoid header prefixes in the log messages
--skip-headers If true, avoid header prefixes in the log messages
--skip-log-headers If true, avoid headers when openning log files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
-v, --v Level number for the log level verbosity
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging

Use "clusterctl create [command] --help" for more information about a command.
Expand Down
12 changes: 7 additions & 5 deletions cmd/clusterctl/testdata/create-no-args.golden
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ Flags:
Global Flags:
--alsologtostderr log to standard error as well as files
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory
--log-file string If non-empty, use this log file
--log-file-max-size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
--log-flush-frequency duration Maximum number of seconds between log flushes (default 5s)
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--log_file string If non-empty, use this log file
--logtostderr log to standard error instead of files (default true)
--master string The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.
--skip_headers If true, avoid header prefixes in the log messages
--skip-headers If true, avoid header prefixes in the log messages
--skip-log-headers If true, avoid headers when openning log files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
-v, --v Level number for the log level verbosity
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging

Use "clusterctl create [command] --help" for more information about a command.
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ Flags:
Global Flags:
--alsologtostderr log to standard error as well as files
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory
--log-file string If non-empty, use this log file
--log-file-max-size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
--log-flush-frequency duration Maximum number of seconds between log flushes (default 5s)
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--log_file string If non-empty, use this log file
--logtostderr log to standard error instead of files (default true)
--master string The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.
--skip_headers If true, avoid header prefixes in the log messages
--skip-headers If true, avoid header prefixes in the log messages
--skip-log-headers If true, avoid headers when openning log files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
-v, --v Level number for the log level verbosity
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging

unknown flag: --invalid-flag
12 changes: 7 additions & 5 deletions cmd/clusterctl/testdata/delete-cluster-no-args.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ Flags:
Global Flags:
--alsologtostderr log to standard error as well as files
--kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory
--log-file string If non-empty, use this log file
--log-file-max-size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
--log-flush-frequency duration Maximum number of seconds between log flushes (default 5s)
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--log_file string If non-empty, use this log file
--logtostderr log to standard error instead of files (default true)
--master string The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.
--skip_headers If true, avoid header prefixes in the log messages
--skip-headers If true, avoid header prefixes in the log messages
--skip-log-headers If true, avoid headers when openning log files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
-v, --v Level number for the log level verbosity
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
Loading