Skip to content

Commit

Permalink
remove commenting code
Browse files Browse the repository at this point in the history
  • Loading branch information
shanalily committed Jan 25, 2022
1 parent 3b0a9a1 commit 7beb686
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
66 changes: 33 additions & 33 deletions api/internal/target/kusttarget.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,26 +129,26 @@ func (kt *KustTarget) makeCustomizedResMap() (resmap.ResMap, error) {
return nil, err
}

// // The following steps must be done last, not as part of
// // the recursion implicit in AccumulateTarget.

// err = kt.addHashesToNames(ra)
// if err != nil {
// return nil, err
// }

// // Given that names have changed (prefixs/suffixes added),
// // fix all the back references to those names.
// err = ra.FixBackReferences()
// if err != nil {
// return nil, err
// }

// // With all the back references fixed, it's OK to resolve Vars.
// err = ra.ResolveVars()
// if err != nil {
// return nil, err
// }
// The following steps must be done last, not as part of
// the recursion implicit in AccumulateTarget.

err = kt.addHashesToNames(ra)
if err != nil {
return nil, err
}

// Given that names have changed (prefixs/suffixes added),
// fix all the back references to those names.
err = ra.FixBackReferences()
if err != nil {
return nil, err
}

// With all the back references fixed, it's OK to resolve Vars.
err = ra.ResolveVars()
if err != nil {
return nil, err
}

return ra.ResMap(), nil
}
Expand Down Expand Up @@ -221,19 +221,19 @@ func (kt *KustTarget) accumulateTarget(ra *accumulator.ResAccumulator) (
if err != nil {
return nil, err
}
// err = kt.runValidators(ra)
// if err != nil {
// return nil, err
// }
// err = ra.MergeVars(kt.kustomization.Vars)
// if err != nil {
// return nil, errors.Wrapf(
// err, "merging vars %v", kt.kustomization.Vars)
// }
// err = kt.IgnoreLocal(ra)
// if err != nil {
// return nil, err
// }
err = kt.runValidators(ra)
if err != nil {
return nil, err
}
err = ra.MergeVars(kt.kustomization.Vars)
if err != nil {
return nil, errors.Wrapf(
err, "merging vars %v", kt.kustomization.Vars)
}
err = kt.IgnoreLocal(ra)
if err != nil {
return nil, err
}
return ra, nil
}

Expand Down
2 changes: 1 addition & 1 deletion api/internal/target/kusttarget_configplugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ var transformerConfigurators = map[builtinhelpers.BuiltinPluginType]func(
}
c.Namespace = kt.kustomization.Namespace
c.FieldSpecs = tc.NameSpace
fmt.Printf("c.Namesapace: %s\n", c.Namespace)
fmt.Printf("c.Namespace: %s\n", c.Namespace)
// for i, spec := range c.FieldSpecs {
// fmt.Printf("c.FieldSpecs[%d]: %s\n", i, spec.String())
// }
Expand Down

0 comments on commit 7beb686

Please sign in to comment.