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

add sharing config #445

Merged
merged 5 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/ocis/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ maintainers:
url: https://owncloud.com
type: application
version: 0.5.0
appVersion: 5.0.0-alpha.5
appVersion: 5.0.0-alpha.6
kubeVersion: "" # please see https://doc.owncloud.com/ocis/next/deployment/container/orchestration/orchestration.html#get-the-chart for compatible Kubernetes versions
sources:
- https://github.com/owncloud/ocis-charts
Expand Down
2 changes: 1 addition & 1 deletion charts/ocis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[comment]: # (DONT EDIT THIS FILE, it is autogenerated. Instead you need to edit README.md.gotmpl)

# ownCloud Infinite Scale (oCIS) Helm chart
![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 5.0.0-alpha.5](https://img.shields.io/badge/AppVersion-5.0.0--alpha.5-informational?style=flat-square)
![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 5.0.0-alpha.6](https://img.shields.io/badge/AppVersion-5.0.0--alpha.6-informational?style=flat-square)

Installs [ownCloud Infinite Scale](https://doc.owncloud.com/ocis/next/).

Expand Down
2 changes: 1 addition & 1 deletion charts/ocis/templates/frontend/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: sharing-banned-passwords
name: sharing-banned-passwords-{{ .appName }}
namespace: {{ template "ocis.namespace" . }}
labels:
{{- include "ocis.labels" . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/ocis/templates/frontend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,4 @@ spec:
emptyDir: {}
- name: configs
configMap:
name: sharing-banned-passwords
name: sharing-banned-passwords-{{ .appName }}
15 changes: 15 additions & 0 deletions charts/ocis/templates/sharing/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- include "ocis.basicServiceTemplates" (dict "scope" . "appName" "appNameSharing" "appNameSuffix" "") -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: sharing-banned-passwords-{{ .appName }}
namespace: {{ template "ocis.namespace" . }}
labels:
{{- include "ocis.labels" . | nindent 4 }}
data:
sharing-banned-passwords.txt: |-
{{- with .Values.features.sharing.passwordPolicies.bannedPasswords -}}
{{- range . -}}
{{- . | nindent 4 }}
{{- end -}}
{{- end -}}
26 changes: 21 additions & 5 deletions charts/ocis/templates/sharing/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,22 @@ spec:
- name: SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD
value: {{ .Values.features.sharing.publiclink.writeableShareMustHavePassword | quote }}

# TODO: does not exist currently. Probably should be there because we also have SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD!?
# - name: SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD
# value: {{ .Values.features.sharing.publiclink.shareMustHavePassword | quote }}
- name: SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD
value: {{ .Values.features.sharing.publiclink.shareMustHavePassword | quote }}

# password policies
- name: SHARING_PASSWORD_POLICY_MIN_CHARACTERS
value: {{ .Values.features.sharing.passwordPolicies.minCharacters | quote }}
- name: SHARING_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS
value: {{ .Values.features.sharing.passwordPolicies.minLowerCharacters | quote }}
- name: SHARING_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS
value: {{ .Values.features.sharing.passwordPolicies.minUpperCharacters | quote }}
- name: SHARING_PASSWORD_POLICY_MIN_DIGITS
value: {{ .Values.features.sharing.passwordPolicies.minDigits | quote }}
- name: SHARING_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS
value: {{ .Values.features.sharing.passwordPolicies.minSpecialCharacters | quote }}
- name: SHARING_PASSWORD_POLICY_BANNED_PASSWORDS_LIST
value: /etc/ocis/sharing-banned-passwords.txt
d7oc marked this conversation as resolved.
Show resolved Hide resolved

# user sharing
- name: SHARING_USER_DRIVER
Expand Down Expand Up @@ -123,11 +136,11 @@ spec:
volumeMounts:
- name: tmp-volume
mountPath: /tmp
- name: ocis-config-tmp
mountPath: /etc/ocis # we mount that volume only to apply fsGroup to that path
- name: messaging-system-ca
mountPath: /etc/ocis/messaging-system-ca
readOnly: true
- name: configs
mountPath: /etc/ocis

{{- include "ocis.imagePullSecrets" $ | nindent 6 }}
volumes:
Expand All @@ -142,3 +155,6 @@ spec:
{{ else }}
emptyDir: {}
{{ end }}
- name: configs
configMap:
name: sharing-banned-passwords-{{ .appName }}