// translateStrategy translates Deployment Strategy related configurations from helm values.yaml tree.
translateStrategy translates Deployment Strategy related configurations from helm values.yaml tree.
// translateStrategy translates Deployment Strategy related configurations from helm values . yaml tree .
func translateStrategy(fieldName string, outPath string, value interface{}, cpSpecTree map[string]interface{}) error {
	fieldMap := map[string]string{
		"rollingMaxSurge":       "maxSurge",
		"rollingMaxUnavailable": "maxUnavailable",
	}
	newFieldName, ok := fieldMap[fieldName]
	if !ok {
		return fmt.Errorf("expected field name found in values.yaml: %s", fieldName)
	}
	outPath += ".rollingUpdate." + newFieldName
	log.Infof("path has value in helm Value.yaml tree, mapping to output path %s", outPath)
	if err := tpath.WriteNode(cpSpecTree, util.ToYAMLPath(outPath), value); err != nil {
		return err
	}
	return nil
}
func translateStrategy ( fieldName string , outPath string , value interface { } , cpSpecTree map [ string ] interface { } ) error { fieldMap := map [ string ] string { " " : " " , " " : " " , } newFieldName , ok := fieldMap [ fieldName ] if ! ok { return fmt . Errorf ( " " , fieldName ) } outPath += " " + newFieldName log . Infof ( " " , outPath ) if err := tpath . WriteNode ( cpSpecTree , util . ToYAMLPath ( outPath ) , value ) ; err != nil { return err } return nil }
translateStrategy translates Deployment Strategy related configurations from helm values.yaml tree.
translateStrategy translates Deployment Strategy related configurations from helm values . yaml tree .