Skip to content

Commit f9365c8

Browse files
authored
Merge pull request #42631 from pegasas/stringdata
Document snag with stringData and server-side apply
2 parents 7349a0f + cf83760 commit f9365c8

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
@@ -380,6 +380,10 @@ stringData:
380380
password: t0p-Secret # required field for kubernetes.io/basic-auth
381381
```
382382

383+
{{< note >}}
384+
The `stringData` field for a Secret does not work well with server-side apply.
385+
{{< /note >}}
386+
383387
The basic authentication Secret type is provided only for convenience.
384388
You can create an `Opaque` type for credentials used for basic authentication.
385389
However, using the defined and public Secret type (`kubernetes.io/basic-auth`) helps other
@@ -539,6 +543,10 @@ stringData:
539543
usage-bootstrap-signing: "true"
540544
```
541545

546+
{{< note >}}
547+
The `stringData` field for a Secret does not work well with server-side apply.
548+
{{< /note >}}
549+
542550
## Working with Secrets
543551

544552
### 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+
The `stringData` field 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+
The `stringData` field 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)