Skip to content

Commit

Permalink
Merge pull request #42631 from pegasas/stringdata
Browse files Browse the repository at this point in the history
Document snag with stringData and server-side apply
  • Loading branch information
k8s-ci-robot authored Oct 9, 2023
2 parents 7349a0f + cf83760 commit f9365c8
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 @@ -380,6 +380,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 @@ -539,6 +543,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

0 comments on commit f9365c8

Please sign in to comment.