returnfalse,errors.Errorf("%s charts are not installable",ch.Metadata.Type)
}
// It is to limit the total size of the template file to 3m, and the content of files over 3m should not be allowed to be installed.
//
// This is because the server requires the requestbody to be less than 3m when creating secrets.For details, please refer to: https://github.com/kubernetes/kubernetes/blob/release-1.18/staging/src/k8s.io/apiserver/pkg/server/config.go#L323
funcisLimitSize(raw[]*chart.File)(bool,error){
totalSize:=int64(0)
for_,r:=rangeraw{
totalSize+=int64(bytes.Count(r.Data,[]byte("")))
}
iftotalSize<int64(3*1024*1024){
returntrue,nil
}
returnfalse,errors.Errorf("Chart package too large, limit is 3MB.")
}
// Provide dynamic auto-completion for the install and template commands