hashicorp / hashicorp/packer

add ability to specify a CALLBACK_URI env var (so packer can be used in kubernetes based pipelines)

Open
#13,201 11 comments 0 reactions 0 assignees View on GitHub
enhancement stage/needs-discussion
Dominant language
Go
Stars
15.8k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

#### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment

#### Description

If the environment variable CALLBACK_URI exists, use that once a VM is complete instead of the local ip automatically detected when the bind was performed.

#### Use Case(s)

In my environment I run pipelines within kubernetes. When running image-builder, which uses packer, this means once the VM is ready it can't call back on the ip it was given. Things running in kubernetes are not reachable by default. They need to be exposed via a service. In my case I am easily able to expose the IP needed to be used using a LoadBalancer IP, or specify an FQDN (which is registered in DNS automatically), but via image-builder & packer there seems to be no way to specify the value.

In the past I used Jenkins with the kubernetes plugin, running things via Kubernetes. Currently my pipelines run using gitlab-runner (via Kubernetes), which is used by my gitlab pipelines.

#### Potential configuration

```
env var CALLBACK_URI or similar
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.