Skip to content
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
35 changes: 34 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,37 @@
<!-- if you're not the release manager, do your edits to changelog under CHANGELOG.d/ -->
# [2022-02-02]

## Release notes


* Upgrade webapp version to 2022-01-27-production.0-v0.28.29-0-42c9a1e (#2078)


## Features


* Allow brig's additionalWriteIndex to be on a different ElasticSearch cluster.
This allows migrating to a new ElasticSearch cluster. (#2063)

* The file sharing team feature now has a server wide configurable lock status. For more information please refer to [/docs/reference/config-options.md#file-sharing](https://github.com/wireapp/wire-server/blob/develop/docs/reference/config-options.md#file-sharing). (#2059)


## Internal changes


* Remove non-existing functions from module export lists (#2095)

* Rename Spar.Sem.IdP to Spar.Sem.IdPConfigStore (#2067)

* Endpoints based on `MultiVerb` can now be made to return content types not listed in the `Accept` header (#2074)

* The lock status of the file sharing team feature can be updated via the internal API (`PUT /i/teams/:tid/features/fileSharing/(un)?locked`). (#2059)

* Servantify Galley Teams API (`GET /teams/:tid` and `DELETE /teams/:tid`). (#2092)

* Add explicit export lists to all Spar.Sem modules (#2070)

* Separate some Spar.Sem utility functions into their own module (#2069)


# [2022-01-28]

Expand Down
108 changes: 108 additions & 0 deletions charts/cassandra-migrations/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{{- define "cassandraGalleyHost" -}}
{{ $cassandraGalley := default dict .Values.cassandraGalley }}
{{- default (.Values.cassandra.host) $cassandraGalley.host }}
{{- end -}}

{{- define "cassandraBrigHost" -}}
{{ $cassandraBrig := default dict .Values.cassandraBrig }}
{{- default (.Values.cassandra.host) $cassandraBrig.host }}
{{- end -}}

{{- define "cassandraGundeckHost" -}}
{{ $cassandraGundeck := default dict .Values.cassandraGundeck }}
{{- default (.Values.cassandra.host) $cassandraGundeck.host }}
{{- end -}}

{{- define "cassandraSparHost" -}}
{{ $cassandraSpar := default dict .Values.cassandraSpar }}
{{- default (.Values.cassandra.host) $cassandraSpar.host }}
{{- end -}}

{{/*
Note: in the past, 'replicaCount' was used, this fallback is only used
for backwards-compatibility with already-installed charts to not break existing installations.

Thus the order of priority is:

1. cassandraGalley.replicationMap
2. cassandra.replicationMap
3. cassandraGalley.replicationFactor
4. cassandra.replicationFactor
5. cassandra.replicaCount

*/}}

{{- define "cassandraGalleyReplicationArg" -}}
{{ $cassandraGalley := default dict .Values.cassandraGalley }}
{{- if (or .Values.cassandra.replicationMap $cassandraGalley.replicationMap) -}}
{{- default (.Values.cassandra.replicationMap) $cassandraGalley.replicationMap -}}
{{- else -}}
{{- default (default (.Values.cassandra.replicaCount) .Values.cassandra.replicationFactor) $cassandraGalley.replicationFactor -}}
{{- end -}}
{{- end -}}

{{- define "cassandraGalleyReplicationType" -}}
{{ $cassandraGalley := default dict .Values.cassandraGalley }}
{{- if (or .Values.cassandra.replicationMap $cassandraGalley.replicationMap) -}}
{{- printf "--replication-map" -}}
{{- else -}}
{{- printf "--replication-factor" -}}
{{- end -}}
{{- end -}}


{{- define "cassandraGundeckReplicationArg" -}}
{{ $cassandraGundeck := default dict .Values.cassandraGundeck }}
{{- if (or .Values.cassandra.replicationMap $cassandraGundeck.replicationMap) -}}
{{- default (.Values.cassandra.replicationMap) $cassandraGundeck.replicationMap -}}
{{- else -}}
{{- default (default (.Values.cassandra.replicaCount) .Values.cassandra.replicationFactor) $cassandraGundeck.replicationFactor -}}
{{- end -}}
{{- end -}}

{{- define "cassandraGundeckReplicationType" -}}
{{ $cassandraGundeck := default dict .Values.cassandraGundeck }}
{{- if (or .Values.cassandra.replicationMap $cassandraGundeck.replicationMap) -}}
{{- printf "--replication-map" -}}
{{- else -}}
{{- printf "--replication-factor" -}}
{{- end -}}
{{- end -}}


{{- define "cassandraBrigReplicationArg" -}}
{{ $cassandraBrig := default dict .Values.cassandraBrig }}
{{- if (or .Values.cassandra.replicationMap $cassandraBrig.replicationMap) -}}
{{- default (.Values.cassandra.replicationMap) $cassandraBrig.replicationMap -}}
{{- else -}}
{{- default (default (.Values.cassandra.replicaCount) .Values.cassandra.replicationFactor) $cassandraBrig.replicationFactor -}}
{{- end -}}
{{- end -}}

{{- define "cassandraBrigReplicationType" -}}
{{ $cassandraBrig := default dict .Values.cassandraBrig }}
{{- if (or .Values.cassandra.replicationMap $cassandraBrig.replicationMap) -}}
{{- printf "--replication-map" -}}
{{- else -}}
{{- printf "--replication-factor" -}}
{{- end -}}
{{- end -}}


{{- define "cassandraSparReplicationArg" -}}
{{ $cassandraSpar := default dict .Values.cassandraSpar }}
{{- if (or .Values.cassandra.replicationMap $cassandraSpar.replicationMap) -}}
{{- default (.Values.cassandra.replicationMap) $cassandraSpar.replicationMap -}}
{{- else -}}
{{- default (default (.Values.cassandra.replicaCount) .Values.cassandra.replicationFactor) $cassandraSpar.replicationFactor -}}
{{- end -}}
{{- end -}}

{{- define "cassandraSparReplicationType" -}}
{{ $cassandraSpar := default dict .Values.cassandraSpar }}
{{- if (or .Values.cassandra.replicationMap $cassandraSpar.replicationMap) -}}
{{- printf "--replication-map" -}}
{{- else -}}
{{- printf "--replication-factor" -}}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This jobs runs migrations on the galley DB using the galley-migrate-data tool.
# The source for the tool can be found at services/galley in the wire-server
# repository.
{{- if .Values.enableGalleyMigrations }}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down Expand Up @@ -32,8 +33,9 @@ spec:
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
args:
- --cassandra-host
- "{{ .Values.cassandra.host }}"
- "{{ template "cassandraGalleyHost" . }}"
- --cassandra-port
- "9042"
- --cassandra-keyspace
- galley
{{- end }}
33 changes: 21 additions & 12 deletions charts/cassandra-migrations/templates/migrate-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,61 +23,70 @@ spec:
# to avoid 'Column family ID mismatch' / schema disagreements
# see https://stackoverflow.com/questions/29030661/creating-new-table-with-cqlsh-on-existing-keyspace-column-family-id-mismatch#40325651 for details.
initContainers:
{{- if .Values.enableGundeckMigrations }}
- name: gundeck-schema
image: "{{ .Values.images.gundeck }}:{{ .Values.images.tag }}"
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
command:
- gundeck-schema
- --host
- "{{ .Values.cassandra.host }}"
- "{{ template "cassandraGundeckHost" . }}"
- --port
- "9042"
- --keyspace
- gundeck
- --replication-factor
- "{{ .Values.cassandra.replicaCount }}"
- {{ template "cassandraGundeckReplicationType" . }}
- "{{ template "cassandraGundeckReplicationArg" . }}"
{{- end }}

{{- if .Values.enableBrigMigrations }}
- name: brig-schema
image: "{{ .Values.images.brig }}:{{ .Values.images.tag }}"
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
command:
- brig-schema
- --host
- "{{ .Values.cassandra.host }}"
- "{{ template "cassandraBrigHost" . }}"
- --port
- "9042"
- --keyspace
- brig
- --replication-factor
- "{{ .Values.cassandra.replicaCount }}"
- {{ template "cassandraBrigReplicationType" . }}
- "{{ template "cassandraBrigReplicationArg" . }}"
{{- end }}

{{- if .Values.enableGalleyMigrations }}
- name: galley-schema
image: "{{ .Values.images.galley }}:{{ .Values.images.tag }}"
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
command:
- galley-schema
- --host
- "{{ .Values.cassandra.host }}"
- "{{ template "cassandraGalleyHost" . }}"
- --port
- "9042"
- --keyspace
- galley
- --replication-factor
- "{{ .Values.cassandra.replicaCount }}"
- {{ template "cassandraGalleyReplicationType" . }}
- "{{ template "cassandraGalleyReplicationArg" . }}"
{{- end }}

{{- if .Values.enableSparMigrations }}
- name: spar-schema
image: "{{ .Values.images.spar }}:{{ .Values.images.tag }}"
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
command:
- spar-schema
- --host
- "{{ .Values.cassandra.host }}"
- "{{ template "cassandraSparHost" . }}"
- --port
- "9042"
- --keyspace
- spar
- --replication-factor
- "{{ .Values.cassandra.replicaCount }}"
- {{ template "cassandraSparReplicationType" . }}
- "{{ template "cassandraSparReplicationArg" . }}"
{{- end }}

containers:
- name: job-done
image: busybox:1.32.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This jobs runs data migrations for the spar DB using the spar-migrate-data tool.
# The source for the tool can be found at services/spar/migrate-data
#
{{- if (and .Values.enableSparMigrations .Values.enableBrigMigrations) }}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down Expand Up @@ -32,14 +33,15 @@ spec:
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
args:
- --cassandra-host-spar
- "{{ .Values.cassandra.host }}"
- "{{ template "cassandraSparHost" . }}"
- --cassandra-port-spar
- "9042"
- --cassandra-keyspace-spar
- spar
- --cassandra-host-brig
- "{{ .Values.cassandra.host }}"
- "{{ template "cassandraBrigHost" . }}"
- --cassandra-port-brig
- "9042"
- --cassandra-keyspace-brig
- brig
{{- end }}
49 changes: 49 additions & 0 deletions charts/cassandra-migrations/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,52 @@ images:
spar: quay.io/wire/spar-schema
galleyMigrateData: quay.io/wire/galley-migrate-data
sparMigrateData: quay.io/wire/spar-migrate-data

# Setting cassandra host name and replication is mandatory to specify.
#
# Example production case:
#
# cassandra:
# host: cassandra-external
# replicationFactor: 3
#
# Example demo case (single cassandra machine, test deployment):
#
# cassandra:
# host: cassandra-ephemeral
# replicationFactor: 1
#
# The following is optional and useful only in a multi-datacenter setup.
# if 'replicationMap' is set, it's used; otherwise replicationFactor is used.
#
# cassandra:
# replicationMap: DC1:3,DC2:5
#
# The following is optional. If set, it overrides the otherwise-used
# cassandra.host and cassandra.replicationFactor / replicationMap for
# the specific haskell service in case you have separate
# cassandra clusters for each service.
#
# cassandraGalley:
# host: cassandra-ephemeral-galley
# replicationMap: eu-west-1:3
#
# cassandraBrig:
# host: cassandra-ephemeral-galley
# replicationMap: eu-central-1:3
#
# cassandraSpar:
# host: cassandra-ephemeral-galley
# replicationMap: us-east-1:3
#
# cassandraGundeck:
# host: cassandra-ephemeral-galley
# replicationMap: eu-west-1:3


# Overriding the following is only useful during datacenter migration time periods,
# where some other job already migrates schemas.
enableGalleyMigrations: true
enableBrigMigrations: true
enableGundeckMigrations: true
enableSparMigrations: true
4 changes: 4 additions & 0 deletions charts/galley/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,9 @@ data:
teamSearchVisibility: {{ .settings.featureFlags.teamSearchVisibility }}
classifiedDomains:
{{- toYaml .settings.featureFlags.classifiedDomains | nindent 10 }}
{{- if .settings.featureFlags.fileSharing }}
fileSharing:
{{- toYaml .settings.featureFlags.fileSharing | nindent 10 }}
{{- end }}
{{- end }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/galley/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ config:
status: disabled
config:
domains: []
# fileSharing setting is optional
# if not set the default feature status is enabled and the default lock status is unlocked
# fileSharing:
# defaults:
# status: enabled
# lockStatus: unlocked
aws:
region: "eu-west-1"
proxy: {}
1 change: 1 addition & 0 deletions docs/reference/cassandra-schema.cql
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ CREATE TABLE galley_test.team_features (
conference_calling int,
digital_signatures int,
file_sharing int,
file_sharing_lock_status int,
guest_links_lock_status int,
guest_links_status int,
legalhold_status int,
Expand Down
Loading