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

Unable to deploy chart #423

Closed
NasAmin opened this issue Jul 26, 2021 · 3 comments
Closed

Unable to deploy chart #423

NasAmin opened this issue Jul 26, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@NasAmin
Copy link

NasAmin commented Jul 26, 2021

Describe the bug
Unable to to deploy the chart with the following command:

helm install jenkins jenkins/jenkins

I would expect the chart to just work out of the box but I am getting this error:

Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(StatefulSet.spec.template.spec.containers[0]): unknown field "startupProbe" in io.k8s.api.core.v1.Container

I have an existing deployment from stable/jenkins which has been deprecated and I need to upgrade my deployment. Tried to switch to this chart but it doesn't even work with the default values file.

Version of Helm and Kubernetes:

Helm Version:

$ helm version
version.BuildInfo{Version:"v3.6.3", GitCommit:"d506314abfb5d21419df8c7e7e68012379db2354", GitTreeState:"clean", GoVersion:"go1.16.5"}

Kubernetes Version:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", BuildDate:"2021-01-13T13:28:09Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15+", GitVersion:"v1.15.12-eks-5817a6", GitCommit:"5817a6e720450eb7940e4f7827e06aaac0e36dea", GitTreeState:"clean", BuildDate:"2021-02-12T23:28:03Z", GoVersion:"go1.12.17", Compiler:"gc", Platform:"linux/amd64"}

Which version of the chart:
latest version.
The stable/jenkins version currently installed is jenkins-1.9.16

What happened:
When deploying the chart with no customizations, I get the following error:

Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(StatefulSet.spec.template.spec.containers[0]): unknown field "startupProbe" in io.k8s.api.core.v1.Container

When I try to upgrade the existing chart with custom values for security realm etc, I get the following error:

Error: template: jenkins/templates/jcasc-config.yaml:43:8: executing "jenkins/templates/jcasc-config.yaml" at <include "jenkins.casc.defaults" .>: error calling include: template: jenkins/templates/_helpers.tpl:149:10: executing "jenkins.casc.defaults" at <include "jenkins.casc.podTemplate" .>: error calling include: template: jenkins/templates/_helpers.tpl:208:47: executing "jenkins.casc.podTemplate" at <"^$">: invalid value; expected string

What you expected to happen:
The chart to upgrade/install successfully.

How to reproduce it (as minimally and precisely as possible):

helm install jenkins-dev jenkins/jenkins --namespace=jenkins

I'll really appreciate if some guidance can be provided for this please.

@NasAmin NasAmin added the bug Something isn't working label Jul 26, 2021
@torstenwalter
Copy link
Member

Your Kubernetes version is not supported:
Server Version: version.Info{Major:"1", Minor:"15+", GitVersion:"v1.15.12-eks-5817a6", GitCommit:"5817a6e720450eb7940e4f7827e06aaac0e36dea", GitTreeState:"clean", BuildDate:"2021-02-12T23:28:03Z", GoVersion:"go1.12.17", Compiler:"gc", Platform:"linux/amd64"}

The oldest Kubernetes version this chart is tested against is 1.16 see

- "kindest/node:v1.20.0"
- "kindest/node:v1.19.1"
- "kindest/node:v1.18.8"
- "kindest/node:v1.17.11"
- "kindest/node:v1.16.15"
.

I think startupProbe was added in Kubernetes 1.16 kubernetes/enhancements#950

The probes are defined in

probes:
startupProbe:
httpGet:
path: '{{ default "" .Values.controller.jenkinsUriPrefix }}/login'
port: http
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 12
livenessProbe:
failureThreshold: 5
httpGet:
path: '{{ default "" .Values.controller.jenkinsUriPrefix }}/login'
port: http
periodSeconds: 10
timeoutSeconds: 5
# If Startup Probe is not supported on your Kubernetes cluster, you might want to use "initialDelaySeconds" instead.
# It delays the initial liveness probe while Jenkins is starting
# initialDelaySeconds: 60
readinessProbe:
failureThreshold: 3
httpGet:
path: '{{ default "" .Values.controller.jenkinsUriPrefix }}/login'
port: http
periodSeconds: 10
timeoutSeconds: 5
# If Startup Probe is not supported on your Kubernetes cluster, you might want to use "initialDelaySeconds" instead.
# It delays the initial readyness probe while Jenkins is starting
# initialDelaySeconds: 60
:

So you could try to override it in your custom-values.yaml file.

@NasAmin
Copy link
Author

NasAmin commented Jul 26, 2021

That explains it @torstenwalter. Thanks very much for the response!

@torstenwalter
Copy link
Member

You're welcome.

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