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

Cannot specify jenkins-home volumeMount for jenkins-master container #265

Closed
wendtek opened this issue Feb 3, 2020 · 6 comments
Closed

Comments

@wendtek
Copy link

wendtek commented Feb 3, 2020

Issue

In the CR spec, adding a volumeMount with name: jenkins-home to the container named jenkins-master will result in a warning similar to the following:

WARN	controller-jenkins	jenkins/jenkins_controller.go:153	Reconcile loop failed 10 times with the same error, giving up: Pod "jenkins-cc-jenkins" is invalid: spec.containers[0].volumeMounts[6].mountPath: Invalid value: "/var/jenkins/jenkins": must be unique	{"cr": "cc-jenkins"}

I personally was confused by this as my experience working with multiple containers in a pod led me to put the volumeMount in both, making this counter-intuitive to me and possibly other Kubernetes users.

Suggestion

I suggest either checking for and overriding if that volumeMount is supplied in the spec, or adding to the documentation that it is created by default. The two places I think it would be relevant in the documention are:

@tomaszsek tomaszsek added documentation help wanted Extra attention is needed labels Apr 2, 2020
@Nuru
Copy link

Nuru commented May 3, 2020

I would like to be able to specify jenkins-home as a PersitentVolume so I can include it in my global backup and restore scripts, especially since the operator backup/restore seems not to be working well: #104 #210 #267 #273

@tomaszsek
Copy link

@Nuru sorry, but we can't do that. When we will allow this Jenkins will be mutable and this is not acceptable form the architecture point of view. We have to improve the backup and restore mechanism.

@Nuru
Copy link

Nuru commented May 3, 2020

@Nuru sorry, but we can't do that. When we will allow this Jenkins will be mutable and this is not acceptable form the architecture point of view. We have to improve the backup and restore mechanism.

@tomaszsek right now if I make a change to the Jenkins resource, nothing is restored and the backups start over from 1. That is pretty harsh.

I would prefer that the full JENKINS_HOME is restored and the configuration as code is applied on top of it. Until then, I would prefer not to lose JENKINS_HOME in the first place.

@tomaszsek
Copy link

@Nuru I think the issue is somewhere else please create a separate issue with the details(operator version and Jenkins CR). BTW did you look at the operator logs?

@stale
Copy link

stale bot commented Jul 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue is still affecting you, just comment with any updates and we'll keep it open. Thank you for your contributions.

@stale stale bot added the stale label Jul 21, 2021
@Sig00rd Sig00rd removed stale help wanted Extra attention is needed labels Aug 2, 2021
@Sig00rd
Copy link

Sig00rd commented Aug 2, 2021

Hello, thanks for your input. I've updated the docs in #608

@Sig00rd Sig00rd closed this as completed Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants