Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support apps flag in upgrade #2186

Merged
merged 1 commit into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmd/sealer/cmd/cluster/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,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 @@ -108,6 +109,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