Skip to content

Commit

Permalink
Fix the potential Jenkins panic issues
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxSuRen committed Jul 26, 2022
1 parent 545f30a commit 4965bbf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
5 changes: 1 addition & 4 deletions deploy/cluster-configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,9 @@ spec:
devops: # (CPU: 0.47 Core, Memory: 8.6 G) Provide an out-of-the-box CI/CD system based on Jenkins, and automated workflow tools including Source-to-Image & Binary-to-Image.
enabled: false # Enable or disable the KubeSphere DevOps System.
# resources: {}
jenkinsMemoryLim: 2Gi # Jenkins memory limit.
jenkinsMemoryLim: 4Gi # Jenkins memory limit.
jenkinsMemoryReq: 1500Mi # Jenkins memory request.
jenkinsVolumeSize: 8Gi # Jenkins volume size.
jenkinsJavaOpts_Xms: 1200m # The following three fields are JVM parameters.
jenkinsJavaOpts_Xmx: 1600m
jenkinsJavaOpts_MaxRAM: 2g
events: # Provide a graphical web console for Kubernetes Events exporting, filtering and alerting in multi-tenant Kubernetes clusters.
enabled: false # Enable or disable the KubeSphere Events System.
# operator:
Expand Down
11 changes: 4 additions & 7 deletions docs/vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,10 @@ alerting:
auditing:
enabled: false
devops:
enabled: false
jenkinsMemoryLim: 2Gi
jenkinsMemoryReq: 1500Mi
jenkinsVolumeSize: 8Gi
jenkinsJavaOpts_Xms: 512m
jenkinsJavaOpts_Xmx: 512m
jenkinsJavaOpts_MaxRAM: 2g
enabled: false # Enable or disable the KubeSphere DevOps System.
jenkinsMemoryLim: 4Gi # Jenkins memory limit.
jenkinsMemoryReq: 1500Mi # Jenkins memory request.
jenkinsVolumeSize: 8Gi # Jenkins volume size.
events:
enabled: false
logging:
Expand Down
6 changes: 3 additions & 3 deletions roles/ks-devops/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ devops:
jenkinsMemoryReq: "{{ jenkins_memory_req |default('4Gi') }}"

JavaOpts: >
-Xms{{ devops.jenkinsJavaOpts_Xms | default('3g') }}
-Xmx{{ devops.jenkinsJavaOpts_Xmx | default('6g') }}
-XX:MaxRAM={{ devops.jenkinsJavaOpts_MaxRAM | default('8g') }}
-XX:MaxRAMPercentage=80 -XX:MinRAMPercentage=60
-Dhudson.slaves.NodeProvisioner.initialDelay=20
-Dhudson.slaves.NodeProvisioner.MARGIN=50
-Dhudson.slaves.NodeProvisioner.MARGIN0=0.85
Expand All @@ -17,6 +15,8 @@ JavaOpts: >
-Dhudson.security.csrf.DefaultCrumbIssuer.EXCLUDE_SESSION_ID=true
-Dio.jenkins.plugins.casc.ConfigurationAsCode.initialDelay=10000
-Djenkins.install.runSetupWizard=false
-XX:+AlwaysPreTouch
-XX:+HeapDumpOnOutOfMemoryError
-XX:+UseG1GC
-XX:+UseStringDeduplication
-XX:+ParallelRefProcEnabled
Expand Down
2 changes: 1 addition & 1 deletion roles/ks-devops/templates/ks-devops-values.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jenkins:
cpu: "0.1"
memory: "{{ devops.jenkinsMemoryReq }}"
limits:
cpu: "1"
cpu: "2"
memory: "{{ devops.jenkinsMemoryLim }}"
JavaOpts: "{{ JavaOpts }}"
Agent:
Expand Down

0 comments on commit 4965bbf

Please sign in to comment.