Skip to content

Commit 7b80e2f

Browse files
authored
[internal] fix masked tlshd (#87)
* fix masked tlshd Signed-off-by: Pavel Karpov <[email protected]> * fix command in tlshd Signed-off-by: Pavel Karpov <[email protected]> * [doc] add an NFS server to FAQ Signed-off-by: Pavel Karpov <[email protected]> * [crd] clarifying the description Signed-off-by: Pavel Karpov <[email protected]> * [ci] fix "Check Go modules version" Signed-off-by: Pavel Karpov <[email protected]> --------- Signed-off-by: Pavel Karpov <[email protected]>
1 parent a914976 commit 7b80e2f

10 files changed

+23
-14
lines changed

.github/workflows/go_modules_check.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
echo "Processing $go_mod_file"
3838
3939
while IFS= read -r line; do
40-
if [[ "$line" =~ ^replace ]]; then
40+
if [[ "$line" =~ ^replace || "$line" =~ ^module ]]; then
4141
continue
4242
fi
4343

crds/doc-ru-nfsstorageclass.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ spec:
4242
Режим монтирования NFS-раздела.
4343
timeout:
4444
description: |
45-
Таймаут NFS-сервера.
45+
Время в десятых долях секунды (600 - это 60сек.), в течение которого клиент NFS ожидает ответа, прежде чем повторить запрос NFS.
4646
retransmissions:
4747
description: |
48-
Количество попыток подключения к NFS-серверу.
48+
Количество повторных попыток клиента NFS выполнить запрос, прежде чем он предпримет дальнейшие действия по восстановлению соединения.
4949
readOnly:
5050
description: |
5151
Монтирование в режиме «только чтение» (read-only).

crds/nfsstorageclass.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ spec:
121121
timeout:
122122
type: integer
123123
description: |
124-
NFS server timeout.
124+
The time in tenths of a second (600 is 60 seconds) during which the NFS client waits for a response before repeating the NFS request.
125125
minimum: 1
126126
retransmissions:
127127
type: integer
128128
description: |
129-
NFS retries before fail.
129+
The number of repeated attempts by the NFS client to execute the request before it takes further steps to restore the connection.
130130
minimum: 1
131131
readOnly:
132132
type: boolean

docs/FAQ.md

+5
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,8 @@ cat CA1.crt CA2.crt CA3.crt | base64 -w0
7575
```
7676

7777
- and so on
78+
79+
## What are the requirements for a Linux distribution to deploy an NFS server with RPC-with-TLS support?
80+
81+
- The kernel must be built with the `CONFIG_TLS` and `CONFIG_NET_HANDSHAKE` options enabled;
82+
- The nfs-utils package (or nfs-common in Debian-based distributions) must be version >= 2.6.3.

docs/FAQ_RU.md

+5
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,8 @@ cat CA1.crt CA2.crt CA3.crt | base64 -w0
7575
```
7676

7777
- и т.д.
78+
79+
## Какие требования к Linux дистрибутиву для разворачивания NFS-сервера с поддержкой RPC-with-TLS?
80+
81+
- Ядро должно быть собрано с включенными параметрами `CONFIG_TLS` и `CONFIG_NET_HANDSHAKE`;
82+
- Пакет nfs-utils (в дистрибутивах основанных на Debian - nfs-common) должен быть >= 2.6.3.

docs/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ For module pods to restart when the `tlsParameters` parameter is changed in the
2323

2424
## RPC-with-TLS mode limitations
2525

26-
- Only one certificate authority (CA) is supported.
2726
- For the `mtls` security policy, only one client certificate is supported.
2827
- A single NFS server cannot simultaneously operate in different security modes: `tls`, `mtls`, and standard (non-TLS) mode.
2928
- The `tlshd` daemon must not be running on the cluster nodes, otherwise it will conflict with the daemon of our module. To prevent conflicts when enabling TLS, the third-party `tlshd` is automatically stopped on the nodes and its autostart is disabled.

docs/README_RU.md

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ description: "Модуль csi-nfs: общие концепции и полож
2323

2424
## Ограничения режима RPC-with-TLS
2525

26-
- Поддерживается только один центр сертификации (CA).
2726
- Для политики безопасности `mtls` поддерживается только один сертификат клиента.
2827
- Один NFS-сервер не может одновременно работать в разных режимах безопасности: `tls`, `mtls` и стандартный режим (без TLS).
2928
- На узлах кластера не должен быть запущен демон `tlshd`, иначе он будет конфликтовать с демоном нашего модуля. Для предотвращения конфликтов при включении TLS на узлах автоматически останавливается сторонний `tlshd` и отключается его автозапуск.

images/tlshd/werf.inc.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,6 @@ import:
127127
add: /{{ $.ImageName }}
128128
to: /{{ $.ImageName }}
129129
before: setup
130+
131+
docker:
132+
ENTRYPOINT: ["/{{ $.ImageName }}"]

templates/csi/controller.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
mountPath: /lib/modules
3232
- name: net-hendshake-checker
3333
image: {{ include "helm_lib_module_image" (list . "tlshd") }}
34-
command: ["/go-tlshd", "--mode=init-containers"]
34+
args: ["--mode=init-containers"]
3535
imagePullPolicy: IfNotPresent
3636
securityContext:
3737
privileged: true
@@ -67,7 +67,7 @@
6767
{{- if .Values.csiNfs.tlsParameters.ca }}
6868
- name: tlshd
6969
image: {{ include "helm_lib_module_image" (list . "tlshd") }}
70-
command: ["/go-tlshd", "--mode=containers"]
70+
args: ["--mode=containers"]
7171
imagePullPolicy: IfNotPresent
7272
securityContext:
7373
privileged: true

templates/nodegroupconfiguration-tlshd-masked.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@ spec:
4141
4242
UNIT_FILE=tlshd.service
4343
44-
systemctl is-enabled $UNIT_FILE >/dev/null || {
45-
if [ $? -eq 4 ]; then
46-
bb-log-info "The unit file '$UNIT_FILE' doesn't exist. Skipping masking."
47-
exit 0
48-
fi
44+
systemctl list-unit-files $UNIT_FILE >/dev/null || {
45+
bb-log-info "The unit file '$UNIT_FILE' doesn't exist. Skipping masking."
46+
exit 0
4947
}
5048
5149
bb-log-info "The unit $UNIT_FILE is stopping."

0 commit comments

Comments
 (0)