Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
build-script
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tools
build-script
Commits
6c628cf0
Commit
6c628cf0
authored
Sep 20, 2022
by
liaozan
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add initContainers to make the required folder used for Jvm gc log
parent
e55402c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
Dockerfile
Dockerfile
+1
-1
k8s-deploy-template.yaml
k8s-deploy-template.yaml
+12
-5
No files found.
Dockerfile
View file @
6c628cf0
...
@@ -12,7 +12,7 @@ COPY --from=builder app/application/ ./
...
@@ -12,7 +12,7 @@ COPY --from=builder app/application/ ./
RUN
mkdir
-p
/data/logs
RUN
mkdir
-p
/data/logs
ENV
JVM_OPTS='-XX:MaxRAMPercentage=
9
0 -XX:+AlwaysPreTouch \
ENV
JVM_OPTS='-XX:MaxRAMPercentage=
8
0 -XX:+AlwaysPreTouch \
-XX:+UseG1GC -Xlog:gc*:/data/logs/gc.log:time,uptime \
-XX:+UseG1GC -Xlog:gc*:/data/logs/gc.log:time,uptime \
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/heapdump.hprof \
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/heapdump.hprof \
-XX:-OmitStackTraceInFastThrow -XX:+PrintCommandLineFlags \
-XX:-OmitStackTraceInFastThrow -XX:+PrintCommandLineFlags \
...
...
k8s-deploy-template.yaml
View file @
6c628cf0
...
@@ -25,6 +25,13 @@ spec:
...
@@ -25,6 +25,13 @@ spec:
values
:
values
:
-
${NODE_POOL_ID}
-
${NODE_POOL_ID}
terminationGracePeriodSeconds
:
30
terminationGracePeriodSeconds
:
30
initContainers
:
-
name
:
${APP_NAME}-init
image
:
busybox
command
:
[
'
mkdir'
,
'
-p'
,
"
/data/logs"
]
volumeMounts
:
-
name
:
${APP_NAME}-volume
mountPath
:
/data
containers
:
containers
:
-
name
:
${APP_NAME}
-
name
:
${APP_NAME}
image
:
${IMAGE}
image
:
${IMAGE}
...
@@ -64,9 +71,9 @@ spec:
...
@@ -64,9 +71,9 @@ spec:
periodSeconds
:
10
periodSeconds
:
10
volumeMounts
:
volumeMounts
:
-
name
:
${APP_NAME}-volume
-
name
:
${APP_NAME}-volume
mountPath
:
/
mountPath
:
/
data
volumes
:
volumes
:
name
:
${APP_NAME}-volume
-
name
:
${APP_NAME}-volume
hostPath
:
hostPath
:
path
:
/data/share/pod/data/${APP_NAME}
path
:
/share/pod/data/${APP_NAME}
type
:
DirectoryOrCreate
type
:
DirectoryOrCreate
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment