Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Md. Ishtiaq Islam <[email protected]>
  • Loading branch information
ishtiaqhimel committed Jan 1, 2024
1 parent fb89896 commit 34c6f94
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 67 deletions.
7 changes: 0 additions & 7 deletions pkg/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,7 @@ func NewCmdClone(clientGetter genericclioptions.RESTClientGetter) *cobra.Command
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
flags.EnsureRequiredFlags(cmd, "to-namespace")

<<<<<<< HEAD
cfg, err := clientGetter.ToRESTConfig()
if err != nil {
return fmt.Errorf("failed to read kubeconfig. Reason: %v", err)
}
=======
var err error
>>>>>>> f5312de (Update uncached client + Add session list in trigger backup)

srcNamespace, _, err = clientGetter.ToRawKubeConfigLoader().Namespace()
if err != nil {
Expand Down
7 changes: 0 additions & 7 deletions pkg/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,7 @@ func NewCmdCopy(clientGetter genericclioptions.RESTClientGetter) *cobra.Command
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
flags.EnsureRequiredFlags(cmd, "to-namespace")

<<<<<<< HEAD
cfg, err := clientGetter.ToRESTConfig()
if err != nil {
return fmt.Errorf("failed to read kubeconfig. Reason: %v", err)
}
=======
var err error
>>>>>>> f5312de (Update uncached client + Add session list in trigger backup)

srcNamespace, _, err = clientGetter.ToRawKubeConfigLoader().Namespace()
if err != nil {
Expand Down
7 changes: 0 additions & 7 deletions pkg/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,7 @@ func NewCmdDebug(clientGetter genericclioptions.RESTClientGetter) *cobra.Command
Short: `Debug common KubeStash issues`,
DisableAutoGenTag: true,
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
<<<<<<< HEAD
cfg, err := clientGetter.ToRESTConfig()
if err != nil {
return fmt.Errorf("failed to read kubeconfig. Reason: %v", err)
}
=======
var err error
>>>>>>> f5312de (Update uncached client + Add session list in trigger backup)

srcNamespace, _, err = clientGetter.ToRawKubeConfigLoader().Namespace()
if err != nil {
Expand Down
7 changes: 0 additions & 7 deletions pkg/pause.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,7 @@ func NewCmdPause(clientGetter genericclioptions.RESTClientGetter) *cobra.Command
RunE: func(cmd *cobra.Command, args []string) error {
backupConfigName := args[0]

<<<<<<< HEAD
cfg, err := clientGetter.ToRESTConfig()
if err != nil {
return fmt.Errorf("failed to read kubeconfig. Reason: %v", err)
}
=======
var err error
>>>>>>> f5312de (Update uncached client + Add session list in trigger backup)

srcNamespace, _, err = clientGetter.ToRawKubeConfigLoader().Namespace()
if err != nil {
Expand Down
7 changes: 0 additions & 7 deletions pkg/resume.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,7 @@ func NewCmdResume(clientGetter genericclioptions.RESTClientGetter) *cobra.Comman
RunE: func(cmd *cobra.Command, args []string) error {
backupConfigName := args[0]

<<<<<<< HEAD
cfg, err := clientGetter.ToRESTConfig()
if err != nil {
return fmt.Errorf("failed to read kubeconfig. Reason: %v", err)
}
=======
var err error
>>>>>>> f5312de (Update uncached client + Add session list in trigger backup)

srcNamespace, _, err = clientGetter.ToRawKubeConfigLoader().Namespace()
if err != nil {
Expand Down
7 changes: 0 additions & 7 deletions pkg/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,7 @@ func NewCmdTriggerBackup(clientGetter genericclioptions.RESTClientGetter) *cobra
RunE: func(cmd *cobra.Command, args []string) error {
backupConfigName := args[0]

<<<<<<< HEAD
cfg, err := clientGetter.ToRESTConfig()
if err != nil {
return fmt.Errorf("failed to read kubeconfig. Reason: %v", err)
}
=======
var err error
>>>>>>> f5312de (Update uncached client + Add session list in trigger backup)

klient, err = pkg.NewUncachedClient()
if err != nil {
Expand Down
25 changes: 0 additions & 25 deletions pkg/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,31 +60,6 @@ func init() {
imgRestic.Tag = ResticTag
}

<<<<<<< HEAD
func newRuntimeClient(config *restclient.Config) (client.Client, error) {
scheme := runtime.NewScheme()
utilruntime.Must(coreapi.AddToScheme(scheme))
utilruntime.Must(storageapi.AddToScheme(scheme))
utilruntime.Must(core.AddToScheme(scheme))
utilruntime.Must(vsapi.AddToScheme(scheme))

hc, err := rest.HTTPClientFor(config)
if err != nil {
return nil, err
}
mapper, err := apiutil.NewDynamicRESTMapper(config, hc)
if err != nil {
return nil, err
}

return client.New(config, client.Options{
Scheme: scheme,
Mapper: mapper,
})
}

=======
>>>>>>> f5312de (Update uncached client + Add session list in trigger backup)
func getSecret(ref kmapi.ObjectReference) (*core.Secret, error) {
secret := &core.Secret{
ObjectMeta: metav1.ObjectMeta{
Expand Down

0 comments on commit 34c6f94

Please sign in to comment.