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

Store heap dump in a persistence volume #68

Merged
merged 7 commits into from
May 23, 2017
23 changes: 23 additions & 0 deletions openshift/keycloak.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ metadata:
creationTimestamp: null
name: keycloak
objects:
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: keycloak-heap-dump
creationTimestamp: null
labels:
app: keycloak
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
status: {}
- kind: DeploymentConfig
apiVersion: v1
metadata:
Expand Down Expand Up @@ -36,6 +50,9 @@ objects:
- containerPort: 8080
protocol: TCP
imagePullPolicy: Always
volumeMounts:
- mountPath: "/opt/jboss/keycloak/heapdumppath"
name: heapdumppath
resources: {}
livenessProbe:
httpGet:
Expand Down Expand Up @@ -106,13 +123,19 @@ objects:
- name: JAVA_OPTS
value: >-
-server -Xms256m -Xmx4096m -XX:MetaspaceSize=96M
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/opt/jboss/keycloak/heapdumppath
-XX:MaxMetaspaceSize=512m -Djava.net.preferIPv4Stack=true
-Djboss.modules.system.pkgs=org.jboss.byteman
-Djava.awt.headless=true
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
volumes:
- name: heapdumppath

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why heapdumppath - maybe simply heapdumps? :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, heapdumps sounds better for me too

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

persistentVolumeClaim:
claimName: keycloak-heap-dump
status: {}
- kind: Service
apiVersion: v1
Expand Down