-
Notifications
You must be signed in to change notification settings - Fork 566
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
Cannot install istio 1.2.2 from helm chart with helmfile #789
Comments
@mojochao Hey! I have not yet tried 1.2.2 but I do successfully installed 1.1.3 with helmfile. I'd say that the order of installation is the key here. Could you try moving For instance your root helmfiel.yaml woud look like this:
Where
And
This way you can ensure that helmfile installs |
The only major hurdle you might face (which I work around) is that you need to wait for the Istio init CRD's to finish applying. I'm doing this with a post sync script at the minute. The script I have at present is: #!/usr/bin/env bash
attempts=1
# Wait for the `istio-init` chart to finish and setup at least 3 of the CRD jobs. CHECK ON NEW ISTIO RELEASES.
while (( attempts <= 300 )); do
result=$(kubectl get pods -n "${1}" --selector job-name -o jsonpath="{range.items[?(@.status.phase == 'Succeeded')]}{.metadata.name}:{end}" | tr ':' "\n" | wc -l | awk '{ print $1 }')
echo "[A${attempts}] [istio-init] Jobs succeeded: ${result}"
if [[ ${result} -eq 3 ]]; then
echo "[A${attempts}] [istio-init] All jobs completed successfully. Exiting."
exit 0
fi
((++attempts))
sleep 1
done
echo "[A${attempts}] [istio-init] Timed out waiting for jobs to complete. Exiting."
exit 1 templates:
istio-init: &istio-init
name: istio-init
namespace: istio-system
installed: true
chart: istio/istio-init
version: 1.2.0
recreatePods: false
tillerNamespace: {{ requiredEnv "TILLER_NAMESPACE" }}
values:
- global:
imagePullPolicy: Always
tag: 1.2.0
hooks:
- events:
- postsync
showlogs: true
command: "/bin/bash"
args:
- "./wait-for-init.sh"
- "{{`{{.Release.Namespace}}`}}"
releases:
- <<: *istio-init then of course I'm following the top level helmfile as @mumoshu suggested. The only issue I'm having at the moment is that obviously you need kubectl installed where you run it (is there a possibility of bundling some extras into the docker image? jq and kubectl would be most welcome), and at present it doesn't check how many jobs actually exist to wait for; it's just hardcoded to 3. |
Wow, so does istio-init now contain something other than CRDs? That's annoying for sure 😢 Maybe it worth enhancing helmfile by adding a dedicated hook type for waiting until a job succeeds without needing kubectl and jq. Would you mind writing a feature request for that? I'm imagining something like this:
|
I'm unsure how much effort I can put to maintain those dependencies to be up-to-date, but I'm willing to accept any contributions to include them. |
@mumoshu It contains job pods which apply the CRDs, so sort of yes and no! I did create an issue for adding in jq and kubectl but I'll create a PR with the changes, I'll see if I can pin kubectl to using latest stable on each build (which I guess is what helm is doing) |
Thanks for all the suggestions, but I'm still having the same problem. I've created two independent helmfiles:
and
Also created the shell script to wait for init completion mentioned above by @naphta
Modified my root
Applying changes always results in:
Does anyone have a repo with a working helmfile of istio that I could try out? Many thanks everyone! |
As another data point, just using
|
@mojochao From the error message, I think you're encountering helm/helm#5531 and helm/helm#3742. How is your local istio charts under Anyways, try using the official helm charts repository like:
You should change |
If you do need to use the istio charts downloaded locally, try this workaround mentioned in the upstream issue |
I decided to do as you suggest @mumoshu, and just use the Istio helm charts repo and everything works now with latest Istio v1.2.4. I did not have to use a shell script to wait for completion, and hope that future installs will be reliable without one. Many thanks guys! So far, I'm finding helmfile a great fit for my needs, and appreciate all who've contributed to its development. Cheers! |
Didn't work for me, unless I run Is it possible to wait a specific amount of time after a chart is installed? |
I am trying to install the istio-1.2.2
istio
helm chart inistio-1.2.2/install/kubernetes/helm/istio
. I have copied both it and theistio-init
chart to the root directory of my helmfile repo.The relevant portion of my
helmfile.yaml
is:When I run
helmfile apply
with just theistio-init
chart in myhelmfile.yaml
file, that chart installs succesfully. When I runhelmfile apply
with theistio
chart added back to myhelmfile.yaml
file, I see the following error:I can succesfully install it with
helm install
, however.What is the correct way to install the
istio
chart withhelmfile
? Is this a bug or misconfiguration on my part?I am using the following versions running on macOS Mojave (10.14.6) against an AWS EKS 1.13 cluster:
Many thanks in advance!
The text was updated successfully, but these errors were encountered: