danihodovic / celery-exporter

A Prometheus exporter for Celery metrics
MIT License
385 stars 85 forks source link

Helm installation broken after introducing liveness and readiness probes #242

Closed eresgie closed 1 year ago

eresgie commented 1 year ago

When trying to install helm chart, validation errors appear:

Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: error validating "": error validating data: 
[ValidationError(Deployment.spec.template.spec.containers[0].livenessProbe.httpGet): unknown field "failureThreshold" in io.k8s.api.core.v1.HTTPGetAction, ValidationError(Deployment.spec.template.spec.containers[0].livenessProbe.httpGet): unknown field "periodSeconds" in io.k8s.api.core.v1.HTTPGetAction, 
ValidationError(Deployment.spec.template.spec.containers[0].livenessProbe.httpGet): unknown field "successThreshold" in io.k8s.api.core.v1.HTTPGetAction, ValidationError(Deployment.spec.template.spec.containers[0].livenessProbe.httpGet): unknown field "timeoutSeconds" in io.k8s.api.core.v1.HTTPGetAction, 
ValidationError(Deployment.spec.template.spec.containers[0].readinessProbe.httpGet): unknown field "failureThreshold" in io.k8s.api.core.v1.HTTPGetAction, ValidationError(Deployment.spec.template.spec.containers[0].readinessProbe.httpGet): unknown field "periodSeconds" in io.k8s.api.core.v1.HTTPGetAction, 
ValidationError(Deployment.spec.template.spec.containers[0].readinessProbe.httpGet): unknown field "successThreshold" in io.k8s.api.core.v1.HTTPGetAction, ValidationError(Deployment.spec.template.spec.containers[0].readinessProbe.httpGet): unknown field "timeoutSeconds" in io.k8s.api.core.v1.HTTPGetAction]

Since I have no permissions to create PRs, here's the solution (wrong indent of 4 last lines):

          readinessProbe:
            httpGet:
              path: /health
              port: http
            timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds | default "5" }}
            failureThreshold: {{ .Values.livenessProbe.failureThreshold | default "5" }}
            periodSeconds: {{ .Values.livenessProbe.periodSeconds | default "10" }}
            successThreshold: {{ .Values.livenessProbe.successThreshold | default "1" }}

The same applies to readinessProbe.

danihodovic commented 1 year ago

@adinhodovic

adinhodovic commented 1 year ago

Feel free to forking next time :) PR open here @danihodovic https://github.com/danihodovic/celery-exporter/pull/243. Also adds CI to test the chart.

adinhodovic commented 1 year ago

Should be resolved