Skip to content

EC2-Controller Helm Template Referencing Error #2029

@eadasiak

Description

@eadasiak

Describe the bug
When specifying a credentials secretName during helm install, a templating error occurs due to a broken reference in the _helpers/tpl file. This was an injection with controller version 1.2.3

Steps to reproduce

helm template ack-ec2-controller --namespace ack-system oci://public.ecr.aws/aws-controllers-k8s/ec2-chart --version=1.2.2 --set aws-region=us-east-1 --set aws.credentials.secretName=aws-creds

works, but

helm template ack-ec2-controller --namespace ack-system oci://public.ecr.aws/aws-controllers-k8s/ec2-chart --version=1.2.2 --set aws-region=us-east-1 --set aws.credentials.secretName=aws-creds

results in:

Error: template: ec2-chart/templates/deployment.yaml:112:20: executing "ec2-chart/templates/deployment.yaml" at <include "ack-ec2-controller.aws.credentials.path" .>: error calling include: template: ec2-chart/templates/_helpers.tpl:47:20: executing "ack-ec2-controller.aws.credentials.path" at <include "aws.credentials.secret_mount_path" .>: error calling include: template: no template "aws.credentials.secret_mount_path" associated with template "gotpl"

Expected outcome
The manifests would be rendered from the templates without error.

Environment

  • Kubernetes version 1.27.3
  • Using EKS (yes/no), if so version? no
  • AWS service targeted (S3, RDS, etc.) ec2

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/helmIssues or PRs related to Helm chartskind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions