Add back deprecated taint flag
TODO: Revert this commit Related to #316
This commit is contained in:
committed by
Robbie Zhang
parent
75feea1024
commit
71ccade39c
5
root.go
5
root.go
@@ -36,6 +36,7 @@ var nodeName string
|
|||||||
var operatingSystem string
|
var operatingSystem string
|
||||||
var provider string
|
var provider string
|
||||||
var providerConfig string
|
var providerConfig string
|
||||||
|
var taintKey string
|
||||||
var disableTaint bool
|
var disableTaint bool
|
||||||
|
|
||||||
// RootCmd represents the base command when called without any subcommands
|
// RootCmd represents the base command when called without any subcommands
|
||||||
@@ -47,7 +48,7 @@ backend implementation allowing users to create kubernetes nodes without running
|
|||||||
This allows users to schedule kubernetes workloads on nodes that aren't running Kubernetes.`,
|
This allows users to schedule kubernetes workloads on nodes that aren't running Kubernetes.`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
fmt.Println(kubeConfig)
|
fmt.Println(kubeConfig)
|
||||||
f, err := vkubelet.New(nodeName, operatingSystem, kubeNamespace, kubeConfig, provider, providerConfig, disableTaint)
|
f, err := vkubelet.New(nodeName, operatingSystem, kubeNamespace, kubeConfig, provider, providerConfig, taintKey, disableTaint)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
@@ -84,6 +85,8 @@ func init() {
|
|||||||
RootCmd.PersistentFlags().StringVar(&provider, "provider", "", "cloud provider")
|
RootCmd.PersistentFlags().StringVar(&provider, "provider", "", "cloud provider")
|
||||||
RootCmd.PersistentFlags().BoolVar(&disableTaint, "disable-taint", false, "disable the virtual-kubelet node taint")
|
RootCmd.PersistentFlags().BoolVar(&disableTaint, "disable-taint", false, "disable the virtual-kubelet node taint")
|
||||||
RootCmd.PersistentFlags().StringVar(&providerConfig, "provider-config", "", "cloud provider configuration file")
|
RootCmd.PersistentFlags().StringVar(&providerConfig, "provider-config", "", "cloud provider configuration file")
|
||||||
|
RootCmd.PersistentFlags().StringVar(&taintKey, "taint", "", "Set node taint key")
|
||||||
|
RootCmd.PersistentFlags().MarkDeprecated("taint", "Taint key should now be configured using the VK_TAINT_KEY environment variable")
|
||||||
|
|
||||||
// Cobra also supports local flags, which will only run
|
// Cobra also supports local flags, which will only run
|
||||||
// when this action is called directly.
|
// when this action is called directly.
|
||||||
|
|||||||
Reference in New Issue
Block a user