-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #317 from ONLYOFFICE/release/v4.2.0
Merge Helm Chart release/v4.2.0 into master
- Loading branch information
Showing
22 changed files
with
956 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,5 @@ supplementalGroups: | |
type: MustRunAs | ||
users: [] | ||
groups: [] | ||
seccompProfiles: | ||
- runtime/default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{{- if and (eq (include "ds.clearCache.createConfigMap" .) "true") .Values.clearCache.job.enabled (not .Values.persistence.storageS3) }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: clear-cache | ||
namespace: {{ include "ds.namespace" . | quote }} | ||
{{- if .Values.commonLabels }} | ||
labels: | ||
{{- include "ds.labels.commonLabels" . | trim | nindent 4 }} | ||
{{- end }} | ||
annotations: | ||
"helm.sh/hook": post-upgrade | ||
"helm.sh/hook-weight": "1" | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
{{- if .Values.commonAnnotations }} | ||
{{- include "ds.annotations.commonAnnotations" ( dict "keyName" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
data: | ||
clearCache.sh: |- | ||
#!/bin/bash | ||
FILES_DIR=/var/lib/{{ .Values.product.name }}/documentserver/App_Data/cache/files/ | ||
ls $FILES_DIR > /dev/null | ||
if [ $? -ne 0 ]; then | ||
echo -e "\e[0;31m Error accessing the $FILES_DIR directory \e[0m" | ||
exit 1 | ||
fi | ||
for ENTRY in `ls $FILES_DIR`; do | ||
case $ENTRY in | ||
errors) | ||
;; | ||
forgotten) | ||
;; | ||
{{ .Values.docservice.image.tag }}) | ||
;; | ||
*) | ||
rm -rfv $FILES_DIR$ENTRY | ||
;; | ||
esac | ||
done | ||
echo -e "\e[0;32m Clearing the cache folder is finished \e[0m" | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
{{- if and .Values.clearCache.job.enabled (not .Values.persistence.storageS3) }} | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: clear-cache | ||
namespace: {{ include "ds.namespace" . | quote }} | ||
labels: | ||
app.kubernetes.io/component: clear-cache | ||
{{- if .Values.commonLabels }} | ||
{{- include "ds.labels.commonLabels" . | trim | nindent 4 }} | ||
{{- end }} | ||
annotations: | ||
"helm.sh/hook": post-upgrade | ||
"helm.sh/hook-weight": "2" | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
{{- if or .Values.commonAnnotations .Values.clearCache.job.annotations }} | ||
{{- $dictValue := default .Values.commonAnnotations .Values.clearCache.job.annotations }} | ||
{{- include "ds.annotations.commonAnnotations" ( dict "keyName" $dictValue "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
backoffLimit: 2 | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: clear-cache | ||
{{- if .Values.commonLabels }} | ||
{{- include "ds.labels.commonLabels" . | trim | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.clearCache.job.podAnnotations }} | ||
annotations: {{- include "ds.annotations.commonAnnotations" ( dict "keyName" .Values.clearCache.job.podAnnotations "context" $ ) | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
serviceAccountName: {{ include "ds.serviceAccountName" . }} | ||
{{- if .Values.podSecurityContext.enabled }} | ||
securityContext: {{- toYaml .Values.podSecurityContext.jobs | nindent 8 }} | ||
{{- end }} | ||
{{- if or .Values.clearCache.job.customPodAntiAffinity .Values.clearCache.job.podAffinity .Values.clearCache.job.nodeAffinity }} | ||
affinity: | ||
{{- with .Values.clearCache.job.customPodAntiAffinity }} | ||
podAntiAffinity: | ||
{{- toYaml . | nindent 10 }} | ||
{{- end }} | ||
{{- with .Values.clearCache.job.podAffinity }} | ||
podAffinity: | ||
{{- toYaml . | nindent 10 }} | ||
{{- end }} | ||
{{- with .Values.clearCache.job.nodeAffinity }} | ||
nodeAffinity: | ||
{{- toYaml . | nindent 10 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if or .Values.nodeSelector .Values.clearCache.job.nodeSelector }} | ||
nodeSelector: {{ toYaml (default .Values.nodeSelector .Values.clearCache.job.nodeSelector) | nindent 8 }} | ||
{{- end }} | ||
{{- if or .Values.tolerations .Values.clearCache.job.tolerations }} | ||
tolerations: {{ toYaml (default .Values.tolerations .Values.clearCache.job.tolerations) | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
- name: {{ .Values.imagePullSecrets }} | ||
{{- end }} | ||
volumes: | ||
- name: ds-files | ||
persistentVolumeClaim: | ||
claimName: {{ template "ds.pvc.name" . }} | ||
- name: clear-cache-scripts | ||
configMap: | ||
name: {{ template "ds.clearCache.configMapName" . }} | ||
defaultMode: 0755 | ||
containers: | ||
- name: clear-cache | ||
image: {{ .Values.clearCache.job.image.repository }}:{{ .Values.clearCache.job.image.tag }} | ||
imagePullPolicy: {{ .Values.clearCache.job.image.pullPolicy }} | ||
{{- if .Values.clearCache.job.containerSecurityContext.enabled }} | ||
securityContext: {{- omit .Values.clearCache.job.containerSecurityContext "enabled" | toYaml | nindent 12 }} | ||
{{- end }} | ||
resources: {{- toYaml .Values.clearCache.job.resources | nindent 12 }} | ||
volumeMounts: | ||
- name: ds-files | ||
mountPath: /var/lib/{{ .Values.product.name }}/documentserver/App_Data/cache/files | ||
- name: clear-cache-scripts | ||
mountPath: /scripts/{{ .Values.clearCache.existingConfigmap.keyName }} | ||
subPath: {{ .Values.clearCache.existingConfigmap.keyName }} | ||
command: ["/bin/sh", "-c"] | ||
{{- if .Values.webProxy.enabled }} | ||
args: ["http_proxy={{ .Values.webProxy.http }} https_proxy={{ .Values.webProxy.https }} no_proxy={{ .Values.webProxy.noProxy }} /scripts/{{ .Values.clearCache.existingConfigmap.keyName }}"] | ||
{{- else }} | ||
args: ["/scripts/{{ .Values.clearCache.existingConfigmap.keyName }}"] | ||
{{- end }} | ||
restartPolicy: Never | ||
{{- end }} |
Oops, something went wrong.