Skip to content

Commit c978fff

Browse files
Merge branch 'main' into APL-809
2 parents 4c1e6a6 + 18494d6 commit c978fff

File tree

3 files changed

+64
-15
lines changed

3 files changed

+64
-15
lines changed

src/components/forms/TextArea.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const useStyles = makeStyles<{ disabled?: boolean; error?: boolean }>()((theme:
2525
marginBottom: theme.spacing(2),
2626
},
2727
textarea: {
28-
backgroundColor: theme.palette.background.default,
28+
backgroundColor: theme.palette.cm.textBox,
2929
color: theme.palette.cl.text.title,
3030
padding: theme.spacing(1),
3131
border: `1px solid ${theme.palette.cm.inputBorder}`,

src/pages/secrets/create-edit/SecretCreateEditPage.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export default function SecretCreateEditPage({
239239
{sealedSecretName && isImmutable && (
240240
<InformationBanner
241241
sx={{ my: '1rem' }}
242-
message='This secret is marked as immutable and therefore values cannot be changed, only deleted.'
242+
message='This secret is marked as immutable and therefore the Secret data cannot be modified, only deleted.'
243243
/>
244244
)}
245245
<FormProvider {...methods}>
@@ -263,7 +263,7 @@ export default function SecretCreateEditPage({
263263
error={!!errors.type}
264264
helperText={
265265
errors.type?.message?.toString() ||
266-
'Kubernetes offers different types of secrets, please see: https://kubernetes.io/docs/concepts/configuration/secret/ for which secret type fits your use case best.'
266+
'Select the Secret type for the appropriate handling of the Secret data.'
267267
}
268268
{...register('type')}
269269
value={watch('type') || 'kubernetes.io/opaque'}
@@ -280,8 +280,8 @@ export default function SecretCreateEditPage({
280280
sx={{ mt: '2rem' }}
281281
message={
282282
!isEqual(formData.encryptedData, watch('encryptedData'))
283-
? 'You are about to override secret values, your changes will go into effect once you click the "Save Changes" button.'
284-
: 'You can add new values to override existing values, but be aware that applications using this token might need to be adapted.'
283+
? 'You are about to change secret data. Changes will become active after clicking the "Save Changes" button.'
284+
: 'You can add new or override existing secret data.'
285285
}
286286
/>
287287
)}
@@ -299,15 +299,15 @@ export default function SecretCreateEditPage({
299299
name='immutable'
300300
control={control}
301301
label='Immutable'
302-
explainertext='If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).'
302+
explainertext='If enabled, the Secret data cannot be updated after creation.'
303303
disabled={sealedSecretName && isImmutable}
304304
/>
305305
</Section>
306306
<AdvancedSettings>
307307
<Section title='Metadata'>
308308
<KeyValue
309309
title='Labels'
310-
subTitle='Labels let you categorize and select objects. (e.g. env = production, tier = backend) '
310+
subTitle='Add labels to specify identifying attributes of the Secret.'
311311
name='metadata.labels'
312312
keyLabel='key'
313313
valueLabel='value'
@@ -320,7 +320,7 @@ export default function SecretCreateEditPage({
320320
<Divider />
321321
<KeyValue
322322
title='Annotations'
323-
subTitle='Not used for selection like labels, but rather to describe (e.g. createdBy, expiryTimestamp)'
323+
subTitle='Add annotations to store custom metadata about the Secret.'
324324
name='metadata.annotations'
325325
keyLabel='key'
326326
valueLabel='value'
@@ -333,9 +333,7 @@ export default function SecretCreateEditPage({
333333
<Divider />
334334
<KeyValue
335335
title='Finalizers'
336-
subTitle='A list of “blockers” that must be removed before Kubernetes can remove the Secret. This is very important, for example if you remove a secret that holds information for a TLS certificate
337-
you first want to revoke said certificate before removing the secret, A finalizer like "acme.myorg.com/certificate-cleanup" will make sure to first revoke the certificate before removing the
338-
secret'
336+
subTitle='Add finalizers to specify conditions that need to be met before a Secret can be marked for deletion.'
339337
name='metadata.finalizers'
340338
keyLabel='key'
341339
valueLabel='value'

src/pages/secrets/create-edit/SecretTypeFields.tsx

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ export function SecretTypeFields({
2222
const typePath = namePrefix ? `${namePrefix}.type` : 'type'
2323
const dataPath = namePrefix ? `${namePrefix}.encryptedData` : 'encryptedData'
2424
const selectedType = useWatch({ control, name: typePath }) as typeof secretTypes[number]
25-
const title = 'Encrypted Data'
25+
const title = 'Secret Data'
2626
const disabled = immutable && { keyDisabled: true, valueDisabled: true, disabled: true }
2727

2828
switch (selectedType) {
2929
case 'kubernetes.io/opaque':
3030
return (
3131
<KeyValue
3232
title={title}
33-
subTitle='A Kubernetes Opaque Secret is simply the "generic" secret type—perfect any time you need to stash arbitrary key-value data that doesn’t fit one of the built‐in types'
33+
subTitle='Add arbitrary key-value data.'
3434
name={dataPath}
3535
keyLabel='Key'
3636
valueLabel='Value'
@@ -45,13 +45,64 @@ export function SecretTypeFields({
4545
/>
4646
)
4747
case 'kubernetes.io/dockercfg':
48+
return (
49+
<KeyValue
50+
title={title}
51+
subTitle='Add contents from a serialized ~/.dockercfg file.'
52+
name={dataPath}
53+
keyDisabled
54+
keyLabel='Key'
55+
valueLabel='Value'
56+
showLabel={false}
57+
compressed
58+
error={error}
59+
helperText={helperText}
60+
isEncrypted={isEncrypted}
61+
isTextArea
62+
{...disabled}
63+
/>
64+
)
4865
case 'kubernetes.io/dockerconfigjson':
66+
return (
67+
<KeyValue
68+
title={title}
69+
subTitle='Add contents from a serialized ~/.docker/config.json file.'
70+
name={dataPath}
71+
keyDisabled
72+
keyLabel='Key'
73+
valueLabel='Value'
74+
showLabel={false}
75+
compressed
76+
error={error}
77+
helperText={helperText}
78+
isEncrypted={isEncrypted}
79+
isTextArea
80+
{...disabled}
81+
/>
82+
)
4983
case 'kubernetes.io/ssh-auth':
84+
return (
85+
<KeyValue
86+
title={title}
87+
subTitle='Add credentials for SSH authentication.'
88+
name={dataPath}
89+
keyDisabled
90+
keyLabel='Key'
91+
valueLabel='Value'
92+
showLabel={false}
93+
compressed
94+
error={error}
95+
helperText={helperText}
96+
isEncrypted={isEncrypted}
97+
isTextArea
98+
{...disabled}
99+
/>
100+
)
50101
case 'kubernetes.io/tls':
51102
return (
52103
<KeyValue
53104
title={title}
54-
subTitle={`Enter key-value pairs for the "${selectedType}" secret type`}
105+
subTitle='Add the data for a TLS client or server.'
55106
name={dataPath}
56107
keyDisabled
57108
keyLabel='Key'
@@ -69,7 +120,7 @@ export function SecretTypeFields({
69120
return (
70121
<KeyValue
71122
title={title}
72-
subTitle='Basic-auth Secret exists out of a username and password'
123+
subTitle='Add credentials (username and password) for basic authentication.'
73124
keyDisabled
74125
name={dataPath}
75126
keyLabel='Key'

0 commit comments

Comments
 (0)