Skip to content

Commit b2bc3f6

Browse files
committed
Fix linter errors
Signed-off-by: John Strunk <[email protected]>
1 parent add0a35 commit b2bc3f6

22 files changed

+68
-73
lines changed

controllers/mover/rclone/logfilter_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ getfacl: Removing leading '/' from absolute path names
6565
2023/01/09 20:00:52 DEBUG : S3 bucket rclone-test-0-zx42b: copied 1 directories
6666
2023/01/09 20:00:52 DEBUG : Waiting for deletions to finish
6767
2023/01/09 20:00:52 INFO : permissions.facl: Deleted
68-
2023/01/09 20:00:52 INFO :
68+
2023/01/09 20:00:52 INFO :
6969
Transferred: 699.051 KiB / 699.051 KiB, 100%, 0 B/s, ETA -
7070
Checks: 6 / 6, 100%
7171
Deleted: 1 (files), 0 (dirs)
@@ -137,7 +137,7 @@ Rclone completed in 5s`
137137
2023/01/09 20:04:56 DEBUG : TESTDIR1/file1: Unchanged skipping
138138
2023/01/09 20:04:56 DEBUG : Local file system at /data: Waiting for transfers to finish
139139
2023/01/09 20:04:56 DEBUG : Waiting for deletions to finish
140-
2023/01/09 20:04:56 INFO :
140+
2023/01/09 20:04:56 INFO :
141141
Transferred: 699.051 KiB / 699.051 KiB, 100%, 0 B/s, ETA -
142142
Checks: 5 / 5, 100%
143143
Transferred: 1 / 1, 100%

controllers/mover/rsynctls/logfilter_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Syncing data to 172.32.164.53:8000 ...
127127
2023.01.25 19:06:29 LOG6[0]: TLSv1.3 ciphersuite: TLS_AES_128_GCM_SHA256 (128-bit encryption)
128128
2023.01.25 19:06:29 LOG6[0]: Peer temporary key: X25519, 253 bits
129129
2023.01.25 19:06:29 LOG7[0]: Compression: null, expansion: null
130-
2023.01.25 19:06:29 LOG6[0]: Session id:
130+
2023.01.25 19:06:29 LOG6[0]: Session id:
131131
2023.01.25 19:06:29 LOG7[0]: TLS state (connect): SSL negotiation finished successfully
132132
2023.01.25 19:06:29 LOG7[0]: TLS state (connect): SSL negotiation finished successfully
133133
2023.01.25 19:06:29 LOG7[0]: Initializing application specific data for session authenticated
@@ -564,13 +564,13 @@ Initializing inetd mode configuration
564564
stunnel 5.62 on x86_64-redhat-linux-gnu platform
565565
Compiled/running with OpenSSL 3.0.1 14 Dec 2021
566566
Threading:PTHREAD Sockets:POLL,IPv6 TLS:ENGINE,FIPS,OCSP,PSK,SNI
567-
567+
568568
Global options:
569569
fips = no
570570
RNDbytes = 1024
571571
RNDfile = /dev/urandom
572572
RNDoverwrite = yes
573-
573+
574574
Service-level options:
575575
ciphers = FIPS (with "fips = yes")
576576
ciphers = PROFILE=SYSTEM (with "fips = no")

docs/design/mover-rsync.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Replication flow
5959
| Mover +----------=------->+ Mover |
6060
| | | |
6161
\--------/ \--------/
62-
62+
6363

6464
Primary site Secondary site
6565

docs/design/rwo-affinity.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ The application's Pod(s) can be rescheduled for a number of reasons, and VolSync
9292
must be able to adapt in order to avoid interfering with the application. To
9393
this end, it is necessary to periodically re-scan the Pods and adjust the mover
9494
placement appropriately. These changes follow the logic documented above,
95-
potentially adding, removing, or changing the `.spec.nodeName` field in the Job
96-
template.
95+
potentially adding, removing, or changing the ``.spec.nodeName`` field in the
96+
Job template.
9797

9898
Limitations
9999
===========

docs/usage/cli/migration.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ PVC. Otherwise, it will use the existing PVC.
5656
I0302 12:50:42.498947 168200 request.go:665] Waited for 1.007067079s due to client-side throttling, not priority and fairness, request: GET:https://api.ci-ln-72rwmxb-72292.origin-ci-int-gce.dev.rhcloud.com:6443/apis/project.openshift.io/v1?timeout=32s
5757
I0302 12:50:43.925309 168200 migration_create.go:329] pvc: "mydata" not found, creating the same
5858
I0302 12:50:43.974092 168200 migration_create.go:267] Namespace: "destination" is found, proceeding with the same
59-
I0302 12:50:44.021410 168200 migration_create.go:314] Created Destination PVC: "mydata" in NameSpace: "destination" and Cluster: ""
59+
I0302 12:50:44.021410 168200 migration_create.go:314] Created Destination PVC: "mydata" in NameSpace: "destination" and Cluster: ""
6060
I0302 12:50:44.073745 168200 migration_create.go:357] Created ReplicationDestination: "destination-mydata-migration-dest" in Namespace: "destination" and Cluster: ""
6161
6262
$ kubectl get -n destination pvc/mydata
@@ -181,4 +181,3 @@ We can now start a pod attached to the PVC and view the data:
181181
182182
$ kubectl -n destination exec -it pod/busybox -- du -sh /mnt
183183
655.4M /mnt
184-

docs/usage/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ Volume Populator
5959
================
6060

6161
VolSync provides a :doc:`Volume Populator <volume-populator/index>` to allow creation of PVCs that reference a
62-
ReplicationDestination as a dataSourceRef.
62+
ReplicationDestination as a dataSourceRef.

docs/usage/rclone/database_example.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Add a new database.
3636

3737
.. code:: console
3838
39-
$ kubectl exec --stdin --tty -n source `kubectl get pods -n source | grep mysql | awk '{print $1}'` -- /bin/bash
39+
$ kubectl exec --stdin --tty -n source $(kubectl get pods -n source | grep mysql | awk '{print $1}') -- /bin/bash
4040
$ mysql -u root -p$MYSQL_ROOT_PASSWORD
4141
> show databases;
4242
+--------------------+
@@ -105,7 +105,7 @@ lines:
105105
Type: Reconciled
106106
Next Sync Time: 2021-01-18T22:00:00Z
107107
108-
At ``Next Sync Time`` VolSync will create the next Rclone data mover job.
108+
At ``Next Sync Time`` VolSync will create the next Rclone data mover job.
109109

110110
-----------------------------------------
111111

@@ -150,7 +150,7 @@ exists.
150150

151151
.. code:: console
152152
153-
$ kubectl exec --stdin --tty -n dest `kubectl get pods -n dest | grep mysql | awk '{print $1}'` -- /bin/bash
153+
$ kubectl exec --stdin --tty -n dest $(kubectl get pods -n dest | grep mysql | awk '{print $1}') -- /bin/bash
154154
$ mysql -u root -p$MYSQL_ROOT_PASSWORD
155155
> show databases;
156156
+--------------------+

docs/usage/rclone/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ An example source configuration is shown below:
7474
# The VSC to use if the copy method is Snapshot (default if omitted)
7575
volumeSnapshotClassName: my-vsc-name
7676
77-
Since the ``copyMethod`` specified above is ``Snapshot``, the Rclone data mover creates a ``VolumeSnapshot``
77+
Since the ``copyMethod`` specified above is ``Snapshot``, the Rclone data mover creates a ``VolumeSnapshot``
7878
of the source pvc ``mysql-pv-claim``. Then it converts this snapshot back into a PVC.
7979
If ``copyMethod: Clone`` were used, the temporary, point-in-time copy would be
8080
created by cloning the source PVC to a new PVC directly. This is more efficient,
@@ -345,4 +345,4 @@ of ``secretName``, for example:
345345
# ... other fields omitted ...
346346
customCA:
347347
configMapName: tls-configmap-name
348-
key: ca.crt
348+
key: ca.crt

docs/usage/restic/database_example.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Add a new database:
5050

5151
.. code-block:: console
5252
53-
$ kubectl exec --stdin --tty -n source `kubectl get pods -n source | grep mysql | awk '{print $1}'` -- /bin/bash
53+
$ kubectl exec --stdin --tty -n source $(kubectl get pods -n source | grep mysql | awk '{print $1}') -- /bin/bash
5454
5555
$ mysql -u root -p$MYSQL_ROOT_PASSWORD
5656
@@ -277,7 +277,7 @@ exists.
277277

278278
.. code-block:: console
279279
280-
$ kubectl exec --stdin --tty -n dest `kubectl get pods -n dest | grep mysql | awk '{print $1}'` -- /bin/bash
280+
$ kubectl exec --stdin --tty -n dest $(kubectl get pods -n dest | grep mysql | awk '{print $1}') -- /bin/bash
281281
$ mysql -u root -p$MYSQL_ROOT_PASSWORD
282282
> show databases;
283283
+--------------------+

docs/usage/restic/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,4 +352,4 @@ of ``secretName``, for example:
352352
# ... other fields omitted ...
353353
customCA:
354354
configMapName: tls-configmap-name
355-
key: ca.crt
355+
key: ca.crt

docs/usage/rsync/database_example.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ mysql pod running in the source namespace.
127127

128128
.. code:: console
129129
130-
$ kubectl exec --stdin --tty -n source `kubectl get pods -n source | grep mysql | awk '{print $1}'` -- /bin/bash
130+
$ kubectl exec --stdin --tty -n source $(kubectl get pods -n source | grep mysql | awk '{print $1}') -- /bin/bash
131131
$ mysql -u root -p$MYSQL_ROOT_PASSWORD
132132
> show databases;
133133
+--------------------+
@@ -182,7 +182,7 @@ exists.
182182

183183
.. code:: console
184184
185-
$ kubectl exec --stdin --tty -n dest `kubectl get pods -n dest | grep mysql | awk '{print $1}'` -- /bin/bash
185+
$ kubectl exec --stdin --tty -n dest $(kubectl get pods -n dest | grep mysql | awk '{print $1}') -- /bin/bash
186186
$ mysql -u root -p$MYSQL_ROOT_PASSWORD
187187
> show databases;
188188
+--------------------+

docs/usage/rsync/external_rsync.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ synchronization of data into a Kubernetes PVC, please see:
1818

1919
- :doc:`CLI/kubectl plugin installation<../cli/index>`
2020
- :doc:`VolSync migration command<../cli/migration>`
21-

docs/usage/rsync/ssh_keys.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Two key pairs need to be generated. The first SSH key will called ``destination`
3535
| .o. o... |
3636
+----[SHA256]-----+
3737
38-
The second SSH key will be called `source`:
38+
The second SSH key will be called ``source``:
3939

4040
.. code::
4141
@@ -44,7 +44,7 @@ The second SSH key will be called `source`:
4444
Your identification has been saved in source
4545
Your public key has been saved in source.pub
4646
The key fingerprint is:
47-
SHA256:NEQNMNsgR43Y3c2dWMyit70JagmbCLNRfakWhWORENU
47+
SHA256:NEQNMNsgR43Y3c2dWMyit70JagmbCLNRfakWhWORENU
4848
The key's randomart image is:
4949
+---[RSA 4096]----+
5050
| .+OX*O o *.. |

docs/usage/syncthing/index.rst

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Syncthing also includes an introducer feature which allows one device to be conn
2929
This can be used to create a hub-and-spoke model for replication, or any other kind of network.
3030

3131
When a ReplicationSource is created and configured to sync a PVC with other peers, all of the connected peers will maintain their
32-
own Volume containing the synced data. To detect file changes, Syncthing employs two methods: a filesystem watcher, which notifies
32+
own Volume containing the synced data. To detect file changes, Syncthing employs two methods: a filesystem watcher, which notifies
3333
Syncthing of any changes to the local filesystem, and a full filesystem scan which occurs routinely at a specified interval (default is an hour).
3434
Since Syncthing is an "always-on" synchronization system, ReplicationSources will report their synchronization status as always being 'in-progress'.
3535

36-
VolSync uses a custom-built Syncthing mover which disables the use of relay servers and global announce, and relying instead on
36+
VolSync uses a custom-built Syncthing mover which disables the use of relay servers and global announce, and relying instead on
3737
being provided with the addresses of other Syncthing peers directly.
3838

3939

@@ -69,7 +69,7 @@ Here's an example of a Syncthing-based ReplicationSource.
6969
introducer: false
7070
7171
The above ReplicationSource tells VolSync that it should use the Syncthing replication method in order
72-
to sync the ``todo-database`` volume.
72+
to sync the ``todo-database`` volume.
7373

7474
A service type of ``ClusterIP`` is used to expose the Syncthing data port, allowing us to connect with other peers within the cluster.
7575
In order for Syncthing to connect to peers outside of the cluster, you will need to either use
@@ -117,7 +117,7 @@ configVolumeAccessModes
117117
Source Status
118118
-------------
119119

120-
Once the ReplicationSource has been deployed and Syncthing has properly configured itself,
120+
Once the ReplicationSource has been deployed and Syncthing has properly configured itself,
121121
it will populate the ``.status.syncthing`` field with information about your Syncthing node.
122122

123123
Here's an example of a ReplicationSource with a status:
@@ -229,7 +229,7 @@ For Example, suppose we have the following two ReplicationSources:
229229
metadata:
230230
name: alice-rs
231231
spec:
232-
sourcePVC: alice-data
232+
sourcePVC: alice-data
233233
syncthing:
234234
serviceType: ClusterIP
235235
peers:
@@ -255,7 +255,7 @@ For Example, suppose we have the following two ReplicationSources:
255255
256256
257257
Here, ``alice-rs`` is being configured by ``bob-rs`` to act as an introducer for any nodes that are currently connected to the shared PVC.
258-
At the moment, there are only ``N=2`` Syncthing nodes in the entire cluster.
258+
At the moment, there are only ``N=2`` Syncthing nodes in the entire cluster.
259259

260260

261261
Adding More Spokes
@@ -264,7 +264,7 @@ Adding More Spokes
264264
Now, let's suppose that we want to connect Charlie to everyone in the current cluster,
265265
but without having to append his address and ID to the two other existing nodes.
266266

267-
In order to do this, we will need to update Alice's ``peers`` to include Charlie's Syncthing ID and address,
267+
In order to do this, we will need to update Alice's ``peers`` to include Charlie's Syncthing ID and address,
268268
as well as update Charlie's ``peers`` to include Alice with ``introducer: true`` set.
269269

270270
.. code-block:: yaml
@@ -275,7 +275,7 @@ as well as update Charlie's ``peers`` to include Alice with ``introducer: true``
275275
metadata:
276276
name: alice-rs
277277
spec:
278-
sourcePVC: alice-data
278+
sourcePVC: alice-data
279279
syncthing:
280280
serviceType: ClusterIP
281281
peers:
@@ -317,7 +317,7 @@ Removing Spokes
317317

318318
In order to remove a spoke from the cluster, simply remove it from the Hub's ``peers`` list.
319319

320-
For example, if Alice wants to remove Charlie, all she needs to do is remove the entry corresponding to his ID, and
320+
For example, if Alice wants to remove Charlie, all she needs to do is remove the entry corresponding to his ID, and
321321
the rest of the Syncthing cluster will automatically remove him from their connections.
322322

323323

@@ -330,7 +330,7 @@ the rest of the Syncthing cluster will automatically remove him from their conne
330330
metadata:
331331
name: alice-rs
332332
spec:
333-
sourcePVC: alice-data
333+
sourcePVC: alice-data
334334
syncthing:
335335
serviceType: ClusterIP
336336
peers:
@@ -369,7 +369,7 @@ Cyclic introducers
369369
------------------
370370

371371
Syncthing introducers also contain a mechanism to automatically re-add introduced nodes if they were disconnected
372-
for whatever reason. This means that if you configure two nodes as each other's introducer, you will never
372+
for whatever reason. This means that if you configure two nodes as each other's introducer, you will never
373373
be able to disconnect them as they'll continue to re-add each other until the end of time.
374374

375375

@@ -380,9 +380,9 @@ Communicating With Syncthing
380380
Unlike the other data movers, Syncthing never stops running. This changes our approach of controlling it to
381381
having Syncthing always be running, and communicating with it through it's REST API.
382382

383-
Syncthing has a REST API which handles connections through HTTPS. In order to do this securely,
383+
Syncthing has a REST API which handles connections through HTTPS. In order to do this securely,
384384
VolSync provisions a self-signed certificate and key for the Syncthing REST API, passing the generated
385-
certificate and key to Syncthing on first launch, and adding the Public Key PEM to VolSync's root CA bundle.
385+
certificate and key to Syncthing on first launch, and adding the Public Key PEM to VolSync's root CA bundle.
386386

387387
You can provide a custom HTTPS key/certificate pair by overriding the Secret which VolSync uses to store its
388388
communication credentials for Syncthing.
@@ -416,5 +416,4 @@ would require you to name the ReplicationSource "my-replication-source".
416416

417417
.. note::
418418
This Secret must be created **before** creating the ReplicationSource.
419-
Otherwise, Syncthing will generate its own set of credentials and ignore yours.
420-
419+
Otherwise, Syncthing will generate its own set of credentials and ignore yours.

docs/usage/syncthing/syncthing_example.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Syncthing Dokuwiki Example
55

66
.. note::
77
This tutorial requires the usage of LoadBalancer to expose applications
8-
from within the cluster. If you are running a KIND cluster, please
8+
from within the cluster. If you are running a KIND cluster, please
99
follow this guide to install metallb if you haven't already: https://kind.sigs.k8s.io/docs/user/loadbalancer/
1010

1111

@@ -24,7 +24,7 @@ Ensure that we can access the dokuwiki application by obtaining the external IP
2424

2525

2626
.. code-block:: console
27-
27+
2828
$ kubectl get service -n dokuwiki-east dokuwiki-service
2929
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
3030
dokuwiki-service LoadBalancer 10.96.231.229 172.18.255.200 5196:30113/TCP 16m
@@ -41,11 +41,11 @@ Once opened, you should see a page like this:
4141

4242

4343
Now let's populate our DokuWiki with its first page, and what better subject to
44-
talk about then the Syncthing data mover?
44+
talk about then the Syncthing data mover?
4545

4646
Create a new page on the DokuWiki website with the following contents:
4747

48-
.. code-block::
48+
.. code-block::
4949
5050
Syncthing is a data mover that allows you to synchronize your data across multiple devices.
5151
It's an awesome tool that you should try out if you haven't already.
@@ -61,9 +61,9 @@ Now let's create a Syncthing-based ReplicationSource to synchronize the data wit
6161
Let's retrieve our ReplicationSource's Syncthing information once it becomes available:
6262

6363
.. code-block:: console
64-
64+
6565
$ kubectl get replicationsource -n dokuwiki-east sync-dokuwiki \
66-
-o jsonpath='{.status.syncthing}' -w
66+
-o jsonpath='{.status.syncthing}' -w
6767
{"ID":"TMBYRB4-EIINYAW-ZFBX4LV-7FE37NT-BLQPSKB-P2BFIPW-QW6ST3C-PSU7UQD","address":"tcp://10.96.217.239:22000"}
6868
6969
@@ -114,7 +114,7 @@ You should see empty pages for both ``dokuwiki-west`` and ``dokuwiki-central``.
114114
Let's change this by creating Syncthing-based ReplicationSources in each of these namespaces,
115115
and configuring them to use ``dokuwiki-east`` as their introducer node.
116116

117-
Using the information that we obtained from the ReplicationSource in ``dokuwiki-east`` earlier,
117+
Using the information that we obtained from the ReplicationSource in ``dokuwiki-east`` earlier,
118118
create a ReplicationSource with the following contents and apply it in each namespace:
119119

120120
.. code-block:: bash
@@ -231,7 +231,7 @@ We can also see that ``dokuwiki-central`` was introduced and connected to ``doku
231231
]
232232
233233
234-
Now, let's get the external IPs to the ``dokuwiki-west`` and ``dokuwiki-central`` applications and
234+
Now, let's get the external IPs to the ``dokuwiki-west`` and ``dokuwiki-central`` applications and
235235
view them in our browser:
236236
237237
.. code-block:: shell
@@ -258,7 +258,7 @@ And here's how it looks in the ``dokuwiki-west`` namespace:
258258
:width: 100%
259259
:alt: DokuWiki in ``dokuwiki-west`` namespace synced with Syncthing
260260
261-
Now let's create a new page from the ``dokuwiki-west`` namespace,
261+
Now let's create a new page from the ``dokuwiki-west`` namespace,
262262
click on the URL bar at the and append ``/dokuwiki-west`` to the end of the URL, like this:
263263
264264
.. image:: images/dokuwiki-west-urlbar.png
@@ -267,7 +267,7 @@ click on the URL bar at the and append ``/dokuwiki-west`` to the end of the URL,
267267
:alt: URL bar appending ``/dokuwiki-west`` to the current DokuWiki URL
268268
269269
This should present us with a new page containing the message: "this topic does not exist yet."
270-
Well let's change that: click on the "Create this page" button and fill it with
270+
Well let's change that: click on the "Create this page" button and fill it with
271271
the content of your choosing.
272272
In our case, we're going to make a page for our ``dokuwiki-west`` namespace.
273273
@@ -299,4 +299,4 @@ appear in the ``dokuwiki-central`` tab:
299299
300300
301301
And voila! You have just created a fully-connected Syncthing cluster in Kubernetes using VolSync,
302-
and made use of it to synchronize data across a distributed application.
302+
and made use of it to synchronize data across a distributed application.

0 commit comments

Comments
 (0)