-
Notifications
You must be signed in to change notification settings - Fork 389
[New] External Secret Operator with Secret Manager #8653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
pages/manage_and_operate/secret_manager/external-secret-operator/guide.en-gb.md
Outdated
Show resolved
Hide resolved
pages/manage_and_operate/secret_manager/external-secret-operator/guide.en-gb.md
Show resolved
Hide resolved
pages/manage_and_operate/secret_manager/external-secret-operator/guide.en-gb.md
Outdated
Show resolved
Hide resolved
pages/manage_and_operate/secret_manager/external-secret-operator/guide.en-gb.md
Outdated
Show resolved
Hide resolved
pages/manage_and_operate/secret_manager/external-secret-operator/guide.en-gb.md
Outdated
Show resolved
Hide resolved
pages/manage_and_operate/secret_manager/external-secret-operator/guide.en-gb.md
Outdated
Show resolved
Hide resolved
pages/manage_and_operate/secret_manager/external-secret-operator/guide.en-gb.md
Outdated
Show resolved
Hide resolved
| kind: SealedSecret | ||
| metadata: | ||
| name: token-secret | ||
| namespace: default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| namespace: default | |
| namespace: default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
il n'est pas conseillé de mettre des ressources perso dans le namespace default.
pages/manage_and_operate/secret_manager/external-secret-operator/guide.en-gb.md
Outdated
Show resolved
Hide resolved
pages/manage_and_operate/secret_manager/external-secret-operator/guide.en-gb.md
Outdated
Show resolved
Hide resolved
|
|
||
| #### Configure External Secret Operator | ||
|
|
||
| First, setup a `SecretStore` that is responsible of the synchronization with the Secret Manager. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ClusterSecretStore instead, the SecretStore doesn't work.
May change all appearance of it.
| Then, install kubeseal cli to encrypt Secrets into Sealed Secrets | ||
|
|
||
| ```bash | ||
| KUBESEAL_VERSION='' # Set this to, for example, KUBESEAL_VERSION='0.23.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.33.1 est la version que je viens d'installer, la plus recente.
Le readme dont est extrait ce code est pas super a jour, donc plutot :
KUBESEAL_VERSION=$(curl -s https://api.github.com/repos/bitnami-labs/sealed-secrets/tags | jq -r '.[0].name' | cut -c 2-)
pages/manage_and_operate/secret_manager/external-secret-operator/guide.en-gb.md
Show resolved
Hide resolved
| helm install external-secrets \ | ||
| external-secrets/external-secrets \ | ||
| -n external-secrets \ | ||
| --create-namespace \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| --create-namespace \ | |
| --create-namespace |
| Add the `user_pat` as a secret to be able to use it in the charts. | ||
|
|
||
| ```yaml | ||
| --- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| --- |
| First, setup a `ClusterSecretStore` that is responsible of the synchronization with the Secret Manager. | ||
| We configure the ClusterSecretStore using HashiCorp Vault with token authentification and with the OKMS endpoint as backend. | ||
|
|
||
| Add the `user_pat` as a secret to be able to use it in the charts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cette etape est à mettre apres installation de sealed-secret, dans la section "Setup Sealed Secret (optionnal)"
| #### Use External Secret Operator | ||
|
|
||
| Once the `ClusterSecretStore` is setup you can define `ExternalSecret` that comes from the secret manager. | ||
| In the example we use a secret already created on the Secret Manager: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| In the example we use a secret already created on the Secret Manager: | |
| In the example we use a secret already created on the Secret Manager: |
| - `login: admin` | ||
| - `password: my_secret_password` | ||
|
|
||
| ```yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ```yaml | |
| Create a `externalsecret.yaml` file with this content: | |
| ```yaml |
| ``` | ||
|
|
||
| > [!info] | ||
| > Only `ExternalSecret` are supported yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c'est a dire ?
|
|
||
| > [!info] | ||
| > Only `ExternalSecret` are supported yet. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Apply the resource in your cluster: | |
| kubectl apply -f externalsecret.yaml | |
|
|
||
| #### Deploy your application | ||
|
|
||
| The secret should be created and available in kubernetes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The secret should be created and available in kubernetes. | |
| The secret should be created and available in the Kubernetes cluster. | |
| Check: | |
| $ kubectl get secret -n default | |
| NAME TYPE DATA AGE | |
| token-secret Opaque 1 17h | |
| creds-secret Opaque 1 9m4s |
| --- | ||
|
|
||
| > [!primary] | ||
| > Secret Manager is currently in beta phase. This guide can be updated in the future with the advances of our teams in charge of this product. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| > Secret Manager is currently in beta phase. This guide can be updated in the future with the advances of our teams in charge of this product. | |
| > Secret Manager is currently in Beta phase. This guide can be updated in the future with the advancements made by our teams in charge of this product. |
|
|
||
| ### Setup the Secret Manager | ||
|
|
||
| To allow access to the Secret Manager you will need to have a `token`, and the `region` and `okms-id` of your Secret Manager. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| To allow access to the Secret Manager you will need to have a `token`, and the `region` and `okms-id` of your Secret Manager. | |
| To allow access to the Secret Manager you will need to have a `token`, the `region` and `okms-id` of your Secret Manager. |
| --set installCRDs=true | ||
| ``` | ||
|
|
||
| Check ESO is running : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Check ESO is running : | |
| Check ESO is running: |
pages/manage_and_operate/secret_manager/external-secret-operator/guide.en-gb.md
Show resolved
Hide resolved
| >> ``` | ||
| >> | ||
| > CLI | ||
| >> PAT can also created with the [OVHcloud CLI](https://github.com/ovh/ovhcloud-cli) and the command (fill with your values) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| >> PAT can also created with the [OVHcloud CLI](https://github.com/ovh/ovhcloud-cli) and the command (fill with your values) : | |
| >> PAT can also created with the [OVHcloud CLI](https://github.com/ovh/ovhcloud-cli) and the command (fill with your values): |
| >> PAT can also created with the [OVHcloud CLI](https://github.com/ovh/ovhcloud-cli) and the command (fill with your values) : | ||
| >> | ||
| >> ```bash | ||
| >> ovhcloud iam user {user} token create --name pat-secretmanager-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx --description "PAT secret manager for domain xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| >> ovhcloud iam user {user} token create --name pat-secretmanager-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx --description "PAT secret manager for domain xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx" | |
| >> ovhcloud iam user token create {user} --name pat-secretmanager-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx --description "PAT secret manager for domain xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx" |
| >> PAT can also created with the [OVHcloud CLI](https://github.com/ovh/ovhcloud-cli) and the command (fill with your values): | ||
| >> | ||
| >> ```bash | ||
| >> ovhcloud iam user token create {user} --name pat-secretmanager-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx --description "PAT secret manager for domain xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or you can create the token AND save it in an environment variable
PAT_TOKEN=$(ovhcloud iam user token create {user} --name pat-secretmanager-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx --description "PAT secret manager for domain secretmanager-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx" -j | jq .details.token | tr -d '"') ; echo $PAT_TOKEN
| Start by encoding your `user_pat` is base64 so it can be stored in a kubernetes secret. | ||
|
|
||
| ```bash | ||
| $ echo -n "<token>" | base64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you saved the token in an env variable (c.f my 1st comment today), you can directly do:
PAT_TOKEN_B64=$(echo -n $PAT_TOKEN | base64) ; echo $PAT_TOKEN_B64
| ZXlKaG...wVkFn | ||
| ``` | ||
|
|
||
| Then create a `secret.yaml`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, easily, create the Secret from the created environment variable (see my comment number 1 and 2 of this review):
$ kubectl create secret generic ovhcloud-vault-token -n external-secrets --from-literal=token=$PAT_TOKEN_B64
secret/ovhcloud-vault-token created
What type of Pull Request is this?
Description
New documentation to explain how to use Kubernetes External Secret Operator with the OVHcloud Secret Manager
Mandatory information
The translations in this Pull Request have been done using:
OVHcloud integrated translation LLM
Systran
Other tool (specify which tool was used)
This Pull Request didn't require any translation.
This Pull Request can be merged as soon as possible.
This Pull Request content should be replicated for the US OVHcloud documentation : YES