Skip to content

(feature) if env var CALLBACK_URI is specified, the vm uses that when complete, instead of the local ip used with http bind (enables pipelines/workflows executing via kubernetes) #304

@lknite

Description

@lknite

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
Please do not leave "+1" or "me too" comments, 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

When sending the ip to a vm to use when complete and calling back to the http server, instead of just providing the local ip used when performing the bind of the http server, if the environment variable CALLBACK_URI exists, provide that to the vm instead.

Use Case(s)

I wish to run image-builder via pipelines which run in kubernetes, whether using argocd-workflows, tekton, gitlab-runner running in k8s, or jenkins with the kubernetes plugin.

Kubernetes requires a pod to be exposed before it can be reached from the outside. When using gitlab-runner I can select an option to expose the pod via a LoadBalancer ip or ingress. I can easily provide either of these via an environment variable such as CALLBACK_URI.

Without this feature, no one can use image-builder via pipelines running in kubernetes.

Potential configuration

CALLBACK_URI=http://1.2.3.4
CALLBACK_URI=https://1.2.3.4
CALLBACK_URI=https://gitlab-runner.k.home.net

I could probably submit a pull request, but I haven't been able to figure out how this plugin is passing the ip for the vm to use when its finished. Could it be this functionality is in the packer-plugin-sdk?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions