f.StringToStringVarP(&client.Labels,"labels","l",nil,"Labels that would be added to release metadata. Should be divided by comma.")
f.BoolVar(&client.EnableDNS,"enable-dns",false,"enable DNS lookups when rendering templates")
f.BoolVar(&client.HideNotes,"hide-notes",false,"if set, do not show notes in install output. Does not affect presence in chart metadata")
f.BoolVar(&client.DisableFetchingAPIVersions,"disable-fetching-api-versions",false,"if set, the installation process will populate the built-in Capabilities.APIVersions template object with a default version set instead of fetching the full set from the Kubernetes API server")
f.StringVar(&client.Description,"description","","add a custom description")
f.BoolVar(&client.DependencyUpdate,"dependency-update",false,"update dependencies if they are missing before installing the chart")
f.BoolVar(&client.EnableDNS,"enable-dns",false,"enable DNS lookups when rendering templates")
f.BoolVar(&client.DisableFetchingAPIVersions,"disable-fetching-api-versions",false,"if set, the upgrade process will populate the built-in Capabilities.APIVersions template object with a default version set instead of fetching the full set from the Kubernetes API server")
// We trap that error here and print a warning. But since the discovery client continues
// building the API object, it is correctly populated with all valid APIs.
// See https://github.com/kubernetes/kubernetes/issues/72051#issuecomment-521157642
apiVersions,err:=GetVersionSet(dc)
iferr!=nil{
ifdiscovery.IsGroupDiscoveryFailedError(err){
cfg.Log("WARNING: The Kubernetes server has an orphaned API service. Server reports: %s",err)
cfg.Log("WARNING: To fix this, kubectl delete apiservice <service-name>")
}else{
returnnil,errors.Wrap(err,"could not get apiVersions from Kubernetes")
varapiVersionschartutil.VersionSet
iffetchApiVersions{
apiVersions,err=GetVersionSet(dc)
iferr!=nil{
ifdiscovery.IsGroupDiscoveryFailedError(err){
cfg.Log("WARNING: The Kubernetes server has an orphaned API service. Server reports: %s",err)
cfg.Log("WARNING: To fix this, kubectl delete apiservice <service-name>")
}else{
returnnil,errors.Wrap(err,"could not get apiVersions from Kubernetes")
}
}
}else{
cfg.Log("WARNING: Fetching Kubernetes server-supported API versions is disabled; built-in template object Capabilities.APIVersions will contain the default version set")