Skip to content

Commit

Permalink
chore: further example
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Meissner committed Feb 8, 2024
1 parent 57e56ce commit fea94a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/agent/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ func getParameters(config *datamodel.NodeBootstrappingConfiguration) paramsMap {
// kubelet config keys are in the form of --<key> where key is "dash-cased"
parameterKey := strings.TrimPrefix(kcKey, "--")
parameterKey = doSomeManipulation(parameterKey)
// this allows us to do {{GetParamter "kubeletConfigKeyClusterDNS"}}
addValue(parametersMap, fmt.Sprintf("kubeletConfigKey%s", parameterKey), kcValue)
// this allows us to do {{GetParamter "kubeletConfigClusterDNS"}}
addValue(parametersMap, fmt.Sprintf("kubeletConfig%s", parameterKey), kcValue)
}

// or doing something like this and just grab the specific value we need
if clusterDNS, ok := config.KubeletConfig["--cluster-dns"]; ok {
addValue(parametersMap, "--cluster-dns", clusterDNS)
addValue(parametersMap, "kubeletConfigClusterDNS", clusterDNS)
}

return parametersMap
Expand Down

0 comments on commit fea94a8

Please sign in to comment.