-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
None
Current Behaviour
In Bitbucket, sometimes git processes crash, creating large core dump files inside the repositories' locations on the Bitbucket server. This will increase the size of the repositories on the server side. Within Linux, the location of core dumps is controlled by the core_pattern file in /proc/sys/kernel/. As documented in the KB here, the location of the core files can be re-directed using the kernel.core_pattern options. With Kubernetes currently, no such option is available to redirect or entirely disable the core dump.
Suggestion
Provide an option in the helm chart to redirect the core dump location outside the repository location and possibly separate PVC.
Workaround
Currently, it's not possible to modify the entrypoint argument on the pod in the Bitbucket helm chart. However, the template can be changed to disable the core dump on the source itself. The full source of the Bitbucket statefulset.yaml definition can be obtained from here. Update the Bitbucket containers sections as per the following:
containers: - name: {{ if .Values.bitbucket.useHelmReleaseNameAsContainerName}}{{ include "common.names.fullname" . }}{{ else }}{{ .Chart.Name }}{{ end }} command: ["sh"] args: ["-c", "ulimit -c 0; exec /entrypoint.py"] image: {{ include "bitbucket.image" . | quote }} imagePullPolicy: {{ .Values.image.pullPolicy }} ports: ...
Required to redeploy the helm charts after making changes.