You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/USAGE.md
+48-27Lines changed: 48 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Usage of the secrets-store-integration Deckhouse module.
5
5
6
6
## Configuring the module to work with Deckhouse Stronghold
7
7
8
-
[Enable](../../stronghold/stable/usage.html#how-to-enable-the-module) the Stronghold module beforehand to automatically configure the secrets-store-integration module to work with [Deckhouse Stronghold](../../stronghold/).
8
+
[Enable](../../stronghold/stable/usage.html#how-to-enable-the-module) the Stronghold module beforehand to automatically configure the secrets-store-integration module to work with [Deckhouse Stronghold](../../stronghold/stable/).
@@ -98,7 +99,7 @@ Example commands to set up the environment:
98
99
* Set the database username and password as the value of the secret:
99
100
100
101
```bash
101
-
stronghold kv put demo-kv/myapp-secret DB_USER="username" DB_PASS="secret-password"
102
+
d8 stronghold kv put demo-kv/myapp-secret DB_USER="username" DB_PASS="secret-password"
102
103
```
103
104
The curl equivalent of the above command:
104
105
@@ -113,9 +114,9 @@ Example commands to set up the environment:
113
114
* Double-check that the password has been saved successfully:
114
115
115
116
```bash
116
-
stronghold kv get demo-kv/myapp-secret
117
+
d8 stronghold kv get demo-kv/myapp-secret
117
118
```
118
-
119
+
119
120
The curl equivalent of the above command:
120
121
```bash
121
122
curl \
@@ -126,7 +127,7 @@ Example commands to set up the environment:
126
127
* By default, the method of authentication in Stronghold via Kubernetes API of the cluster on which Stronghold itself is running is enabled and configured under the name `kubernetes_local`. If you want to configure access via remote clusters, set the authentication path (`authPath`) and enable authentication and authorization in Stronghold via Kubernetes API for each cluster:
@@ -215,10 +217,10 @@ Example commands to set up the environment:
215
217
```
216
218
217
219
218
-
{{< alert level="info">}}
219
-
**Important!**
220
-
The recommended TTL value of the Kubernetes token is 10m.
221
-
{{< /alert >}}
220
+
{{< alert level="info">}}
221
+
**Important!**
222
+
The recommended TTL value of the Kubernetes token is 10m.
223
+
{{< /alert >}}
222
224
223
225
These settings allow any pod within the `myapp-namespace` namespace in both K8s clusters that uses the `myapp-sa` ServiceAccount to authenticate, authorize, and read secrets in the Stronghold according to the `myapp-ro-policy` policy.
224
226
@@ -510,12 +512,31 @@ A container that uses the `subPath` volume mount will not get secret updates whe
510
512
secretsStoreImport: "python-backend"
511
513
```
512
514
513
-
## Get stronghold cli
515
+
## Download the d8 multitool for stronghold commands
514
516
515
-
On the cluster's master node, run the following commands as `root`:
516
-
```bash
517
-
mkdir $HOME/bin
518
-
sudo cp /proc/$(pidof stronghold)/root/usr/bin/stronghold bin && sudo chmod a+x bin/stronghold
519
-
export PATH=$PATH:$HOME/bin
520
-
```
521
-
As a result, the command `stronhold` is ready to be used.
517
+
### Official website of Deckhouse Kubernetes Platform
518
+
519
+
Go to the official website and follow the [instructions](https://deckhouse.io/products/kubernetes-platform/documentation/v1/deckhouse-cli/#how-do-i-install-deckhouse-cli).
520
+
521
+
### The subdomain of your Deckhouse Kubernetes Platform
522
+
523
+
To download the multitool:
524
+
1. Go to the page `tools.<cluster_domain>`, where `<cluster_domain>` is the DNS name that matches the template defined in the [modules.publicDomainTemplate](deckhouse-configure-global.html#parameters-modules-publicdomaintemplate) parameter.
525
+
526
+
2. Select *Deckhouse CLI* for your operating system.
527
+
1. **For Linux and MacOS:**
528
+
- Add execution rights to `d8` via `chmod +x d8`.
529
+
- Move the executable file to the `/usr/local/bin/` folder.
530
+
531
+
**For Windows:**
532
+
- Extract the archive, move the `d8.exe` file to a directory of your choice, and add the directory to PATH variable of the operating system.
533
+
- Unblock the `d8.exe file`, for example, in the following way:
534
+
- Right-click on the file and select *Properties* from the context menu.
535
+
- In the *Properties* window, ensure you are on the *General* tab.
536
+
- At the bottom of the *General* tab, you may see a *Security* section with a message about the file being blocked.
537
+
- Check the *Unblock* box or click the *Unblock* button, then click *Apply* and *OK* to save the changes.
538
+
1. Check that the utility works:
539
+
```
540
+
d8 help
541
+
```
542
+
Congrats, you have successfully installed the `d8 stronhold`.
Copy file name to clipboardExpand all lines: docs/USAGE_RU.md
+36-18Lines changed: 36 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Использование модуля secrets-store-integration.
5
5
6
6
## Настройка модуля для работы c Deckhouse Stronghold
7
7
8
-
Для автоматической настройки работы модуля secrets-store-integration в связке с модулем [Deckhouse Stronghold](../../stronghold/) потребуется ранее [включенный](../../stronghold/stable/usage.html#%D0%BA%D0%B0%D0%BA-%D0%B2%D0%BA%D0%BB%D1%8E%D1%87%D0%B8%D1%82%D1%8C) и настроенный Stronghold.
8
+
Для автоматической настройки работы модуля secrets-store-integration в связке с модулем [Deckhouse Stronghold](../../stronghold/stable/) потребуется ранее [включенный](../../stronghold/stable/usage.html#%D0%BA%D0%B0%D0%BA-%D0%B2%D0%BA%D0%BB%D1%8E%D1%87%D0%B8%D1%82%D1%8C) и настроенный Stronghold.
Рекомендованное значение TTL для токена Kubernetes составляет 10m.
221
-
{{< /alert >}}
218
+
{{< alert level="info">}}
219
+
**Важно!**
220
+
Рекомендованное значение TTL для токена Kubernetes составляет 10m.
221
+
{{< /alert >}}
222
222
223
223
Эти настройки позволяют любому поду из пространства имён `myapp-namespace` из обоих K8s-кластеров, который использует ServiceAccount `myapp-sa`, аутентифицироваться и авторизоваться в Stronghold для чтения секретов согласно политике `myapp-ro-policy`.
## Как разрешить ServiceAccount авторизоваться в Stronghold?
232
232
233
-
Для авторизации в Stronghold, Pod использует токен, сгенерированный для своего ServiceAccount. Для того чтобы Stronghold мог проверить валидность предоставляемых данных ServiceAccount используемый сервисом, Stronghold должен иметь разрешение на действия `get`, `list` и `watch` для endpoints `tokenreviews.authentication.k8s.io` и `subjectaccessreviews.authorization.k8s.io`. Для этого также можно использовать clusterRole `system:auth-delegator`.
233
+
Для авторизации в Stronghold Pod использует токен, сгенерированный для своего ServiceAccount'а. Для того чтобы Stronghold мог проверить валидность предоставляемых данных `ServiceAccount`, используемый сервисом Stronghold должен иметь разрешение на действия `get`, `list` и `watch` для endpoints `tokenreviews.authentication.k8s.io` и `subjectaccessreviews.authorization.k8s.io`. Для этого также можно использовать clusterRole `system:auth-delegator`.
234
234
235
235
Stronghold может использовать различные авторизационные данные для осуществления запросов в API Kubernetes:
236
-
1. Использовать токен приложения, которое пытается авторизоваться в Stronghold. В этом случае для каждого сервиса авторизующейся в Stronghold требуется в используемом ServiceAccount иметь clusterRole `system:auth-delegator` (либо права на API представленные выше).
236
+
1. Использовать токен приложения, которое пытается авторизоваться в Stronghold. В этом случае для каждого сервиса, авторизующегося в Stronghold, требуется в используемом ServiceAccount'е иметь clusterRole `system:auth-delegator` (либо права на API представленные выше).
237
237
2. Использовать статичный токен отдельно созданного специально для Stronghold `ServiceAccount` у которого имеются необходимые права. Настройка Stronghold для такого случая подробно описана в [документации Vault](https://developer.hashicorp.com/vault/docs/auth/kubernetes#continue-using-long-lived-tokens).
238
238
239
239
## Инжектирование переменных окружения
@@ -506,12 +506,30 @@ for {
506
506
secretsStoreImport: "python-backend"
507
507
```
508
508
509
-
## Как получить бинарный файл stronghold
510
-
511
-
На мастер-ноде кластера необходимо выполнить следующие команды через `root` пользователя:
512
-
```bash
513
-
mkdir $HOME/bin
514
-
sudo cp /proc/$(pidof stronghold)/root/usr/bin/stronghold bin && sudo chmod a+x bin/stronghold
515
-
export PATH=$PATH:$HOME/bin
516
-
```
517
-
Команда `stronhold` готова к использованию.
509
+
## Скачать мультитул d8 для команд Stronghold
510
+
511
+
### Официальный сайт Deckhouse Kubernetes Platform
512
+
513
+
Перейдите на официальный сайт и воспользуйтесь [инструкцией](https://deckhouse.ru/products/kubernetes-platform/documentation/v1/deckhouse-cli/#как-установить-deckhouse-cli)
514
+
515
+
### Субдомен вашей Deckhouse Kubernetes Platform
516
+
517
+
Для скачивания мультитула:
518
+
1. Перейдите на страницу `tools..<cluster_domain>`, где `<cluster_domain>` — DNS-имя в соответствии с шаблоном из параметра [modules.publicDomainTemplate](deckhouse-configure-global.html#parameters-modules-publicdomaintemplate) глобальной конфигурации.
519
+
1. Выберите Deckhouse CLI для вашей операционной системы.
520
+
1. **Для Linux и MacOS:**
521
+
- Добавьте права на выполнение `d8` через `chmod +x d8`.
522
+
- Переместите исполняемый файл в каталог `/usr/local/bin/`.
523
+
524
+
**Для Windows:**
525
+
- Распакуйте архив, переместите файл `d8.exe` в выбранный вами каталог и добавьте этот каталог в переменную $PATH операционной системы.
526
+
- Разблокируйте файл `d8.exe`, например, следующим способом:
527
+
- Щелкните правой кнопкой мыши на файле и выберите *Свойства* в контекстном меню.
528
+
- В окне *Свойства* убедитесь, что находитесь на вкладке *Общие*.
529
+
- Внизу вкладки *Общие* вы можете увидеть раздел *Безопасность* с сообщением о блокировке файла.
530
+
- Установите флажок *Разблокировать* или нажмите кнопку *Разблокировать*, затем нажмите *Применить* и *ОК*, чтобы сохранить изменения.
0 commit comments