Skip to content

Config Validation for Helm Charts #13726

Answered by jblang
jblang asked this question in Q&A
Discussion options

You must be logged in to vote

Here's the workaround I came up with:

# locally render the template to the temp directory
dump_template() {
  helm template \
    --output-dir $tmpdir \
    $component $chart \
    --create-namespace \
    --namespace $namespace \
    $sets \
    $values \
    > /dev/null
}

# extract the specified key from the configmap in the temp directory
extract_configmap() {
  local key=$1  
  cat $tmpdir/$component/templates/configmap.yaml | 
    grep -v '^---$' | 
    yq -r ".data.\"$key\"" > "/$tmpdir/$key"
}

# convert all vector sinks to blackholes
blackhole_sinks() {
  local blackhole='"type": "blackhole", "inputs":'
  local sinks=$(yq -r ".sinks | keys | .[]" $tmpdir/vector.yaml)
  for sink in 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jblang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant