Skip to content

Bump k8s to 1.14.1 #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
178 changes: 65 additions & 113 deletions Gopkg.lock

Large diffs are not rendered by default.

22 changes: 21 additions & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,31 @@ required = [
go-tests = true
unused-packages = true

[[override]]
name = "k8s.io/code-generator"
version = "kubernetes-1.14.1"

[[override]]
name = "k8s.io/api"
version = "kubernetes-1.14.1"

[[override]]
name = "k8s.io/apiextensions-apiserver"
version = "kubernetes-1.14.1"

[[override]]
name = "k8s.io/apimachinery"
version = "kubernetes-1.14.1"

[[override]]
name = "k8s.io/client-go"
version = "kubernetes-1.14.1"

# STANZAS BELOW ARE GENERATED AND MAY BE WRITTEN - DO NOT MODIFY BELOW THIS LINE.

[[constraint]]
name="sigs.k8s.io/controller-runtime"
version="v0.1.10"
revision="96b67f231945a8e8550dbdd8bfbd550a0c68097b"

[[constraint]]
name="sigs.k8s.io/controller-tools"
Expand Down
8 changes: 4 additions & 4 deletions cmd/clusterctl/clusterdeployer/clusterdeployer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1066,31 +1066,31 @@ func TestDeleteCleanupExternalCluster(t *testing.T) {
expectedErrorMessage string
}{
{
name: "success with cleanup",
name: "success with cleanup",
cleanupExternalCluster: true,
provisionExternalErr: nil,
bootstrapClient: &testClusterClient{},
targetClient: &testClusterClient{},
expectedErrorMessage: "",
},
{
name: "success without cleanup",
name: "success without cleanup",
cleanupExternalCluster: false,
provisionExternalErr: nil,
bootstrapClient: &testClusterClient{},
targetClient: &testClusterClient{},
expectedErrorMessage: "",
},
{
name: "error with cleanup",
name: "error with cleanup",
cleanupExternalCluster: true,
provisionExternalErr: nil,
bootstrapClient: &testClusterClient{},
targetClient: &testClusterClient{GetMachineSetsErr: errors.New("get machine sets error")},
expectedErrorMessage: "get machine sets error",
},
{
name: "error without cleanup",
name: "error without cleanup",
cleanupExternalCluster: true,
provisionExternalErr: nil,
bootstrapClient: &testClusterClient{},
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/clusterdeployer/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ limitations under the License.
package provider

import (
"k8s.io/client-go/kubernetes"
clusterv1 "github.com/openshift/cluster-api/pkg/apis/cluster/v1alpha1"
"k8s.io/client-go/kubernetes"
)

// Deployer is a deprecated interface for Provider specific logic. Please do not extend or add. This interface should be removed
Expand Down
4 changes: 2 additions & 2 deletions cmd/clusterctl/cmd/alpha_phase_apply_boostrap_components.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ package cmd
import (
"io/ioutil"

"github.com/openshift/cluster-api/cmd/clusterctl/clusterdeployer/clusterclient"
"github.com/openshift/cluster-api/cmd/clusterctl/phases"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"k8s.io/klog"
"github.com/openshift/cluster-api/cmd/clusterctl/clusterdeployer/clusterclient"
"github.com/openshift/cluster-api/cmd/clusterctl/phases"
)

type AlphaPhaseApplyBootstrapComponentsOptions struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/clusterctl/cmd/alpha_phase_get_kubeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"fmt"
"io/ioutil"

"github.com/spf13/cobra"
"k8s.io/klog"
"github.com/openshift/cluster-api/cmd/clusterctl/clusterdeployer/clusterclient"
"github.com/openshift/cluster-api/cmd/clusterctl/phases"
"github.com/spf13/cobra"
"k8s.io/klog"
)

type AlphaPhaseGetKubeconfigOptions struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/clusterctl/cmd/alpha_phase_pivot.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"fmt"
"io/ioutil"

"github.com/spf13/cobra"
"k8s.io/klog"
"github.com/openshift/cluster-api/cmd/clusterctl/clusterdeployer/clusterclient"
"github.com/openshift/cluster-api/cmd/clusterctl/phases"
"github.com/spf13/cobra"
"k8s.io/klog"
)

type AlphaPhasePivotOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/phases/applybootstrapcomponents.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ limitations under the License.
package phases

import (
"github.com/openshift/cluster-api/cmd/clusterctl/clusterdeployer/clusterclient"
"github.com/pkg/errors"
"k8s.io/klog"
"github.com/openshift/cluster-api/cmd/clusterctl/clusterdeployer/clusterclient"
)

func ApplyBootstrapComponents(client clusterclient.Client, components string) error {
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/phases/pivot.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"io"
"strings"

clusterv1 "github.com/openshift/cluster-api/pkg/apis/cluster/v1alpha1"
"github.com/pkg/errors"
appsv1 "k8s.io/api/apps/v1"
"k8s.io/apimachinery/pkg/util/yaml"
"k8s.io/klog"
clusterv1 "github.com/openshift/cluster-api/pkg/apis/cluster/v1alpha1"
)

type sourceClient interface {
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/phases/pivot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"strings"
"testing"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clusterv1 "github.com/openshift/cluster-api/pkg/apis/cluster/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// sourcer map keys are namespaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Global Flags:
--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.
--master --kubeconfig (Deprecated: switch to --kubeconfig) 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
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/testdata/create-cluster-no-args.golden
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Global Flags:
--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.
--master --kubeconfig (Deprecated: switch to --kubeconfig) 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
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/testdata/create-no-args-invalid-flag.golden
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Global Flags:
--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.
--master --kubeconfig (Deprecated: switch to --kubeconfig) 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
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/testdata/create-no-args.golden
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Global Flags:
--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.
--master --kubeconfig (Deprecated: switch to --kubeconfig) 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
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Global Flags:
--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.
--master --kubeconfig (Deprecated: switch to --kubeconfig) 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
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/testdata/delete-cluster-no-args.golden
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Global Flags:
--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.
--master --kubeconfig (Deprecated: switch to --kubeconfig) 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
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/testdata/delete-no-args-invalid-flag.golden
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Global Flags:
--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.
--master --kubeconfig (Deprecated: switch to --kubeconfig) 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
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/testdata/delete-no-args.golden
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Global Flags:
--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.
--master --kubeconfig (Deprecated: switch to --kubeconfig) 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
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/testdata/no-args-invalid-flag.golden
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Flags:
--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.
--master --kubeconfig (Deprecated: switch to --kubeconfig) 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
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/testdata/no-args.golden
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Flags:
--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.
--master --kubeconfig (Deprecated: switch to --kubeconfig) 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
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Global Flags:
--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.
--master --kubeconfig (Deprecated: switch to --kubeconfig) 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
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Global Flags:
--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.
--master --kubeconfig (Deprecated: switch to --kubeconfig) 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
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/testdata/validate-no-args.golden
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Global Flags:
--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.
--master --kubeconfig (Deprecated: switch to --kubeconfig) 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
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
Expand Down
4 changes: 2 additions & 2 deletions cmd/clusterctl/validation/validate_cluster_api_objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func ValidateClusterAPIObjects(ctx context.Context, w io.Writer, c client.Client
}

machines := &clusterv1alpha1.MachineList{}
if err := c.List(ctx, client.InNamespace(namespace), machines); err != nil {
if err := c.List(ctx, machines, client.InNamespace(namespace)); err != nil {
return errors.Wrapf(err, "failed to get the machines from the apiserver in namespace %q", namespace)
}

Expand All @@ -58,7 +58,7 @@ func getClusterObject(ctx context.Context, c client.Reader, clusterName string,
}

clusters := &clusterv1alpha1.ClusterList{}
if err := c.List(ctx, &client.ListOptions{Namespace: namespace}, clusters); err != nil {
if err := c.List(ctx, clusters, client.InNamespace(namespace)); err != nil {
return nil, errors.Wrapf(err, "failed to get the clusters from the apiserver in namespace %q", namespace)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
"path"
"testing"

v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"github.com/openshift/cluster-api/pkg/apis/cluster/common"
"github.com/openshift/cluster-api/pkg/apis/cluster/v1alpha1"
"github.com/openshift/cluster-api/pkg/apis/cluster/v1alpha1/testutil"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/manager"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/clusterctl/validation/validate_pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func ValidatePods(ctx context.Context, w io.Writer, c client.Client, namespace s

func getPods(ctx context.Context, c client.Client, namespace string) (*corev1.PodList, error) {
pods := &corev1.PodList{}
if err := c.List(ctx, client.InNamespace(namespace), pods); err != nil {
if err := c.List(ctx, pods, client.InNamespace(namespace)); err != nil {
return nil, fmt.Errorf("failed to get pods in namespace %q: %v", namespace, err)
}
return pods, nil
Expand Down Expand Up @@ -108,7 +108,7 @@ func validatePods(w io.Writer, pods *corev1.PodList, namespace string) error {

func getComponents(ctx context.Context, c client.Client) (*corev1.ComponentStatusList, error) {
components := &corev1.ComponentStatusList{}
if err := c.List(ctx, &client.ListOptions{}, components); err != nil {
if err := c.List(ctx, components); err != nil {
return nil, err
}
return components, nil
Expand Down
4 changes: 2 additions & 2 deletions cmd/example-provider/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ package main
import (
"flag"

"k8s.io/klog"
clusterapis "github.com/openshift/cluster-api/pkg/apis"
"github.com/openshift/cluster-api/pkg/apis/cluster/common"
"github.com/openshift/cluster-api/pkg/client/clientset_generated/clientset"
capicluster "github.com/openshift/cluster-api/pkg/controller/cluster"
capimachine "github.com/openshift/cluster-api/pkg/controller/machine"
"github.com/openshift/cluster-api/pkg/provider/example/actuators/cluster"
"github.com/openshift/cluster-api/pkg/provider/example/actuators/machine"
"k8s.io/klog"
"sigs.k8s.io/controller-runtime/pkg/client/config"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/runtime/signals"
Expand All @@ -50,7 +50,7 @@ func main() {
klog.Fatalf("Failed to create client from configuration: %v", err)
}

recorder := mgr.GetRecorder("clusterapi-controller")
recorder := mgr.GetEventRecorderFor("clusterapi-controller")

// Initialize cluster actuator.
clusterActuator, _ := cluster.NewClusterActuator(cs.ClusterV1alpha1(), recorder)
Expand Down
Loading