Skip to content

Commit

Permalink
support --apps flag in upgrade (#2186)
Browse files Browse the repository at this point in the history
Signed-off-by: wb-lyk925458 <[email protected]>
Co-authored-by: wb-lyk925458 <[email protected]>
  • Loading branch information
wizardlyk and wb-lyk925458 authored Apr 13, 2023
1 parent c170258 commit 78ab742
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/sealer/cmd/cluster/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func NewUpgradeCmd() *cobra.Command {

cluster := current.GetCluster()
//update image of cluster
cluster.Spec.APPNames = upgradeFlags.AppNames
cluster.Spec.Image = args[0]
clusterData, err := yaml.Marshal(cluster)
if err != nil {
Expand All @@ -109,6 +110,7 @@ func NewUpgradeCmd() *cobra.Command {

upgradeFlags = &types.UpgradeFlags{}
upgradeCmd.Flags().StringVarP(&upgradeFlags.ClusterFile, "Clusterfile", "f", "", "Clusterfile path to upgrade a Kubernetes cluster")
upgradeCmd.Flags().StringSliceVar(&upgradeFlags.AppNames, "apps", nil, "override default AppNames of sealer image")

return upgradeCmd
}
Expand Down
1 change: 1 addition & 0 deletions cmd/sealer/cmd/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ type MergeFlags struct {

type UpgradeFlags struct {
ClusterFile string
AppNames []string // override default APPNames of sealer image
}

type RollbackFlags struct {
Expand Down

0 comments on commit 78ab742

Please sign in to comment.