Skip to content
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

[BUG] redis master service does not deploy #36

Open
HaleyACS opened this issue Nov 18, 2022 · 4 comments
Open

[BUG] redis master service does not deploy #36

HaleyACS opened this issue Nov 18, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@HaleyACS
Copy link

HaleyACS commented Nov 18, 2022

Describe the bug
When redis service is to be created, the headless one comes up, the master does not.
Error message comes and service is not created.
Removing the

Environment
k3s on ubuntu server 22.04.

Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.8+k3s1", GitCommit:"5d0a12a6168bf2140216913ea9e5df6f81a26ec6", GitTreeState:"clean", BuildDate:"2021-06-21T20:44:53Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.8+k3s1", GitCommit:"5d0a12a6168bf2140216913ea9e5df6f81a26ec6", GitTreeState:"clean", BuildDate:"2021-06-21T20:44:53Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}

Additional context

devadm@mailu-dev:~/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/charts/redis/templates/master$ k apply -f service.yaml 
error: error validating "service.yaml": error validating data: ValidationError(Service.spec): unknown field "internalTrafficPolicy" in io.k8s.api.core.v1.ServiceSpec; if you choose to ignore these errors, turn validation off with --validate=false

Removing the internalTrafficPolicy makes the svc go through.

@HaleyACS HaleyACS added the bug Something isn't working label Nov 18, 2022
@fastlorenzo
Copy link
Owner

I think that could be related to your version of kubernetes (1.20) which doesn't support internalTrafficPolicy yet (https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/)

Let me see if that can be disabled in redis chart.

@fastlorenzo
Copy link
Owner

There is normally a check in the chart to see if it's supported:
https://github.com/bitnami/charts/blob/main/bitnami/redis/templates/master/service.yaml#L26-L28

How do you deploy the chart?

@HaleyACS
Copy link
Author

I dump all helm charts to files, and apply these in kubernetes.
Script runs like this - first update git repo, the helm charts (so if I do the helm-only test it is at the same level).
Then I extract all yaml files out of the current chart and apply them.

devadm@mailu-dev:~/k3s/mailu-dev/helm-charts-1$ ./helm2yaml.sh 
Pulling master
Already up to date.
tags/mailu-1.0.0-beta.23
 * Using Helm version: 
version.BuildInfo{Version:"v3.10.2", GitCommit:"50f003e5ee8704ec937a756c646870227d7c8b58", GitTreeState:"clean", GoVersion:"go1.18.8"}

Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "ingress-nginx" chart repository
...Successfully got an update from the "mailu" chart repository
...Successfully got an update from the "jetstack" chart repository
...Successfully got an update from the "bitnami" chart repository
Update Complete. ⎈Happy Helming!⎈
 * Rendering helm chart to yaml
install.go:192: [debug] Original chart version: "1.0.0-beta.23"
install.go:209: [debug] CHART PATH: /home/devadm/k3s/mailu-dev/helm-charts-1/mailu

wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/charts/mariadb/templates/serviceaccount.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/charts/redis/templates/serviceaccount.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/charts/mariadb/templates/secrets.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/roundcube/secret.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/secret-initial-account.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/secret-key-secret.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/secrets-tls.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/charts/mariadb/templates/primary/configmap.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/charts/mariadb/templates/primary/initialization-configmap.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/charts/redis/templates/configmap.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/charts/redis/templates/health-configmap.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/charts/redis/templates/scripts-configmap.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/charts/mariadb/templates/primary/svc.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/charts/redis/templates/headless-svc.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/charts/redis/templates/master/service.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/admin/service.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/clamav/service-headless.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/clamav/service.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/dovecot/service.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/front/service.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/postfix/service.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/roundcube/service.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/rspamd/service.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/admin/deployment.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/dovecot/deployment.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/front/deployment.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/postfix/deployment.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/roundcube/deployment.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/rspamd/deployment.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/charts/mariadb/templates/primary/statefulset.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/charts/redis/templates/master/application.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/clamav/statefulset.yaml
wrote /home/devadm/k3s/mailu-dev/helm-charts-1/solsys-1.0.0-beta.23/mailu/mailu/templates/front/ingress.yaml

@fastlorenzo
Copy link
Owner

The Redis chart is checking for capabilities based on k8s version when doing helm install directly, maybe the way you do it doesn't return the correct kubernetes version and thus includes features that aren't supported by your k8s version?
Could you try directly to do a helm install instead of generating and then applying (to see if the same error occurs)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants