Open alexkreidler opened 5 years ago
After trying to use the pre-install
hook I've realized that Kubernetes needs to actually provision the APIService
and then finally the voyager-operator
pod for the Ingress
CRD to be created here:
This means that even if Helm waits for the APIService
to be created, the pod will still be spinning up and the CRDs will not exist yet at the time of validation.
A solution to this problem which would allow for the workflow of using Voyager as a dependency would be to keep the CRD resources statically in the Helm chart for Voyager and create them at Helm install-time.
This would allow us to use the crd-install
Helm hook to be able to create an Ingress
in the parent app while using the CRD from the voyager subchart. The history of the CRD issue and the crd-hook
solution is described here
This is more work than simply adding a pre-install
hook, but also seems to me to make more sense, however I haven't looked in detail at Voyager's architecture so I don't know if there's a specific reason not to do this.
However, it would be great to support the workflow of using Voyager as a subchart in a large Helm app.
Are there any updates or recommendations for this issue? Using the 12.0.0 version of this chart, I still run into this situation.
I would definitely like to support the ease of using Voyager as a subchart if I can help contribute.
I am using Voyager as a dependency subchart of a larger project. This means that Helm will
I am happy with this setup. However, when I do a fresh
helm install
I get:I think this is because Helm is trying to create my
Ingress
resource before it has actually created Voyager'sapiregistration.k8s.io/v1beta1
APIService
which actually definesvoyager.appscode.com/v1beta1
, so at the time of creation, no such api extension actually exists.The simplest solution to this issue would to use Helm hooks (e.g.
"helm.sh/hook": "pre-install"
) to make sure that Voyager'sAPIService
is created before any other resources in the same release. Thepre-install
hook will have no impact on regular Voyager installations.I will open a PR and link to it here. Hopefully this is a quick fix that will help everyone who wants to follow this pattern with Voyager.
Thanks for a great project!