Template Kubernetes manifests with dynamic data using Gomplate functions

krzwiatrzyk

krzwiatrzyk

Posted on May 28, 2024

Template Kubernetes manifests with dynamic data using Gomplate functions

TL;DR:

  • TargetGroupBinding AWS Load Balancer Controler custom resource requires TargetGroup ARN to be specified
  • TargetGroup ARN includes a random ID at the end of ARN to uniquely identify a target group — like:
arn:aws:elasticloadbalancing:eu-west-1:<account-id>:targetgroup/<target-group-name>/ba7a3694de41e946
Enter fullscreen mode Exit fullscreen mode
  • To deploy multiple TargetGroupBindings user is forced to copy & paste TargetGroupARNs from AWS
  • Gomplate functions can use TargetGroupName to TargetGroupARN mapping from AWS and template Kubernetes resources in git
  • GitHub Actions can be used to automatically prepare a PR if new manifests are supplied or TargetGroup will be recreated on AWS

To learn how to implement that, read the full story:

https://blog.windkube.com/template-kubernetes-manifests-with-dynamic-data-using-gomplate-functions/

💖 💪 🙅 🚩
krzwiatrzyk
krzwiatrzyk

Posted on May 28, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related