Skip to content

Commit

Permalink
move sealer cert command (#1809)
Browse files Browse the repository at this point in the history
* move sealer cert command to cluster module

* delete alpha field
  • Loading branch information
Stevent-fei authored Oct 25, 2022
1 parent dc7c336 commit bb2d6bc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion cmd/sealer/cmd/alpha/alpha.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@ func NewCmdAlpha() *cobra.Command {
cmd.AddCommand(NewMergeCmd())
cmd.AddCommand(NewUpgradeCmd())
cmd.AddCommand(NewGenCmd())
cmd.AddCommand(NewCertCmd())
return cmd
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package alpha
package cluster

import (
"fmt"
Expand All @@ -30,12 +30,12 @@ var longCertCmdDescription = `This command will add the new domain or IP address
sealer has some default domain and IP in the cert process builtin: localhost,outbound IP address and some DNS domain which is strongly related to the apiserver CertSANs configured by kubeadm.yml.
You need to restart your API server manually after using sealer alpha cert. Then, you can using cmd "openssl x509 -noout -text -in apiserver.crt" to check the cert details.
You need to restart your API server manually after using sealer cert. Then, you can using cmd "openssl x509 -noout -text -in apiserver.crt" to check the cert details.
`
var exampleForCertCmd = `
The following command will generate new api server cert and key for all control-plane certificates:
sealer alpha cert --alt-names 39.105.169.253,sealer.cool
sealer cert --alt-names 39.105.169.253,sealer.cool
`

var altNames []string
Expand Down
2 changes: 1 addition & 1 deletion cmd/sealer/cmd/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ import "github.com/spf13/cobra"

func NewClusterCommands() []*cobra.Command {
var clusterCommands []*cobra.Command
clusterCommands = append(clusterCommands, NewCheckCmd(), NewDeleteCmd(), NewJoinCmd(), NewRunCmd(), NewRunAPPCmd())
clusterCommands = append(clusterCommands, NewCheckCmd(), NewDeleteCmd(), NewJoinCmd(), NewRunCmd(), NewRunAPPCmd(), NewCertCmd())
return clusterCommands
}

0 comments on commit bb2d6bc

Please sign in to comment.