diff --git a/cmd/kk/apis/kubekey/v1alpha2/cluster_types.go b/cmd/kk/apis/kubekey/v1alpha2/cluster_types.go index 13b1e2dc..1a304e15 100644 --- a/cmd/kk/apis/kubekey/v1alpha2/cluster_types.go +++ b/cmd/kk/apis/kubekey/v1alpha2/cluster_types.go @@ -92,7 +92,6 @@ type CustomScripts struct { // System defines the system config for each node in cluster. type System struct { - Initials []CustomScripts `yaml:"initials" json:"initials,omitempty"` NtpServers []string `yaml:"ntpServers" json:"ntpServers,omitempty"` Timezone string `yaml:"timezone" json:"timezone,omitempty"` Rpms []string `yaml:"rpms" json:"rpms,omitempty"` diff --git a/cmd/kk/pkg/pipelines/create_cluster.go b/cmd/kk/pkg/pipelines/create_cluster.go index fcf7c7e4..5c2224c4 100644 --- a/cmd/kk/pkg/pipelines/create_cluster.go +++ b/cmd/kk/pkg/pipelines/create_cluster.go @@ -58,14 +58,13 @@ func NewCreateClusterPipeline(runtime *common.KubeRuntime) error { m := []module.Module{ &precheck.GreetingsModule{}, - &customscripts.CustomScriptsModule{Phase: "Initial", Scripts: runtime.Cluster.System.Initials}, + &customscripts.CustomScriptsModule{Phase: "PreInstall", Scripts: runtime.Cluster.System.PreInstall}, &precheck.NodePreCheckModule{}, &confirm.InstallConfirmModule{}, &artifact.UnArchiveModule{Skip: noArtifact}, &os.RepositoryModule{Skip: noArtifact || !runtime.Arg.InstallPackages}, &binaries.NodeBinariesModule{}, &os.ConfigureOSModule{Skip: runtime.Cluster.System.SkipConfigureOS}, - &customscripts.CustomScriptsModule{Phase: "PreInstall", Scripts: runtime.Cluster.System.PreInstall}, &kubernetes.StatusModule{}, &container.InstallContainerModule{}, &images.CopyImagesToRegistryModule{Skip: skipPushImages}, diff --git a/docs/config-example.md b/docs/config-example.md index 479cb5c6..8370dc34 100644 --- a/docs/config-example.md +++ b/docs/config-example.md @@ -42,22 +42,13 @@ spec: # Specify additional packages to be installed. The ISO file which is contained in the artifact is required. debs: - nfs-common - # initials: - # - name: Install hd tool - # bash: curl https://gitee.com/linuxsuren/tools/raw/master/install-zh.sh|bash - # - name: Install packages - # bash: | - # hd setup --proxy ghproxy.com --provider gitee - # hd i chrony - # hd i conntrack - # hd i socat - #preInstall: # Specify custom init shell scripts for each nodes, and execute according to the list order before install container runtime. + #preInstall: # Specify custom init shell scripts for each nodes, and execute according to the list order at the first stage. # - name: format and mount disk # bash: /bin/bash -x setup-disk.sh # materials: # scripts can has some dependency materials. those will copy to the node # - ./setup-disk.sh # the script which shell execute need # - xxx # other tools materials need by this script - #postInstall: # Specify custom finish clean up shell scripts for each nodes after the kubernetes install. + #postInstall: # Specify custom finish clean up shell scripts for each nodes after the Kubernetes install. # - name: clean tmps files # bash: | # rm -fr /tmp/kubekey/*