Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Commit

Permalink
add kubeconfig flag (#192)
Browse files Browse the repository at this point in the history
Signed-off-by: yeya24 <yb532204897@gmail.com>
  • Loading branch information
yeya24 authored and k8s-ci-robot committed Jul 31, 2019
1 parent 91ec254 commit e98eb3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/pytorch-operator.v1/app/options/options.go
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ func NewServerOption() *ServerOption {


// AddFlags adds flags for a specific CMServer to the specified FlagSet. // AddFlags adds flags for a specific CMServer to the specified FlagSet.
func (s *ServerOption) AddFlags(fs *flag.FlagSet) { func (s *ServerOption) AddFlags(fs *flag.FlagSet) {
fs.StringVar(&s.Kubeconfig, "kubeconfig", "", "The path of kubeconfig file")

fs.StringVar(&s.MasterURL, "master", "", fs.StringVar(&s.MasterURL, "master", "",
`The url of the Kubernetes API server, `The url of the Kubernetes API server,
will overrides any value in kubeconfig, only required if out-of-cluster.`) will overrides any value in kubeconfig, only required if out-of-cluster.`)
Expand Down
2 changes: 2 additions & 0 deletions cmd/pytorch-operator.v1beta2/app/options/options.go
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ func NewServerOption() *ServerOption {


// AddFlags adds flags for a specific CMServer to the specified FlagSet. // AddFlags adds flags for a specific CMServer to the specified FlagSet.
func (s *ServerOption) AddFlags(fs *flag.FlagSet) { func (s *ServerOption) AddFlags(fs *flag.FlagSet) {
fs.StringVar(&s.Kubeconfig, "kubeconfig", "", "The path of kubeconfig file")

fs.StringVar(&s.MasterURL, "master", "", fs.StringVar(&s.MasterURL, "master", "",
`The url of the Kubernetes API server, `The url of the Kubernetes API server,
will overrides any value in kubeconfig, only required if out-of-cluster.`) will overrides any value in kubeconfig, only required if out-of-cluster.`)
Expand Down

0 comments on commit e98eb3c

Please sign in to comment.