Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
37a33e1
Add sphinx-copybutton plugin to make copying snippets of code from do…
jschaul Dec 5, 2022
e43c88d
Merge pull request #2979 from wireapp/master
battermann Jan 12, 2023
36507cf
Convert docs from reStructuredText to MyST markdown (#2980)
smatting Jan 12, 2023
4bfc91a
Update Federation docs (#2982)
smatting Jan 12, 2023
4bcf4ea
Inline "Administrator's Guide" one level and
smatting Jan 12, 2023
40201f5
Move configuration options out of install
smatting Jan 12, 2023
460e3b8
Fedcalls cli tool. (#2973)
fisx Jan 13, 2023
6657b85
Add "edit on github" button docs (#2983)
smatting Jan 13, 2023
d83c679
[SQSERVICES-1828] pagination of team members does not work properly f…
battermann Jan 13, 2023
8760b49
Fix Federation Docs errata (#2984)
smatting Jan 13, 2023
8816b3f
Fix `ToSchema Version` instance. (#2978)
fisx Jan 16, 2023
b58e477
Add Helm chart for K8ssandra in test systems (#2981)
supersven Jan 16, 2023
b2c183a
[REFACTORING] ID tag expand abbreviation to full name (#2991)
battermann Jan 17, 2023
37d9b3f
Refactor Writetime (#2994)
smatting Jan 17, 2023
b2d243a
[SQSERVICES-1848] Flaky test team user search query with paging state…
battermann Jan 17, 2023
c21e6a3
Fix v3 leak in get-conversation endpoints (#2992)
pcapriotti Jan 18, 2023
8b2e9af
Update inbucket (fake smtp server) chart dependency (#2998)
supersven Jan 18, 2023
58b7617
Chart compatibility kubernetes 1.22 (#3002)
jschaul Jan 19, 2023
35b9ba8
Update docs: How to view swagger locally (#3005)
smatting Jan 19, 2023
73d79d3
Hook fedcalls into api docs (#2988)
fisx Jan 20, 2023
f669c80
Merge pull request #2900 from wireapp/docs-copybutton
arthurwolf Jan 22, 2023
8c589be
Don't remove global cabal store in 'make full-clean'. (#3000)
fisx Jan 23, 2023
a0f44f6
Prekeys investigation: test (#2694)
jschaul Jan 23, 2023
82a0a59
Document a function
Jan 24, 2023
804a3b5
Add a changelog
Jan 24, 2023
89b7ce7
Revert "Add a changelog"
Jan 24, 2023
7d322f5
Revert "Document a function"
Jan 24, 2023
30f1d44
Changing `helm_vars` to `values` in deeplink docs
arthurwolf Jan 24, 2023
4d1f02e
Fix kind setup for running end-to-end federation tests locally (#3008)
akshaymankar Jan 24, 2023
2ad0819
Restructure documentation (#2986)
smatting Jan 25, 2023
0bd7425
fix Makefile kind-restart-all target (#3015)
stefanwire Jan 25, 2023
376f469
Removed unused old swagger code (#3017)
battermann Jan 25, 2023
246470f
chore: [charts] Update team-settings version (#3016)
zebot Jan 25, 2023
f6b2f93
Mock combinators (#3014)
pcapriotti Jan 25, 2023
7922ccc
chore: [charts] Update webapp version (#3011)
zebot Jan 25, 2023
589a027
Github Workflow: dont use environment for secrets (#3021)
smatting Jan 26, 2023
e345ca3
charts/galley/configmap: remove duplicate feature flag searchVisibili…
lucendio Jan 26, 2023
0e16249
document helm chart upgrades after k8s version upgrades (#3019)
jschaul Jan 26, 2023
24d754c
Add changelog for Release 2023-01-26
zebot Jan 26, 2023
13640b5
Fix CHANGELOG.md
supersven Jan 26, 2023
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: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
jobs:
treefmt:
name: Run treefmt
environment: cachix # for secrets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -25,7 +24,6 @@ jobs:

build-docs:
name: Build docs
environment: cachix
runs-on: ubuntu-latest
permissions:
id-token: write
Expand Down
77 changes: 77 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,80 @@
# [2023-01-26] (Chart Release 4.31.0)

## Release notes


* wire-server helm charts using Ingress resources are now compatible with kubernetes versions 1.22, 1.23 and 1.24 (but remain compatible with older versions of kubernetes).

If you upgrade to this version of helm charts and/or you upgrade your version of kubernetes while wire-server is deployed, you may find that `helm update` or `helmfile apply/sync` gives an error like this:

> Error: UPGRADE FAILED: current release manifest contains removed kubernetes api(s) for this kubernetes version and it is therefore unable to build the kubernetes objects for performing the diff. error from kubernetes: unable to recognize "": no matches for kind "Ingress" in version "extensions/v1beta1"

In which case you can use the [helm mapkubeapis plugin](https://github.com/helm/helm-mapkubeapis) to upgrade an existing release with the following command:

```sh
# install plugin version 0.1.0 (more recent may not work)
helm plugin install --version v0.1.0 https://github.com/helm/helm-mapkubeapis
# adjust helm release name and namespace as required
helm mapkubeapis --namespace wire nginx-ingress-services
```

Alternatively, if a few minutes of downtime are not a problem; you can `helm delete` a release and re-install it again, which will work without the above plugin. (#3002)

* Upgrade team-settings version to 4.14.0-v0.31.9-0-bf82b46 (#2180)

* Upgrade webapp version to 2023-01-24-production.0-v0.31.9-0-17b742f (#2302)


## API changes


* The unqualified `GET /conversations/:id` endpoint has been removed from API v3, and is restored to the previous behaviour of returning a Conversation using the v2 schema. Similarly, its qualified counterpart `GET /conversations/:domain/:id` now returns a v2 Conversation when accessed through API v2. (#2992)


## Bug fixes and other updates


* Fix pagination in team user search (make search key unique) (#2968)

* Update `inbucket` (fake smtp server) chart dependency: The prior version relied on an image that has been removed from docker hub. Thus, our own `inbucket` chart could not be deployed anymore. (#2998)


## Documentation


* Add sphinx-copybutton plugin to make copying snippets of code from docs.wire.com easier. (#2900)

* Hook federated API call documentation into docs.wire.com (manually). (#2988)

* Tool for dumping fed call graphs (dot/graphviz and csv); see README for details (#2973)


## Internal changes


* Add Helm chart to configure clusters managed by k8ssandra-operator for test environments. (#2981)

* Fix kind setup for running end-to-end federation tests locally. (#3008)

* Fix Makefile target kind-restart-all. (#3015)

* Add combinators for creating mocked federator responses in integration tests (#3014)

* Add two integration tests arounds last prekeys (#2694)

* Fix `make clean` (#2965, #2978)

* Make ID tags more readable by expanding abbreviations to full names. (#2991)

* Unused old swagger code removed from stern and team features (#3017)

* Refactor Writetime from Int64 to wrapper of UTCTime (#2994)

* Restructure docs.wire.com (#2986)

* Fixed flaky team user search integration test (#2996)


# [2023-01-12] (Chart Release 4.30.0)

## Release notes
Expand Down
23 changes: 16 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ CHARTS_INTEGRATION := wire-server databases-ephemeral redis-cluster fake-aws
# (e.g. move charts/brig to charts/wire-server/brig)
# this list could be generated from the folder names under ./charts/ like so:
# CHARTS_RELEASE := $(shell find charts/ -maxdepth 1 -type d | xargs -n 1 basename | grep -v charts)
CHARTS_RELEASE := wire-server redis-ephemeral redis-cluster databases-ephemeral fake-aws fake-aws-s3 fake-aws-sqs aws-ingress fluent-bit kibana backoffice calling-test demo-smtp elasticsearch-curator elasticsearch-external elasticsearch-ephemeral minio-external cassandra-external nginx-ingress-controller nginx-ingress-services reaper sftd restund coturn inbucket
CHARTS_RELEASE := wire-server redis-ephemeral redis-cluster databases-ephemeral \
fake-aws fake-aws-s3 fake-aws-sqs aws-ingress fluent-bit kibana backoffice \
calling-test demo-smtp elasticsearch-curator elasticsearch-external \
elasticsearch-ephemeral minio-external cassandra-external \
nginx-ingress-controller nginx-ingress-services reaper sftd restund coturn \
inbucket k8ssandra-test-cluster
KIND_CLUSTER_NAME := wire-server

package ?= all
Expand Down Expand Up @@ -47,13 +52,9 @@ install: init
.PHONY: full-clean
full-clean: clean
rm -rf ~/.cache/hie-bios
ifdef CABAL_DIR
rm -rf $(CABAL_DIR)/store
else
rm -rf ~/.cabal/store
endif
rm -rf ./dist-newstyle ./.env
direnv reload
@echo -e "\n\n*** NOTE: you may want to also 'rm -rf ~/.cabal/store \$$CABAL_DIR/store', not sure.\n"

.PHONY: clean
clean:
Expand Down Expand Up @@ -437,6 +438,14 @@ kind-delete:
.PHONY: kind-reset
kind-reset: kind-delete kind-cluster

.PHONY: kind-upload-images
kind-upload-images:
DOCKER_TAG=$(DOCKER_TAG) KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) ./hack/bin/kind-upload-images.sh

.PHONY: kind-upload-image
kind-upload-image-%:
DOCKER_TAG=$(DOCKER_TAG) KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) ./hack/bin/kind-upload-image.sh wireServer.imagesUnoptimizedNoDocs.$(*)

.local/kind-kubeconfig:
mkdir -p $(CURDIR)/.local
kind get kubeconfig --name $(KIND_CLUSTER_NAME) > $(CURDIR)/.local/kind-kubeconfig
Expand Down Expand Up @@ -479,7 +488,7 @@ kind-integration-e2e: .local/kind-kubeconfig
kind-restart-all: .local/kind-kubeconfig
export KUBECONFIG=$(CURDIR)/.local/kind-kubeconfig && \
kubectl delete pod -n $(NAMESPACE) -l release=$(NAMESPACE)-wire-server && \
kubectl delete pod -n $(NAMESPACE)-fed2 -l release=$(NAMESPACE)-fed2-wire-server
kubectl delete pod -n $(NAMESPACE)-fed2 -l release=$(NAMESPACE)-wire-server-2

kind-restart-nginx-ingress: .local/kind-kubeconfig
export KUBECONFIG=$(CURDIR)/.local/kind-kubeconfig && \
Expand Down
7 changes: 4 additions & 3 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ packages:
, tools/api-simulations/
, tools/db/assets/
, tools/db/auto-whitelist/
, tools/db/migrate-sso-feature-flag/
, tools/db/service-backfill/
, tools/db/billing-team-member-backfill/
, tools/db/find-undead/
, tools/db/inconsistencies/
, tools/db/migrate-sso-feature-flag/
, tools/db/move-team/
, tools/db/repair-handles/
, tools/db/inconsistencies/
, tools/db/service-backfill/
, tools/fedcalls/
, tools/rex/
, tools/stern/

Expand Down
10 changes: 0 additions & 10 deletions charts/elasticsearch-ephemeral/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,3 @@ We truncate at 53 chars (63 - len("-discovery")) because some Kubernetes name fi
{{- printf "%s" $name | trunc 53 | trimSuffix "-" -}}
{{- end -}}

{{/*
Return the appropriate apiVersion for Curactor cron job.
*/}}
{{- define "curator.cronJob.apiVersion" -}}
{{- if ge .Capabilities.KubeVersion.Minor "8" -}}
"batch/v1beta1"
{{- else -}}
"batch/v2alpha1"
{{- end -}}
{{- end -}}
4 changes: 0 additions & 4 deletions charts/galley/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ data:
conversationGuestLinks:
{{- toYaml .settings.featureFlags.conversationGuestLinks | nindent 10 }}
{{- end }}
{{- if .settings.featureFlags.searchVisibilityInbound }}
searchVisibilityInbound:
{{- toYaml .settings.featureFlags.searchVisibilityInbound | nindent 10 }}
{{- end }}
{{- if .settings.featureFlags.mls }}
mls:
{{- toYaml .settings.featureFlags.mls | nindent 10 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/inbucket/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies:
- name: inbucket
version: 2.0.1
version: 2.1.0
repository: https://inbucket.github.io/inbucket-community
26 changes: 26 additions & 0 deletions charts/inbucket/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{/* Allow KubeVersion to be overridden. */}}
{{- define "kubeVersion" -}}
{{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}}
{{- end -}}

{{/* Get Ingress API Version */}}
{{- define "ingress.apiVersion" -}}
{{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" (include "kubeVersion" .)) -}}
{{- print "networking.k8s.io/v1" -}}
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
{{- print "networking.k8s.io/v1beta1" -}}
{{- else -}}
{{- print "extensions/v1beta1" -}}
{{- end -}}
{{- end -}}

{{/* Check Ingress stability */}}
{{- define "ingress.isStable" -}}
{{- eq (include "ingress.apiVersion" .) "networking.k8s.io/v1" -}}
{{- end -}}

{{/* Check Ingress supports pathType */}}
{{/* pathType was added to networking.k8s.io/v1beta1 in Kubernetes 1.18 */}}
{{- define "ingress.supportsPathType" -}}
{{- or (eq (include "ingress.isStable" .) "true") (and (eq (include "ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" (include "kubeVersion" .))) -}}
{{- end -}}
14 changes: 13 additions & 1 deletion charts/inbucket/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
apiVersion: extensions/v1beta1
{{- $apiIsStable := eq (include "ingress.isStable" .) "true" -}}
{{- $ingressSupportsPathType := eq (include "ingress.supportsPathType" .) "true" -}}
apiVersion: {{ include "ingress.apiVersion" . }}
kind: Ingress
metadata:
name: "inbucket"
Expand All @@ -14,6 +16,16 @@ spec:
http:
paths:
- path: /
{{- if $ingressSupportsPathType }}
pathType: Prefix
{{- end }}
backend:
{{- if $apiIsStable }}
service:
name: {{ include "inbucket.fullname" . }}
port:
name: http
{{- else }}
serviceName: {{ include "inbucket.fullname" . }}
servicePort: http
{{- end }}
23 changes: 23 additions & 0 deletions charts/k8ssandra-test-cluster/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
9 changes: 9 additions & 0 deletions charts/k8ssandra-test-cluster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v2
name: k8ssandra-test-cluster
description: K8ssandra (Cassandra cluster) K8ssandraCluster object for wire test servers. (This does not install K8ssandra itself!)

type: application

version: 0.1.0

appVersion: "0.39.2"
89 changes: 89 additions & 0 deletions charts/k8ssandra-test-cluster/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# k8ssandra-test-cluster Helm chart

`k8ssandra-test-cluster` provides a `K8ssandraCluster` object to create a
*Cassandra* database with
[`k8ssandra-operator`](https://artifacthub.io/packages/helm/k8ssandra/k8ssandra-operator).
**It does not install `k8ssandra-operator` itself!** This configuration is meant
to be used in test environments: **It lacks crucial parts like backups
(`medusa`)!**

## Usage in Helmfile

### Prerequisites

You need a *storage class* that can automatically request storage volumes. For
Hetzner's cloud see: [Container Storage Interface driver for Hetzner
Cloud](https://github.com/hetznercloud/csi-driver)

### Usage

These entries are used in the `helfile` file:

``` yaml
...

repositories:
- name: wire
url: 'https://s3-eu-west-1.amazonaws.com/public.wire.com/charts'
- name: k8ssandra-stable
url: https://helm.k8ssandra.io/stable

...

releases:
- name: k8ssandra-operator
chart: 'k8ssandra-stable/k8ssandra-operator'
namespace: databases
version: 0.39.2
values:
# Use a cass-operator image that is compatible to the K8s cluster version
- cass-operator:
image:
tag: v1.10.5

# Installs CDRs automatically
- name: k8ssandra-test-cluster
chart: "wire/k8ssandra-test-cluster"
namespace: "databases"
version: {{ .Values.wireChartVersion | quote }}
needs:
- 'databases/k8ssandra-operator'
wait: true
waitForJobs: true

- name: 'wire-server'
namespace: 'wire'
chart: 'wire/wire-server'
version: {{ .Values.wireChartVersion | quote }}
values:
- './helm_vars/wire-server/values.yaml.gotmpl'
secrets:
- './helm_vars/wire-server/secrets.yaml'
needs:
- 'databases/k8ssandra-test-cluster'

...
```

Please note the `needs` relations of the releases: `wire-server` *needs*
`k8ssandra-test-cluster` which *needs* `k8ssandra-operator`.

`wait` and `waitForJobs` are mandatory for `k8ssandra-test-cluster` in this
setup: These settings ensure that the database really exists before resuming
with the deployment.

## Implementation details

### k8ssandra-cluster.yaml

Contains the `K8ssandraCluster` object. Its schema is described in the [CRD
reference](https://docs-v2.k8ssandra.io/reference/crd/k8ssandra-operator-crds-latest/#k8ssandracluster)

The specified *Cassandra* cluster runs on a single Node with reasonable
resources for test environments.

### check-cluster-job.yaml

Defines a job that tries to connect to the final *Cassandra* database. Other
deployments can wait on this. This is useful because `wire-server` needs a
working database right from the beginning of it's deployment.
19 changes: 19 additions & 0 deletions charts/k8ssandra-test-cluster/templates/check-cluster-job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This job fails until the Cassandra created database is reachable. The Helmfile
# deployment can wait for it. This is used to start wire-server deployments only
# with a reachable database.
apiVersion: batch/v1
kind: Job
metadata:
name: check-cluster-job
namespace: databases
spec:
template:
spec:
containers:
- name: cassandra
image: cassandra:3.11
command: ["cqlsh", "k8ssandra-cluster-datacenter-1-service"]
restartPolicy: OnFailure
# Default is 6 retries. 8 is a bit arbitrary, but should be sufficient for
# low resource environments (e.g. Wire-in-a-box.)
backoffLimit: 8
Loading