Skip to content

Commit

Permalink
Document snag with stringData and server-side apply
Browse files Browse the repository at this point in the history
  • Loading branch information
pegasas committed Sep 7, 2023
1 parent fd2eeb8 commit 285b6fa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions content/en/docs/concepts/configuration/secret.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ stringData:
password: t0p-Secret # required field for kubernetes.io/basic-auth
```

{{< note >}}
`stringData` for a Secret does not work well with server-side apply
{{< /note >}}

The basic authentication Secret type is provided only for convenience.
You can create an `Opaque` type for credentials used for basic authentication.
However, using the defined and public Secret type (`kubernetes.io/basic-auth`) helps other
Expand Down Expand Up @@ -545,6 +549,10 @@ stringData:
usage-bootstrap-signing: "true"
```

{{< note >}}
`stringData` for a Secret does not work well with server-side apply
{{< /note >}}

## Working with Secrets

### Creating a Secret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ stringData:
password: <password>
```
{{< note >}}
`stringData` for a Secret does not work well with server-side apply
{{< /note >}}

When you retrieve the Secret data, the command returns the encoded values,
and not the plaintext values you provided in `stringData`.

Expand Down Expand Up @@ -152,6 +156,10 @@ stringData:
username: administrator
```

{{< note >}}
`stringData` for a Secret does not work well with server-side apply
{{< /note >}}

The `Secret` object is created as follows:

```yaml
Expand Down

0 comments on commit 285b6fa

Please sign in to comment.