Skip to content

Commit 285b6fa

Browse files
committed
Document snag with stringData and server-side apply
1 parent fd2eeb8 commit 285b6fa

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

content/en/docs/concepts/configuration/secret.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,10 @@ stringData:
387387
password: t0p-Secret # required field for kubernetes.io/basic-auth
388388
```
389389

390+
{{< note >}}
391+
`stringData` for a Secret does not work well with server-side apply
392+
{{< /note >}}
393+
390394
The basic authentication Secret type is provided only for convenience.
391395
You can create an `Opaque` type for credentials used for basic authentication.
392396
However, using the defined and public Secret type (`kubernetes.io/basic-auth`) helps other
@@ -545,6 +549,10 @@ stringData:
545549
usage-bootstrap-signing: "true"
546550
```
547551

552+
{{< note >}}
553+
`stringData` for a Secret does not work well with server-side apply
554+
{{< /note >}}
555+
548556
## Working with Secrets
549557

550558
### Creating a Secret

content/en/docs/tasks/configmap-secret/managing-secret-using-config-file.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ stringData:
109109
password: <password>
110110
```
111111
112+
{{< note >}}
113+
`stringData` for a Secret does not work well with server-side apply
114+
{{< /note >}}
115+
112116
When you retrieve the Secret data, the command returns the encoded values,
113117
and not the plaintext values you provided in `stringData`.
114118

@@ -152,6 +156,10 @@ stringData:
152156
username: administrator
153157
```
154158

159+
{{< note >}}
160+
`stringData` for a Secret does not work well with server-side apply
161+
{{< /note >}}
162+
155163
The `Secret` object is created as follows:
156164

157165
```yaml

0 commit comments

Comments
 (0)