Skip to content
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

Document snag with stringData and server-side apply #42631

Merged
merged 3 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 >}}
The `stringData` field 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 >}}
The `stringData` field 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 >}}
The `stringData` field 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 >}}
The `stringData` field for a Secret does not work well with server-side apply.
{{< /note >}}

The `Secret` object is created as follows:

```yaml
Expand Down