incubator-devlake-helm-chart icon indicating copy to clipboard operation
incubator-devlake-helm-chart copied to clipboard

Helm install on AWS EKS fails due multiple containers being unable to mount /etc/localtime

Open BrookeKatalon opened this issue 1 year ago • 8 comments

Errors:

MountVolume.SetUp failed for volume "devlake-mysql-localtime" : hostPath type check failed: /etc/localtime is not a file

Fix:

Remove the mappings for /etc/localtime. The containers in the pod will inherit time from the cluster nodes.

affects: deployments.yaml & statefulsets.yaml.

BrookeKatalon avatar May 22 '23 18:05 BrookeKatalon

Calling experts @JorgeGar @IronCore864

klesh avatar May 23 '23 05:05 klesh

I also had issues with the localtime being a hostPath but on the permission side. Kubernetes recommend avoiding the hostPath unless they are completely required: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath. @BrookeKatalon could you create a PR with the fix?

JorgeGar avatar May 23 '23 06:05 JorgeGar

I tried to push my local issues/134 with the workaround/fix but I get an error: [issues/134 44b9c30] comment out volume mappings for TZ symlinks so AWS EKS doesnt fail 3 files changed, 75 insertions(+), 76 deletions(-) ❯ git push ERROR: Permission to apache/incubator-devlake-helm-chart.git denied to BrookeKatalon. fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

BrookeKatalon avatar May 23 '23 13:05 BrookeKatalon

Are you trying to push from the very same repo? If so, that's the issue. The process should be to fork the repo, and then from the forked one, you create the branch, work on it and push it to your branch. Later you can create the PR from the forked repo branch to the main repo. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork.

Having said that... If you're already doing, then I don't know what's going on 😄

JorgeGar avatar May 23 '23 13:05 JorgeGar

D'oh! You can tell I work on internal repos only. Forked and PR created

BrookeKatalon avatar May 23 '23 15:05 BrookeKatalon

Is it possible to remove the localtime volume mount?

If not, is it possible to create a configmap containing the value and mount the configmap instead of a hostpath? @klesh

IronCore864 avatar May 25 '23 13:05 IronCore864

If we could pass the localtime as an env variable or configmap as @IronCore864 mentioned, that would be the best option.

JorgeGar avatar May 25 '23 13:05 JorgeGar

@IronCore864 @JorgeGar The localtime volume makes sense for docker-compose, I believe the helm chart localtime volume was derived from it. So, yes, we could remove localtime volume if it is not the best practice for helm chart which I'm not an expert by any means, I would concur with whatever you think is the best.😊

klesh avatar May 26 '23 10:05 klesh