Helm2YAML

De TheNets Wiki
Ir para: navegação, pesquisa

Requirements:

  • Ruby
  • Helm
  • Kubectl
helm fetch stable/rabbitmq
helm template --name rabbitmq rabbitmq-*.tgz -f values.yaml --namespace rabbitmq > tmp.yml
mkdir definitions
ruby -e 'File.read("tmp.yml").split("---").reject(&:empty?).each{ |variable|File.write("definitions/"+variable[/# Source:.*\/(.*\.yaml)/,1],variable) }'
kubectl create ns rabbitmq
kubectl apply -f definitions -n rabbitmq