Skip to content

Commit

Permalink
Rename yurtctl init/join/reset to yurtadm init/join/reset
Browse files Browse the repository at this point in the history
Signed-off-by: lonelyCZ <531187475@qq.com>
  • Loading branch information
lonelyCZ committed May 16, 2022
1 parent 536db52 commit 9f5883e
Show file tree
Hide file tree
Showing 100 changed files with 543 additions and 456 deletions.
30 changes: 30 additions & 0 deletions cmd/yurtadm/yurtadm.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
Copyright 2022 The OpenYurt Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package main

import (
"os"

"github.com/openyurtio/openyurt/pkg/yurtadm/cmd"
)

func main() {
cmd := cmd.NewYurtadmCommand()
if err := cmd.Execute(); err != nil {
os.Exit(1)
}
}
1 change: 1 addition & 0 deletions hack/lib/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
set -x

readonly YURT_ALL_TARGETS=(
yurtadm
yurtctl
yurt-node-servant
yurthub
Expand Down
2 changes: 1 addition & 1 deletion pkg/node-servant/components/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

"k8s.io/klog/v2"

enutil "github.com/openyurtio/openyurt/pkg/yurtctl/util/edgenode"
enutil "github.com/openyurtio/openyurt/pkg/yurtadm/util/edgenode"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/node-servant/components/yurthub.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/klog/v2"

enutil "github.com/openyurtio/openyurt/pkg/yurtctl/util/edgenode"
"github.com/openyurtio/openyurt/pkg/yurtctl/util/templates"
enutil "github.com/openyurtio/openyurt/pkg/yurtadm/util/edgenode"
"github.com/openyurtio/openyurt/pkg/yurtadm/util/templates"
"github.com/openyurtio/openyurt/pkg/yurthub/certificate/hubself"
"github.com/openyurtio/openyurt/pkg/yurthub/storage/disk"
"github.com/openyurtio/openyurt/pkg/yurthub/util"
Expand Down
2 changes: 1 addition & 1 deletion pkg/node-servant/convert/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/spf13/pflag"

"github.com/openyurtio/openyurt/pkg/node-servant/components"
enutil "github.com/openyurtio/openyurt/pkg/yurtctl/util/edgenode"
enutil "github.com/openyurtio/openyurt/pkg/yurtadm/util/edgenode"
hubutil "github.com/openyurtio/openyurt/pkg/yurthub/util"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/node-servant/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/client-go/kubernetes/scheme"

tmplutil "github.com/openyurtio/openyurt/pkg/yurtctl/util/templates"
tmplutil "github.com/openyurtio/openyurt/pkg/yurtadm/util/templates"
)

// RenderNodeServantJob return k8s job
Expand Down
2 changes: 1 addition & 1 deletion pkg/node-servant/revert/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/spf13/pflag"

enutil "github.com/openyurtio/openyurt/pkg/yurtctl/util/edgenode"
enutil "github.com/openyurtio/openyurt/pkg/yurtadm/util/edgenode"
)

// Options has the information that required by revert operation
Expand Down
2 changes: 1 addition & 1 deletion pkg/preflight/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
nodeservant "github.com/openyurtio/openyurt/pkg/node-servant"
"github.com/openyurtio/openyurt/pkg/node-servant/components"
"github.com/openyurtio/openyurt/pkg/projectinfo"
kubeutil "github.com/openyurtio/openyurt/pkg/yurtctl/util/kubernetes"
kubeutil "github.com/openyurtio/openyurt/pkg/yurtadm/util/kubernetes"
)

// Error defines struct for communicating error messages generated by preflight-convert-convert checks
Expand Down
59 changes: 59 additions & 0 deletions pkg/yurtadm/cmd/cmd.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
Copyright 2022 The OpenYurt Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd

import (
goflag "flag"
"fmt"
"os"

"github.com/spf13/cobra"
flag "github.com/spf13/pflag"
"k8s.io/klog/v2"

"github.com/openyurtio/openyurt/pkg/projectinfo"
"github.com/openyurtio/openyurt/pkg/yurtadm/cmd/join"
"github.com/openyurtio/openyurt/pkg/yurtadm/cmd/reset"
"github.com/openyurtio/openyurt/pkg/yurtadm/cmd/yurtinit"
)

// NewYurtadmCommand creates a new yurtadm command
func NewYurtadmCommand() *cobra.Command {
version := fmt.Sprintf("%#v", projectinfo.Get())
cmds := &cobra.Command{
Use: "yurtadm",
Short: "yurtadm administers the yurt cluster",
Version: version,
}

setVersion(cmds)
// add kubeconfig to persistent flags
cmds.PersistentFlags().String("kubeconfig", "", "The path to the kubeconfig file")
cmds.AddCommand(yurtinit.NewCmdInit())
cmds.AddCommand(join.NewCmdJoin(os.Stdout, nil))
cmds.AddCommand(reset.NewCmdReset(os.Stdin, os.Stdout, nil))

klog.InitFlags(nil)
// goflag.Parse()
flag.CommandLine.AddGoFlagSet(goflag.CommandLine)

return cmds
}

func setVersion(cmd *cobra.Command) {
cmd.SetVersionTemplate(`{{with .Name}}{{printf "%s " .}}{{end}}{{printf "version: %s" .Version}}`)
}
22 changes: 11 additions & 11 deletions pkg/yurtctl/cmd/join/join.go → pkg/yurtadm/cmd/join/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ import (
clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
"k8s.io/klog/v2"

"github.com/openyurtio/openyurt/pkg/yurtctl/cmd/join/joindata"
yurtphase "github.com/openyurtio/openyurt/pkg/yurtctl/cmd/join/phases"
yurtconstants "github.com/openyurtio/openyurt/pkg/yurtctl/constants"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/phases/workflow"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/constants"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/discovery/token"
kubeconfigutil "github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/util/kubeconfig"
yurtctlutil "github.com/openyurtio/openyurt/pkg/yurtctl/util/kubernetes"
"github.com/openyurtio/openyurt/pkg/yurtadm/cmd/join/joindata"
yurtphase "github.com/openyurtio/openyurt/pkg/yurtadm/cmd/join/phases"
yurtconstants "github.com/openyurtio/openyurt/pkg/yurtadm/constants"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/phases/workflow"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/constants"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/discovery/token"
kubeconfigutil "github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/util/kubeconfig"
yurtadmutil "github.com/openyurtio/openyurt/pkg/yurtadm/util/kubernetes"
)

var (
Expand Down Expand Up @@ -83,7 +83,7 @@ func newJoinOptions() *joinOptions {
}
}

// NewCmdJoin returns "yurtctl join" command.
// NewCmdJoin returns "yurtadm join" command.
func NewCmdJoin(out io.Writer, joinOptions *joinOptions) *cobra.Command {
if joinOptions == nil {
joinOptions = newJoinOptions()
Expand Down Expand Up @@ -277,7 +277,7 @@ func newJoinData(cmd *cobra.Command, args []string, opt *joinOptions, out io.Wri
}
data.clientSet = client

k8sVersion, err := yurtctlutil.GetKubernetesVersionFromCluster(client)
k8sVersion, err := yurtadmutil.GetKubernetesVersionFromCluster(client)
if err != nil {
klog.Errorf("failed to get kubernetes version, %v", err)
return nil, err
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ import (
"k8s.io/klog/v2"
kubeletconfigv1beta1 "k8s.io/kubelet/config/v1beta1"

"github.com/openyurtio/openyurt/pkg/yurtctl/cmd/join/joindata"
yurtconstants "github.com/openyurtio/openyurt/pkg/yurtctl/constants"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/phases/workflow"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/constants"
kubeutil "github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/phases/kubelet"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/util/apiclient"
kubeletconfig "github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubelet/apis/config"
kubeletscheme "github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubelet/apis/config/scheme"
kubeletcodec "github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubelet/kubeletconfig/util/codec"
"github.com/openyurtio/openyurt/pkg/yurtctl/util/edgenode"
"github.com/openyurtio/openyurt/pkg/yurtctl/util/templates"
"github.com/openyurtio/openyurt/pkg/yurtadm/cmd/join/joindata"
yurtconstants "github.com/openyurtio/openyurt/pkg/yurtadm/constants"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/phases/workflow"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/constants"
kubeutil "github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/phases/kubelet"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/util/apiclient"
kubeletconfig "github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubelet/apis/config"
kubeletscheme "github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubelet/apis/config/scheme"
kubeletcodec "github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubelet/kubeletconfig/util/codec"
"github.com/openyurtio/openyurt/pkg/yurtadm/util/edgenode"
"github.com/openyurtio/openyurt/pkg/yurtadm/util/templates"
)

// NewEdgeNodePhase creates a yurtctl workflow phase that start kubelet on a edge node.
// NewEdgeNodePhase creates a yurtadm workflow phase that start kubelet on a edge node.
func NewEdgeNodePhase() workflow.Phase {
return workflow.Phase{
Name: "Join node to OpenYurt cluster. ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/klog/v2"

"github.com/openyurtio/openyurt/pkg/yurtctl/cmd/join/joindata"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/phases/workflow"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/constants"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/util/apiclient"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/util/initsystem"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/util/kubeconfig"
"github.com/openyurtio/openyurt/pkg/yurtctl/util/edgenode"
"github.com/openyurtio/openyurt/pkg/yurtadm/cmd/join/joindata"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/phases/workflow"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/constants"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/util/apiclient"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/util/initsystem"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/util/kubeconfig"
"github.com/openyurtio/openyurt/pkg/yurtadm/util/edgenode"
)

//NewPostcheckPhase creates a yurtctl workflow phase that check the health status of node components.
//NewPostcheckPhase creates a yurtadm workflow phase that check the health status of node components.
func NewPostcheckPhase() workflow.Phase {
return workflow.Phase{
Name: "postcheck",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"k8s.io/klog/v2"
utilsexec "k8s.io/utils/exec"

"github.com/openyurtio/openyurt/pkg/yurtctl/cmd/join/joindata"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/phases/workflow"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/preflight"
"github.com/openyurtio/openyurt/pkg/yurtadm/cmd/join/joindata"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/phases/workflow"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/preflight"
)

// NewPreflightPhase creates a kubeadm workflow phase that implements preflight checks for a new node join
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ import (

"k8s.io/klog/v2"

"github.com/openyurtio/openyurt/pkg/yurtctl/cmd/join/joindata"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/phases/workflow"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/constants"
"github.com/openyurtio/openyurt/pkg/yurtctl/util/kubernetes"
"github.com/openyurtio/openyurt/pkg/yurtctl/util/system"
"github.com/openyurtio/openyurt/pkg/yurtadm/cmd/join/joindata"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/phases/workflow"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/constants"
"github.com/openyurtio/openyurt/pkg/yurtadm/util/kubernetes"
"github.com/openyurtio/openyurt/pkg/yurtadm/util/system"
)

// NewPreparePhase creates a yurtctl workflow phase that initialize the node environment.
// NewPreparePhase creates a yurtadm workflow phase that initialize the node environment.
func NewPreparePhase() workflow.Phase {
return workflow.Phase{
Name: "Initialize system environment.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import (
"k8s.io/klog/v2"
utilsexec "k8s.io/utils/exec"

"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/phases/workflow"
kubeadmconstants "github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/constants"
kubeutil "github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/phases/kubelet"
utilruntime "github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/util/runtime"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/phases/workflow"
kubeadmconstants "github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/constants"
kubeutil "github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/phases/kubelet"
utilruntime "github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/util/runtime"
)

// NewCleanupNodePhase creates a kubeadm workflow phase that cleanup the node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (

"k8s.io/klog/v2"

"github.com/openyurtio/openyurt/pkg/yurtctl/constants"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/phases/workflow"
"github.com/openyurtio/openyurt/pkg/yurtctl/util/edgenode"
"github.com/openyurtio/openyurt/pkg/yurtadm/constants"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/phases/workflow"
"github.com/openyurtio/openyurt/pkg/yurtadm/util/edgenode"
)

func NewCleanYurtFilePhase() workflow.Phase {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (

"k8s.io/klog/v2"

"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/phases/workflow"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/preflight"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/phases/workflow"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/preflight"
)

// NewPreflightPhase creates a kubeadm workflow phase implements preflight checks for reset
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import (
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/klog/v2"

yurtphases "github.com/openyurtio/openyurt/pkg/yurtctl/cmd/reset/phases"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/cmd/phases/workflow"
utilruntime "github.com/openyurtio/openyurt/pkg/yurtctl/kubernetes/kubeadm/app/util/runtime"
yurtphases "github.com/openyurtio/openyurt/pkg/yurtadm/cmd/reset/phases"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/options"
"github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/cmd/phases/workflow"
utilruntime "github.com/openyurtio/openyurt/pkg/yurtadm/kubernetes/kubeadm/app/util/runtime"
)

var (
Expand Down Expand Up @@ -120,7 +120,7 @@ func AddResetFlags(flagSet *flag.FlagSet, resetOptions *resetOptions) {
)
}

// NewCmdReset returns the "yurtctl reset" command
// NewCmdReset returns the "yurtadm reset" command
func NewCmdReset(in io.Reader, out io.Writer, resetOptions *resetOptions) *cobra.Command {
if resetOptions == nil {
resetOptions = newResetOptions()
Expand All @@ -129,7 +129,7 @@ func NewCmdReset(in io.Reader, out io.Writer, resetOptions *resetOptions) *cobra

cmd := &cobra.Command{
Use: "reset",
Short: "Performs a best effort revert of changes made to this host by 'yurtctl join'",
Short: "Performs a best effort revert of changes made to this host by 'yurtadm join'",
RunE: func(cmd *cobra.Command, args []string) error {
c, err := resetRunner.InitData(args)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ import (
flag "github.com/spf13/pflag"
"k8s.io/klog/v2"

"github.com/openyurtio/openyurt/pkg/yurtctl/constants"
"github.com/openyurtio/openyurt/pkg/yurtctl/util"
"github.com/openyurtio/openyurt/pkg/yurtctl/util/edgenode"
strutil "github.com/openyurtio/openyurt/pkg/yurtctl/util/strings"
tmplutil "github.com/openyurtio/openyurt/pkg/yurtctl/util/templates"
"github.com/openyurtio/openyurt/pkg/yurtadm/constants"
"github.com/openyurtio/openyurt/pkg/yurtadm/util"
"github.com/openyurtio/openyurt/pkg/yurtadm/util/edgenode"
strutil "github.com/openyurtio/openyurt/pkg/yurtadm/util/strings"
tmplutil "github.com/openyurtio/openyurt/pkg/yurtadm/util/templates"
)

const (
Expand Down
Loading

0 comments on commit 9f5883e

Please sign in to comment.