Comments (9)
jenkins.url template is defined in:
helm-charts/charts/jenkins/templates/_helpers.tpl
Lines 51 to 68 in 91a2a39
That should give you an idea which values you can set to configure it.
This template is then used to configure it via JCasC:
helm-charts/charts/jenkins/templates/_helpers.tpl
Lines 159 to 163 in 91a2a39
from helm-charts.
jenkins.url template is defined in:
helm-charts/charts/jenkins/templates/_helpers.tpl
Lines 51 to 68 in 91a2a39
That should give you an idea which values you can set to configure it.
This template is then used to configure it via JCasC:
helm-charts/charts/jenkins/templates/_helpers.tpl
Lines 159 to 163 in 91a2a39
This is very nice information, can you add this tip into documentation on how the mapping works, so when we are stuck somewhere, we know where to find the template to check by ourselves.
from helm-charts.
I have changed my values.yaml like this
master:
serviceType: ClusterIP
servicePort: 8081
installPlugins:
- kubernetes:1.27.0
- workflow-aggregator:2.6
- workflow-job:2.39
- git:4.4.1
- configuration-as-code:1.41
JCasC:
securityRealm: |-
local:
allowsSignup: false
configScripts:
jenkins-url: |
unclassified:
location:
url: https://example.com/jenkins
adminAddress: [email protected]
welcome-message: |
jenkins:
systemMessage: Welcome to our CI\CD server. This Jenkins is configured and managed 'as code'.
# https://github.com/helm/charts/issues/15453
customInitContainers:
- name: "volume-mount-permission"
image: "busybox"
command: ["/bin/chown", "-R", "1000", "/var/jenkins_home"]
volumeMounts:
- name: "jenkins-home"
mountPath: "/var/jenkins_home"
securityContext:
runAsUser: 0
jenkinsUriPrefix: "/jenkins"
persistence:
storageClass: jenkins
size: "4Gi"
And now I have another issue:
io.jenkins.plugins.casc.ConfiguratorException: Found conflicting configuration at YamlSource: /var/jenkins_home/casc_configs/jenkins-url.yaml in /var/jenkins_home/casc_configs/jenkins-url.yaml, line 3, column 10:
url: https://example.com/jenkins
^
at io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:139)
at io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:125)
at io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:125)
at io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:125)
at io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:52)
Caused: io.jenkins.plugins.casc.ConfiguratorException: Failed to read YamlSource: /var/jenkins_home/casc_configs/jenkins-url.yaml
at io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:56)
at io.jenkins.plugins.casc.yaml.YamlUtils.loadFrom(YamlUtils.java:150)
at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:616)
at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:298)
at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:290)
Caused: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Caused: java.lang.Error
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2020-09-04 06:18:34.325+0000 [id=19] SEVERE hudson.util.BootFailure#publish: Failed to initialize Jenkins
I guess that's because default config also specifies url.
What am I doing wrong?
from helm-charts.
those needs to be overwritten in values.yaml
for helm chart since jcasc-default-config.yaml
already have it.
for url, I guess it is set in ingress part, I guess you removed this in the sample above.
master:
ingress:
hostName: xxx
You can check inside your jenkins
$ kubectl exec -it $(kubectl get pods -l app.kubernetes.io/name=jenkins -o=jsonpath='{.items[0].metadata.name}') -c jenkins bash
$ cat $CASC_JENKINS_CONFIG/jcasc-default-config.yaml
from helm-charts.
@larrycai Thank you for the reply
I use custom ingress configuration
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: jenkins-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
tls:
- hosts:
- example.com
- www.example.com
secretName: tls
rules:
- host: example.com
http:
paths:
- path: /jenkins
pathType: Prefix
backend:
service:
name: jenkins
port:
number: 8081
- host: www.example.com
http:
paths:
- path: /jenkins
pathType: Prefix
backend:
service:
name: jenkins
port:
number: 8081
Is there no other way to configure hostName?
from helm-charts.
@torstenwalter
Thank you! That is exactly what I was looking for.
I'm sorry for being not attentive enough, just getting started with Jenkins.
Could you please also clarify why the example with systemMessage
was not working for me?
Do I have to put it into configScripts
section?
from helm-charts.
Yes
from helm-charts.
#29 contains an example. I think we should add it in the README.
@FNSdev Would you like to create a PR for it?
from helm-charts.
@torstenwalter
Please take a look
#32
from helm-charts.
Related Issues (20)
- JCasC configmap field jcasc-default-config.yaml being written as a horrible string with literal \n instead of using |-
- How to override JCasC per environment using Kustomize - difficult due to one big jcasc string
- Jenkins initial admin password secret gets overwritten on every Kustomize build, losing the real login credential - this breaks the login shortly after deployment in GitOps CD systems like ArgoCD HOT 7
- Renovate doesn't update CHANGELOG correctly HOT 2
- Renovate doesn't upgrade Jenkins LTS correctly
- Initcontainer throwing error FileSystemException: /root/.cache
- host alias for the agent container
- Use WATCH mode for config reload sidecar
- 4.12.1 -> default installPlugins are causing versioning issues HOT 1
- Jenkins wont start after 5.1 upgrade HOT 7
- Issues with agent.image map HOT 3
- Getting error while installing helm build HOT 6
- The Pod template configuration of k8s cloud is lost HOT 2
- useJenkinsProxy is not rendered in template
- Document installation using proxy set up with user and password
- jenkinsTunnel in the values.yaml should include a comment not to include protocol like https://
- k3s: Crash on startup after Helm apply HOT 3
- FR: Worker only deploying though chart
- Can't disable Jenkins login page
- Jenkins plugins not getting upgraded through helm chart HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helm-charts.