Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/remotecommand"
"k8s.io/kubectl/pkg/cmd/exec"
Expand Down Expand Up @@ -89,7 +89,7 @@ func ExecuteCommandRaw(
ContainerName: container,
Stdin: stdin != nil,
TTY: isTty,
IOStreams: genericclioptions.IOStreams{
IOStreams: genericiooptions.IOStreams{
In: stdin,
Out: stdout,
ErrOut: stderr,
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ import (
"github.com/fatih/color"
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"k8s.io/client-go/rest"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"
)

func newAnalyzeCmd(streams genericclioptions.IOStreams) *cobra.Command {
func newAnalyzeCmd(streams genericiooptions.IOStreams) *cobra.Command {
o := newFDBOptions(streams)

cmd := &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/buggify.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
package cmd

import (
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"

"github.com/spf13/cobra"
)

func newBuggifyCmd(streams genericclioptions.IOStreams) *cobra.Command {
func newBuggifyCmd(streams genericiooptions.IOStreams) *cobra.Command {
o := newFDBOptions(streams)

cmd := &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/buggify_crash_loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import (
fdbv1beta2 "github.com/FoundationDB/fdb-kubernetes-operator/v2/api/v1beta2"
"github.com/spf13/cobra"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

func newBuggifyCrashLoop(streams genericclioptions.IOStreams) *cobra.Command {
func newBuggifyCrashLoop(streams genericiooptions.IOStreams) *cobra.Command {
o := newFDBOptions(streams)

cmd := &cobra.Command{
Expand Down
14 changes: 7 additions & 7 deletions kubectl-fdb/cmd/buggify_crash_loop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"context"
"fmt"

"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"

fdbv1beta2 "github.com/FoundationDB/fdb-kubernetes-operator/v2/api/v1beta2"
. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -57,7 +57,7 @@ var _ = Describe("[plugin] buggify crash-loop process groups command", func() {
DescribeTable("should add all targeted process groups to crash-loop container list",
func(tc processGroupOptionsTestCase) {
Expect(cluster.Spec.Buggify.CrashLoopContainers).To(HaveLen(0))
cmd := newBuggifyCrashLoop(genericclioptions.IOStreams{})
cmd := newBuggifyCrashLoop(genericiooptions.IOStreams{})
opts := buggifyProcessGroupOptions{
containerName: fdbv1beta2.MainContainerName,
wait: false,
Expand Down Expand Up @@ -229,7 +229,7 @@ var _ = Describe("[plugin] buggify crash-loop process groups command", func() {
DescribeTable("should add all targeted process groups to crash-loop container list",
func(tc testCase) {
Expect(cluster.Spec.Buggify.CrashLoopContainers).To(HaveLen(1))
cmd := newBuggifyCrashLoop(genericclioptions.IOStreams{})
cmd := newBuggifyCrashLoop(genericiooptions.IOStreams{})
opts := buggifyProcessGroupOptions{
containerName: fdbv1beta2.MainContainerName,
wait: false,
Expand Down Expand Up @@ -310,7 +310,7 @@ var _ = Describe("[plugin] buggify crash-loop process groups command", func() {
DescribeTable("should add all targeted processes to crash-loop container list",
func(tc testCase) {
Expect(cluster.Spec.Buggify.CrashLoopContainers).To(HaveLen(1))
cmd := newBuggifyCrashLoop(genericclioptions.IOStreams{})
cmd := newBuggifyCrashLoop(genericiooptions.IOStreams{})
opts := buggifyProcessGroupOptions{
containerName: fdbv1beta2.MainContainerName,
wait: false,
Expand Down Expand Up @@ -391,7 +391,7 @@ var _ = Describe("[plugin] buggify crash-loop process groups command", func() {
"should remove all targeted process groups from crash-loop container list",
func(tc testCase) {
Expect(cluster.Spec.Buggify.CrashLoopContainers).To(HaveLen(1))
cmd := newBuggifyCrashLoop(genericclioptions.IOStreams{})
cmd := newBuggifyCrashLoop(genericiooptions.IOStreams{})
opts := buggifyProcessGroupOptions{
containerName: fdbv1beta2.MainContainerName,
wait: false,
Expand Down Expand Up @@ -470,7 +470,7 @@ var _ = Describe("[plugin] buggify crash-loop process groups command", func() {

It("should clear everything from the crash-loop container-list", func() {
Expect(cluster.Spec.Buggify.CrashLoopContainers).To(HaveLen(1))
cmd := newBuggifyCrashLoop(genericclioptions.IOStreams{})
cmd := newBuggifyCrashLoop(genericiooptions.IOStreams{})
opts := buggifyProcessGroupOptions{
containerName: fdbv1beta2.MainContainerName,
wait: false,
Expand Down Expand Up @@ -500,7 +500,7 @@ var _ = Describe("[plugin] buggify crash-loop process groups command", func() {
})
It("should error if no cluster name is provided", func() {
Expect(cluster.Spec.Buggify.CrashLoopContainers).To(HaveLen(1))
cmd := newBuggifyCrashLoop(genericclioptions.IOStreams{})
cmd := newBuggifyCrashLoop(genericiooptions.IOStreams{})
opts := buggifyProcessGroupOptions{
containerName: fdbv1beta2.MainContainerName,
wait: false,
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/buggify_empty_monitor_conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import (

"github.com/spf13/cobra"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

func newBuggifyEmptyMonitorConf(streams genericclioptions.IOStreams) *cobra.Command {
func newBuggifyEmptyMonitorConf(streams genericiooptions.IOStreams) *cobra.Command {
o := newFDBOptions(streams)

cmd := &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/buggify_no_schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ import (

"github.com/spf13/cobra"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

func newBuggifyNoSchedule(streams genericclioptions.IOStreams) *cobra.Command {
func newBuggifyNoSchedule(streams genericiooptions.IOStreams) *cobra.Command {
o := newFDBOptions(streams)

cmd := &cobra.Command{
Expand Down
12 changes: 6 additions & 6 deletions kubectl-fdb/cmd/buggify_no_schedule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
fdbv1beta2 "github.com/FoundationDB/fdb-kubernetes-operator/v2/api/v1beta2"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

Expand All @@ -49,7 +49,7 @@ var _ = Describe("[plugin] buggify no-schedule instances command", func() {

DescribeTable("should add all targeted processes to no-schedule list",
func(tc processGroupOptionsTestCase) {
cmd := newBuggifyNoSchedule(genericclioptions.IOStreams{})
cmd := newBuggifyNoSchedule(genericiooptions.IOStreams{})
tc.ProcessGroupOpts.namespace = namespace
err := updateNoScheduleList(
cmd,
Expand Down Expand Up @@ -201,7 +201,7 @@ var _ = Describe("[plugin] buggify no-schedule instances command", func() {

DescribeTable("should add all targeted processes to no-schedule list",
func(tc testCase) {
cmd := newBuggifyNoSchedule(genericclioptions.IOStreams{})
cmd := newBuggifyNoSchedule(genericiooptions.IOStreams{})
processGroupOpts := processGroupSelectionOptions{
ids: tc.Instances,
clusterName: clusterName,
Expand Down Expand Up @@ -272,7 +272,7 @@ var _ = Describe("[plugin] buggify no-schedule instances command", func() {

DescribeTable("should remove all targeted processes from the no-schedule list",
func(tc testCase) {
cmd := newBuggifyNoSchedule(genericclioptions.IOStreams{})
cmd := newBuggifyNoSchedule(genericiooptions.IOStreams{})
processGroupOpts := processGroupSelectionOptions{
ids: tc.Instances,
clusterName: clusterName,
Expand Down Expand Up @@ -328,7 +328,7 @@ var _ = Describe("[plugin] buggify no-schedule instances command", func() {
})

It("should clear the no-schedule list", func() {
cmd := newBuggifyNoSchedule(genericclioptions.IOStreams{})
cmd := newBuggifyNoSchedule(genericiooptions.IOStreams{})
processGroupOpts := processGroupSelectionOptions{
clusterName: clusterName,
namespace: namespace,
Expand All @@ -350,7 +350,7 @@ var _ = Describe("[plugin] buggify no-schedule instances command", func() {
Expect(len(resCluster.Spec.Buggify.NoSchedule)).To(Equal(0))
})
It("should error if no cluster name is provided", func() {
cmd := newBuggifyNoSchedule(genericclioptions.IOStreams{})
cmd := newBuggifyNoSchedule(genericiooptions.IOStreams{})
opts := buggifyProcessGroupOptions{
containerName: fdbv1beta2.MainContainerName,
wait: false,
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ import (
"fmt"

"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

func newConfigurationCmd(streams genericclioptions.IOStreams) *cobra.Command {
func newConfigurationCmd(streams genericiooptions.IOStreams) *cobra.Command {
o := newFDBOptions(streams)

cmd := &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/cordon.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ import (
"fmt"

fdbv1beta2 "github.com/FoundationDB/fdb-kubernetes-operator/v2/api/v1beta2"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"

"github.com/spf13/cobra"
"sigs.k8s.io/controller-runtime/pkg/client"
)

func newCordonCmd(streams genericclioptions.IOStreams) *cobra.Command {
func newCordonCmd(streams genericiooptions.IOStreams) *cobra.Command {
o := newFDBOptions(streams)
var nodeSelectors map[string]string

Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/cordon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

Expand Down Expand Up @@ -57,7 +57,7 @@ var _ = Describe("[plugin] cordon command", func() {

DescribeTable("should cordon all targeted processes",
func(input testCase) {
cmd := newCordonCmd(genericclioptions.IOStreams{})
cmd := newCordonCmd(genericiooptions.IOStreams{})
err := cordonNode(
cmd,
k8sClient,
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/deprecation.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ import (
fdbv1beta2 "github.com/FoundationDB/fdb-kubernetes-operator/v2/api/v1beta2"
"github.com/FoundationDB/fdb-kubernetes-operator/v2/internal"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/yaml"
)

func newDeprecationCmd(streams genericclioptions.IOStreams) *cobra.Command {
func newDeprecationCmd(streams genericiooptions.IOStreams) *cobra.Command {
o := newFDBOptions(streams)

cmd := &cobra.Command{
Expand Down
6 changes: 3 additions & 3 deletions kubectl-fdb/cmd/deprecation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"

fdbv1beta2 "github.com/FoundationDB/fdb-kubernetes-operator/v2/api/v1beta2"
. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -62,7 +62,7 @@ var _ = Describe("[plugin] deprecation command", func() {
Expect(k8sClient.Create(context.TODO(), &tc.cluster)).NotTo(HaveOccurred())

cmd := newDeprecationCmd(
genericclioptions.IOStreams{In: &inBuffer, Out: &outBuffer, ErrOut: &errBuffer},
genericiooptions.IOStreams{In: &inBuffer, Out: &outBuffer, ErrOut: &errBuffer},
)
err := checkDeprecation(
cmd,
Expand Down Expand Up @@ -220,7 +220,7 @@ var _ = Describe("[plugin] deprecation command", func() {
inBuffer := bytes.Buffer{}

cmd = NewRootCmd(
genericclioptions.IOStreams{In: &inBuffer, Out: &outBuffer, ErrOut: &errBuffer},
genericiooptions.IOStreams{In: &inBuffer, Out: &outBuffer, ErrOut: &errBuffer},
&MockVersionChecker{},
)
})
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/exclusion_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ import (

fdbv1beta2 "github.com/FoundationDB/fdb-kubernetes-operator/v2/api/v1beta2"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"k8s.io/client-go/rest"
)

func newExclusionStatusCmd(streams genericclioptions.IOStreams) *cobra.Command {
func newExclusionStatusCmd(streams genericiooptions.IOStreams) *cobra.Command {
o := newFDBOptions(streams)

cmd := &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ import (
fdbv1beta2 "github.com/FoundationDB/fdb-kubernetes-operator/v2/api/v1beta2"
kubeHelper "github.com/FoundationDB/fdb-kubernetes-operator/v2/internal/kubernetes"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/client"
)

func newExecCmd(streams genericclioptions.IOStreams) *cobra.Command {
func newExecCmd(streams genericiooptions.IOStreams) *cobra.Command {
o := newFDBOptions(streams)

cmd := &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"bytes"
"context"

"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"

fdbv1beta2 "github.com/FoundationDB/fdb-kubernetes-operator/v2/api/v1beta2"
. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -64,7 +64,7 @@ var _ = Describe("[plugin] exec command", func() {
inBuffer := bytes.Buffer{}

rootCmd := NewRootCmd(
genericclioptions.IOStreams{In: &inBuffer, Out: &outBuffer, ErrOut: &errBuffer},
genericiooptions.IOStreams{In: &inBuffer, Out: &outBuffer, ErrOut: &errBuffer},
&MockVersionChecker{},
)
Expect(
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/fix_coordinator_ips.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ import (
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/client"
)

func newFixCoordinatorIPsCmd(streams genericclioptions.IOStreams) *cobra.Command {
func newFixCoordinatorIPsCmd(streams genericiooptions.IOStreams) *cobra.Command {
o := newFDBOptions(streams)

cmd := &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/fix_coordinator_ips_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package cmd
import (
"bytes"

"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"

fdbv1beta2 "github.com/FoundationDB/fdb-kubernetes-operator/v2/api/v1beta2"
. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -84,7 +84,7 @@ var _ = Describe("[plugin] fix-coordinator-ips command", func() {
inBuffer := bytes.Buffer{}

rootCmd := NewRootCmd(
genericclioptions.IOStreams{In: &inBuffer, Out: &outBuffer, ErrOut: &errBuffer},
genericiooptions.IOStreams{In: &inBuffer, Out: &outBuffer, ErrOut: &errBuffer},
&MockVersionChecker{},
)
err := updateIPsInConnectionString(rootCmd, cluster, k8sClient)
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
package cmd

import (
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"

"github.com/spf13/cobra"
)

func newGetCmd(streams genericclioptions.IOStreams) *cobra.Command {
func newGetCmd(streams genericiooptions.IOStreams) *cobra.Command {
o := newFDBOptions(streams)

cmd := &cobra.Command{
Expand Down
Loading