Skip to content
Snippets Groups Projects
Commit 54600828 authored by kaiyou's avatar kaiyou
Browse files

Remove unused code

parent aee9f999
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,6 @@ import ( ...@@ -4,7 +4,6 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/spf13/pflag"
"go.acides.org/pekahi" "go.acides.org/pekahi"
core "k8s.io/api/core/v1" core "k8s.io/api/core/v1"
"k8s.io/client-go/discovery" "k8s.io/client-go/discovery"
...@@ -17,7 +16,6 @@ import ( ...@@ -17,7 +16,6 @@ import (
"k8s.io/client-go/rest" "k8s.io/client-go/rest"
"k8s.io/client-go/restmapper" "k8s.io/client-go/restmapper"
"k8s.io/client-go/tools/events" "k8s.io/client-go/tools/events"
"k8s.io/component-base/cli/flag"
"k8s.io/klog/v2" "k8s.io/klog/v2"
) )
...@@ -119,45 +117,3 @@ func (c *Clients) Start(ctx context.Context) { ...@@ -119,45 +117,3 @@ func (c *Clients) Start(ctx context.Context) {
func (c *Clients) Stop() { func (c *Clients) Stop() {
c.Broadcaster.Shutdown() c.Broadcaster.Shutdown()
} }
func flagsFromNamedFlagSet(name string, nfs *flag.NamedFlagSets) *pflag.FlagSet {
flags := pflag.NewFlagSet(name, pflag.ContinueOnError)
for _, f := range nfs.FlagSets {
flags.AddFlagSet(f)
}
return flags
}
const kubeconfigTemplate = `
apiVersion: v1
clusters:
- cluster:
server: {{.URL}}
certificate-authority: {{.CACert}}
name: local
contexts:
- context:
cluster: local
namespace: default
user: user
name: Default
current-context: Default
kind: Config
preferences: {}
users:
- name: user
user:
client-certificate: {{.ClientCert}}
client-key: {{.ClientKey}}
`
type KubeConfig struct {
URL string
CACert string
ClientCert string
ClientKey string
}
func (KubeConfig) Template() string {
return kubeconfigTemplate
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment