// TranslateTree translates input value.yaml Tree to ControlPlaneSpec Tree.
TranslateTree translates input value.yaml Tree to ControlPlaneSpec Tree.
// TranslateTree translates input value . yaml Tree to ControlPlaneSpec Tree .
func (t *ReverseTranslator) TranslateTree(valueTree map[string]interface{}, cpSpecTree map[string]interface{}, path util.Path) error {
	err := t.setEnablementAndNamespacesFromValue(valueTree, cpSpecTree)
	if err != nil {
		return fmt.Errorf("error when translating enablement and namespace from value.yaml tree: %v", err)
	}
	err = t.translateTree(valueTree, cpSpecTree)
	if err != nil {
		return fmt.Errorf("error when translating value.yaml tree with global mapping: %v", err)
	}
	err = t.initK8SMapping(valueTree)
	if err != nil {
		return fmt.Errorf("error when initiating k8s mapping: %v", err)
	}
	err = t.translateK8sTree(valueTree, cpSpecTree)
	if err != nil {
		return fmt.Errorf("error when translating value.yaml tree with kubernetes mapping: %v", err)
	}
	err = t.translateRemainingPaths(valueTree, cpSpecTree, nil)
	if err != nil {
		return fmt.Errorf("error when translating remaining path: %v", err)
	}
	return nil
}
func ( t * ReverseTranslator ) TranslateTree ( valueTree map [ string ] interface { } , cpSpecTree map [ string ] interface { } , path util . Path ) error { err := t . setEnablementAndNamespacesFromValue ( valueTree , cpSpecTree ) if err != nil { return fmt . Errorf ( " " , err ) } err = t . translateTree ( valueTree , cpSpecTree ) if err != nil { return fmt . Errorf ( " " , err ) } err = t . initK8SMapping ( valueTree ) if err != nil { return fmt . Errorf ( " " , err ) } err = t . translateK8sTree ( valueTree , cpSpecTree ) if err != nil { return fmt . Errorf ( " " , err ) } err = t . translateRemainingPaths ( valueTree , cpSpecTree , nil ) if err != nil { return fmt . Errorf ( " " , err ) } return nil }
TranslateTree translates input value.yaml Tree to ControlPlaneSpec Tree.
TranslateTree translates input value . yaml Tree to ControlPlaneSpec Tree .
// translate enablement and namespace // translate with api mapping // translate with k8s mapping // translate remaining untranslated paths into component values