Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Postrender args are not passed to binary in releases >= 2.15 #1503

Closed
fullykubed opened this issue Oct 15, 2024 · 10 comments
Closed

Bug: Postrender args are not passed to binary in releases >= 2.15 #1503

fullykubed opened this issue Oct 15, 2024 · 10 comments
Assignees
Labels

Comments

@fullykubed
Copy link

Terraform, Provider, Kubernetes and Helm Versions

Terraform version: 1.8
Provider version: >= 2.15
Kubernetes version: 1.29

Affected Resource(s)

  • helm_release

Terraform Configuration Files

resource "helm_release" "redis" {
  namespace       = var.namespace
  name            = random_id.id.hex
  repository      = "oci://registry-1.docker.io/bitnamicharts"
  chart           = "redis"
  version         = var.helm_version
  recreate_pods   = false
  cleanup_on_fail = true
  wait            = true
  wait_for_jobs   = true
  timeout         = 60 * 15
  max_history     = 5

  values = [ ... ]
  postrender {
    binary_path = "${path.module}/kustomize/kustomize.sh"

    # These are broken:
    args = [
      "${random_id.id.hex}-node",
      "${var.namespace}.${random_id.id.hex}"
    ]
  }
}

Steps to Reproduce

Try to apply when using helm_release with a postrender block that has args. Notice that args are not passed to the binary at binary_path during execution.

Expected Behavior

args are passed.

Actual Behavior

args are not passed.

References

This commit appears to be the one that broke this functionality: 723cb76

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@Tom-Newton
Copy link

Is this the same problem as #1472?

@sheneska
Copy link
Contributor

Hi @fullykubed, I will be closing this issue as it looks like a duplicate of #1472.

@fullykubed
Copy link
Author

fullykubed commented Oct 16, 2024

@sheneska This is not the same issue.

#1472 is talking about the data element. This is for the resource.

Moreover, postrender does run now and did run before. The only thing that broke in the linked commit was that the author removed the passing of args to the postrender binary. In the bugged versions, the postrender binary is executed, just with no arguments.

I would recommend keeping this open.

@bluekeyes
Copy link

bluekeyes commented Oct 17, 2024

I can second that this appears to be a regression in provider versions 2.15.0 and newer. Pinning the provider to version 2.14.1 resolved the problem in my project. The regression is not immediately obvious because it only happens when creating a new helm_release resource; updating an existing helm_release resource still correctly passes the arguments to the postrender script.

#1477 looks like a proposed fix for this issue.

@fullykubed
Copy link
Author

@sheneska As this is a bug that has broken semver for this provider, can you please re-open?

@alenmeister
Copy link

This bug report should most definitively not be closed! Major blocker for us when creating new GitLab runners for a new repository. We rely on a sed command with two args to substitute the tags used on GitLab's OCP images for runners. As @bluekeyes mentioned, works just fine on existing resources but now new ones.

@Reasonably
Copy link

@sheneska Please reopen the issue. It’s frustrating to see this dismissed as a duplicate without addressing the clear differences.

Do you truly think this is the same issue as #1472? This issue explicitly concerns helm_release, whereas #1472 is about helm_template. These are entirely different contexts, and conflating them is a disservice to the discussion.

Furthermore, I’ve already submitted a fix for this in PR #1477. Closing the issue without proper review undermines the effort contributors put into improving the project. At the very least, please revisit both the issue and the PR before dismissing this so hastily.

@Reasonably
Copy link

@Tom-Newton Could you please reopen the issue?

@Tom-Newton
Copy link

@Tom-Newton Could you please reopen the issue?

No I don't have any maintainer permissions. I'm just another person who found the problem but I didn't see the distinction between the 2 issues.

@Reasonably
Copy link

@Tom-Newton Could you please reopen the issue?

No I don't have any maintainer permissions. I'm just another person who found the problem but I didn't see the distinction between the 2 issues.

helm_template is data, and there is no implementation about postrenderer. But the issue is saying helm_release it has been implemented already.

#1533 said same issue and already fixed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants