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
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,10 @@ directory.

## Notes and pre-requisites

- The [postgres-operator](https://github.com/CrunchyData/postgres-operator)
needs to be installed. Specifically the `PostgresCluster` CRD is required.
This is only required if you intend to deploy a PostgreSQL instance alongside
Synapse.
- Tested on OpenShift 4.9.0

# Related links

- [Matrix project homepage](https://matrix.org/)
- [Synape Repository](https://github.com/matrix-org/synapse/)
- [postgres-operator](https://github.com/CrunchyData/postgres-operator)
- [Heisenbridge](https://github.com/hifi/heisenbridge)
29 changes: 0 additions & 29 deletions api/synapse/v1alpha1/synapse_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ type SynapseSpec struct {

// +kubebuilder:default:=false

// Set to true to create a new PostreSQL instance. The homeserver.yaml
// 'database' section will be overwritten.
CreateNewPostgreSQL bool `json:"createNewPostgreSQL,omitempty"`

// +kubebuilder:default:=false

// Set to true if deploying on OpenShift
IsOpenshift bool `json:"isOpenshift,omitempty"`
}
Expand Down Expand Up @@ -89,12 +83,6 @@ type SynapseHomeserverValues struct {

// SynapseStatus defines the observed state of Synapse.
type SynapseStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Connection information to the external PostgreSQL Database
DatabaseConnectionInfo SynapseStatusDatabaseConnectionInfo `json:"databaseConnectionInfo,omitempty"`

// Holds configuration information for Synapse
HomeserverConfiguration SynapseStatusHomeserverConfiguration `json:"homeserverConfiguration,omitempty"`

Expand Down Expand Up @@ -137,23 +125,6 @@ type SynapseStatusBridgesMautrixSignal struct {
Name string `json:"name,omitempty"`
}

type SynapseStatusDatabaseConnectionInfo struct {
// Endpoint to connect to the PostgreSQL database
ConnectionURL string `json:"connectionURL,omitempty"`

// Name of the database to connect to
DatabaseName string `json:"databaseName,omitempty"`

// User allowed to query the given database
User string `json:"user,omitempty"`

// Base64 encoded password
Password string `json:"password,omitempty"`

// State of the PostgreSQL database
State string `json:"State,omitempty"`
}

type SynapseStatusHomeserverConfiguration struct {
// The public-facing domain of the server
ServerName string `json:"serverName,omitempty"`
Expand Down
16 changes: 0 additions & 16 deletions api/synapse/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 1 addition & 14 deletions bundle/manifests/synapse-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ metadata:
"name": "synapse-sample"
},
"spec": {
"createNewPostgreSQL": false,
"homeserver": {
"values": {
"reportStats": true,
Expand All @@ -60,7 +59,7 @@ metadata:
capabilities: Basic Install
categories: Developer Tools
containerImage: quay.io/opdev/synapse-operator
createdAt: "2025-08-15T10:29:51Z"
createdAt: "2025-11-28T12:00:17Z"
description: Deploys and manages the lifecycle of Synapse servers and their associated
components (bridges, databases, ...). Synapse is the reference Matrix homeserver
implementation.
Expand Down Expand Up @@ -126,18 +125,6 @@ spec:
- patch
- update
- watch
- apiGroups:
- postgres-operator.crunchydata.com
resources:
- postgresclusters
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
Expand Down
25 changes: 0 additions & 25 deletions bundle/manifests/synapse.opdev.io_synapses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ spec:
spec:
description: SynapseSpec defines the desired state of Synapse.
properties:
createNewPostgreSQL:
default: false
description: |-
Set to true to create a new PostreSQL instance. The homeserver.yaml
'database' section will be overwritten.
type: boolean
homeserver:
description: |-
Holds information related to the homeserver.yaml configuration file.
Expand Down Expand Up @@ -133,25 +127,6 @@ spec:
type: string
type: object
type: object
databaseConnectionInfo:
description: Connection information to the external PostgreSQL Database
properties:
State:
description: State of the PostgreSQL database
type: string
connectionURL:
description: Endpoint to connect to the PostgreSQL database
type: string
databaseName:
description: Name of the database to connect to
type: string
password:
description: Base64 encoded password
type: string
user:
description: User allowed to query the given database
type: string
type: object
homeserverConfiguration:
description: Holds configuration information for Synapse
properties:
Expand Down
3 changes: 0 additions & 3 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ import (
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"

pgov1beta1 "github.com/crunchydata/postgres-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1"

synapsev1alpha1 "github.com/opdev/synapse-operator/api/synapse/v1alpha1"
heisenbridgecontroller "github.com/opdev/synapse-operator/internal/controller/synapse/heisenbridge"
mautrixsignalcontroller "github.com/opdev/synapse-operator/internal/controller/synapse/mautrixsignal"
Expand All @@ -55,7 +53,6 @@ func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme))

utilruntime.Must(synapsev1alpha1.AddToScheme(scheme))
utilruntime.Must(pgov1beta1.AddToScheme(scheme))
// +kubebuilder:scaffold:scheme
}

Expand Down
25 changes: 0 additions & 25 deletions config/crd/bases/synapse.opdev.io_synapses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ spec:
spec:
description: SynapseSpec defines the desired state of Synapse.
properties:
createNewPostgreSQL:
default: false
description: |-
Set to true to create a new PostreSQL instance. The homeserver.yaml
'database' section will be overwritten.
type: boolean
homeserver:
description: |-
Holds information related to the homeserver.yaml configuration file.
Expand Down Expand Up @@ -128,25 +122,6 @@ spec:
type: string
type: object
type: object
databaseConnectionInfo:
description: Connection information to the external PostgreSQL Database
properties:
State:
description: State of the PostgreSQL database
type: string
connectionURL:
description: Endpoint to connect to the PostgreSQL database
type: string
databaseName:
description: Name of the database to connect to
type: string
password:
description: Base64 encoded password
type: string
user:
description: User allowed to query the given database
type: string
type: object
homeserverConfiguration:
description: Holds configuration information for Synapse
properties:
Expand Down
12 changes: 0 additions & 12 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,6 @@ rules:
- patch
- update
- watch
- apiGroups:
- postgres-operator.crunchydata.com
resources:
- postgresclusters
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
Expand Down
1 change: 0 additions & 1 deletion config/samples/synapse_v1alpha1_synapse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ metadata:
app.kubernetes.io/managed-by: kustomize
name: synapse-sample
spec:
createNewPostgreSQL: false
homeserver:
values:
serverName: my.matrix.host
Expand Down
10 changes: 0 additions & 10 deletions examples/03-deploying-postgresql/synapse.yaml

This file was deleted.

58 changes: 0 additions & 58 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ metadata:
resourceVersion: "98298"
uid: 086652b1-9ba9-40ed-9223-1336db12681d
spec:
createNewPostgreSQL: false
homeserver:
values:
reportStats: true
Expand Down Expand Up @@ -126,63 +125,6 @@ $ kubectl delete configmap my-custom-homeserver
configmap "my-custom-homeserver" deleted
```

## [DEPRECATED] Deploying a PostgreSQL instance for Synapse

> [!WARNING]
> This feature is not tested on recent versions of the Synapse Operator and
> will be removed in the future

> [!NOTE]
> *Pre-requisite:* The deployment of a PostgreSQL instance relies on the
> [postgres-operator](https://github.com/CrunchyData/postgres-operator). Make
> sure it is running on your cluster if you want to deploy a PostgreSQL
> instance for Synapse.

The `03-deploying-postgresql` directory provides an example of a `Synapse`
resource requesting for a new PostgreSQL instance to be deployed:

```shell
$ kubectl apply -f examples/03-deploying-postgresql/synapse.yaml
synapse.synapse.opdev.io/synapse-with-postgresql created

$ kubectl get pods,replicaset,deployment,statefulset,jobs,pods,service,configmap
NAME READY STATUS RESTARTS AGE
pod/synapse-with-postgresql-5d859d7b57-wrdl9 1/1 Running 0 77s
pod/synapse-with-postgresql-backup-n29s--1-7c7zh 0/1 Completed 0 87s
pod/synapse-with-postgresql-instance1-b7tj-0 3/3 Running 0 98s
pod/synapse-with-postgresql-repo-host-0 1/1 Running 0 98s

NAME DESIRED CURRENT READY AGE
replicaset.apps/synapse-with-postgresql-5d859d7b57 1 1 1 78s

NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/synapse-with-postgresql 1/1 1 1 78s

NAME READY AGE
statefulset.apps/synapse-with-postgresql-instance1-b7tj 1/1 98s
statefulset.apps/synapse-with-postgresql-repo-host 1/1 98s

NAME COMPLETIONS DURATION AGE
job.batch/synapse-with-postgresql-backup-n29s 1/1 27s 87s

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/synapse-with-postgresql ClusterIP 10.217.4.222 <none> 8008/TCP 78s
service/synapse-with-postgresql-ha ClusterIP 10.217.5.159 <none> 5432/TCP 99s
service/synapse-with-postgresql-ha-config ClusterIP None <none> <none> 98s
service/synapse-with-postgresql-pods ClusterIP None <none> <none> 99s
service/synapse-with-postgresql-primary ClusterIP None <none> 5432/TCP 99s
service/synapse-with-postgresql-replicas ClusterIP 10.217.5.24 <none> 5432/TCP 99s

NAME DATA AGE
configmap/kube-root-ca.crt 1 6d19h
configmap/openshift-service-ca.crt 1 6d19h
configmap/synapse-with-postgresql 1 99s
configmap/synapse-with-postgresql-config 1 99s
configmap/synapse-with-postgresql-instance1-b7tj-config 1 98s
configmap/synapse-with-postgresql-pgbackrest-config 3 98s
configmap/synapse-with-postgresql-ssh-config 2 98s
```

## Deploying a bridge

The synapse Operator supports the deployment of:
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ go 1.24.0

require (
dario.cat/mergo v1.0.2
github.com/crunchydata/postgres-operator v1.3.3-0.20220202164906-1c3cc3597c95
github.com/onsi/ginkgo/v2 v2.26.0
github.com/onsi/gomega v1.38.2
github.com/opdev/subreconciler v0.0.3
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.34.1
k8s.io/apiextensions-apiserver v0.34.1
k8s.io/apimachinery v0.34.1
k8s.io/client-go v0.34.1
sigs.k8s.io/controller-runtime v0.22.2
Expand Down Expand Up @@ -93,6 +91,7 @@ require (
google.golang.org/protobuf v1.36.7 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
k8s.io/apiextensions-apiserver v0.34.1 // indirect
k8s.io/apiserver v0.34.1 // indirect
k8s.io/component-base v0.34.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/crunchydata/postgres-operator v1.3.3-0.20220202164906-1c3cc3597c95 h1:lsrJP13Tvx+gBc0ox7GncEAgf6U+cgnRdXrvOG5QYok=
github.com/crunchydata/postgres-operator v1.3.3-0.20220202164906-1c3cc3597c95/go.mod h1:NhNMzmVvvdtwj28qJTd6bYztWth1xRATvBI9yuGIHCc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -263,8 +261,6 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.1.0 h1:rVV8Tcg/8jHUkPUorwjaMTtemIMVXfIPKiOqnhEhakk=
gotest.tools/v3 v3.1.0/go.mod h1:fHy7eyTmJFO5bQbUsEGQ1v4m2J3Jz9eWL54TP2/ZuYQ=
k8s.io/api v0.34.1 h1:jC+153630BMdlFukegoEL8E/yT7aLyQkIVuwhmwDgJM=
k8s.io/api v0.34.1/go.mod h1:SB80FxFtXn5/gwzCoN6QCtPD7Vbu5w2n1S0J5gFfTYk=
k8s.io/apiextensions-apiserver v0.34.1 h1:NNPBva8FNAPt1iSVwIE0FsdrVriRXMsaWFMqJbII2CI=
Expand Down
Loading