You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(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
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.
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?
The text was updated successfully, but these errors were encountered:
lknite
changed the title
(feature) if env var CALLBACK_URI is specified, the vm uses that when complete, instead of the local ip used with http bind
(feature) if env var CALLBACK_URI is specified, the vm uses that when complete, instead of the local ip used with http bind (otherwise this cannot be used in pipelines/workflows executing via kubernetes)
Nov 27, 2024
HTTPAddressstring`mapstructure:"http_bind_address"`// Use to specify a specific ip/fqdn a vm should use to reach the callback http server upon completion.// This is required when running via workflows/pipelines which are running within a kubernetes cluster.HTTPCallbackAddressstring`mapstructure:"http_callback_address"`
packer-plugin-proxmox
step_type_boot_command.go
// HTTPCallbackAddress is useful when running within a kubernetes environment using an exposed LoadBalancer ipifc.HTTPCallbackAddress!="" {
httpIP=c.HTTPCallbackAddress
} elseifc.HTTPAddress!="0.0.0.0" {
httpIP=c.HTTPAddress
} else {
httpIP, err=hostIP(c.HTTPInterface)
iferr!=nil {
err:=fmt.Errorf("Failed to determine host IP: %s", err)
state.Put("error", err)
ui.Error(err.Error())
returnmultistep.ActionHalt
}
}
lknite
changed the title
(feature) if env var CALLBACK_URI is specified, the vm uses that when complete, instead of the local ip used with http bind (otherwise this cannot be used in pipelines/workflows executing via kubernetes)
(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)
Nov 27, 2024
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
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?
The text was updated successfully, but these errors were encountered: