Skip to content

Commit

Permalink
chore: support to skip helm schema validattion
Browse files Browse the repository at this point in the history
  • Loading branch information
ldming committed Nov 1, 2024
1 parent 3b51ad4 commit f5a834c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg/cmd/cluster/create_subcmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,18 @@ type CreateSubCmdsOptions struct {
Tenancy string `json:"tenancy"`
TolerationsRaw []string `json:"-"`

// SkipSchemaValidation is used to skip the schema validation of the helm chart.
SkipSchemaValidation bool `json:"-"`

*action.CreateOptions
}

func NewSubCmdsOptions(createOptions *action.CreateOptions, t cluster.ClusterType) (*CreateSubCmdsOptions, error) {
var err error
o := &CreateSubCmdsOptions{
CreateOptions: createOptions,
ClusterType: t,
CreateOptions: createOptions,
ClusterType: t,
SkipSchemaValidation: false,
}

if o.ChartInfo, err = cluster.BuildChartInfo(t); err != nil {
Expand Down Expand Up @@ -297,7 +301,7 @@ func (o *CreateSubCmdsOptions) getObjectsInfo() ([]*objectInfo, error) {
}

// get cluster manifests
manifests, err := cluster.GetManifests(o.ChartInfo.Chart, false, o.Namespace, o.Name, kubeVersion, values)
manifests, err := cluster.GetManifests(o.ChartInfo.Chart, o.SkipSchemaValidation, o.Namespace, o.Name, kubeVersion, values)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit f5a834c

Please sign in to comment.