Documentation ¶
Overview ¶
Copyright 2022 The VolSync authors.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Copyright 2022 The VolSync authors.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Index ¶
Constants ¶
const ( OrganizationName = "Backube" OrganizationUnit = "VolSync" )
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomBytes ¶
GenerateRandomBytes Generates random bytes of the given length using the OS's RNG.
func GenerateRandomString ¶
GenerateRandomString Generates a random string of ASCII characters excluding control characters 0-31, 32 (space), and 127. the given length using the OS's RNG.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) FromDestination ¶
func (rb *Builder) FromDestination(_ client.Client, _ logr.Logger, _ events.EventRecorder, _ *volsyncv1alpha1.ReplicationDestination, _ bool) (mover.Mover, error)
FromDestination Doesn't implement Syncthing, so nil is returned in both cases.
func (*Builder) FromSource ¶
func (rb *Builder) FromSource(client client.Client, logger logr.Logger, eventRecorder events.EventRecorder, source *volsyncv1alpha1.ReplicationSource, privileged bool) (mover.Mover, error)
FromSource Builds a Syncthing mover object from a given ReplicationSource object.
func (*Builder) VersionInfo ¶
VersionInfo Returns the Syncthing container image version being used by this Builder.
type Mover ¶
type Mover struct {
// contains filtered or unexported fields
}
Mover is the reconciliation logic for the Restic-based data mover.
func (*Mover) Cleanup ¶
Cleanup will remove any resources that were created by the mover. This is currently a no-op since Syncthing is always-on.
func (*Mover) GetDataServiceAddress ¶
GetDataServiceAddress Will return a string representing the address of the data service, prefixed with TCP.
func (*Mover) Synchronize ¶
Synchronize Runs through a synchronization cycle between the VolSync operator and the Syncthing data mover.
Synchronize ensures that the necessary resources required by the Syncthing Deployment are available, including:
- a PVC containing the data to be synced
- PVC for storing configuration data
- Secret containing the API key, TLS Certificates, and the username/password used to lock down the GUI.
- Deployment for the Syncthing data mover
- Service exposing Syncthing's API
- Service exposing Syncthing's data port
Once the resources are all provided, Synchronize will then poll the Syncthing API and make necessary configurations based on the data provided to the Syncthing ReplicationSource spec.
Synchronize also updates the ReplicationSource's status with information about our local Syncthing instance, as well as any connections that have been made to the Syncthing instance.