@@ -80,7 +80,12 @@ import {
8080 testPublicRepoConnect ,
8181} from './utils/coderepoUtils'
8282import { getPolicies } from './utils/policiesUtils'
83- import { EncryptedDataRecord , encryptSecretItem , sealedSecretManifest } from './utils/sealedSecretUtils'
83+ import {
84+ EncryptedDataRecord ,
85+ encryptSecretItem ,
86+ mapObjectToKeyValueArray ,
87+ sealedSecretManifest ,
88+ } from './utils/sealedSecretUtils'
8489import { getKeycloakUsers , isValidUsername } from './utils/userUtils'
8590import { ObjectStorageClient } from './utils/wizardUtils'
8691import { fetchChartYaml , fetchWorkloadCatalog , NewHelmChartValues , sparseCloneChart } from './utils/workloadUtils'
@@ -1658,6 +1663,19 @@ export default class OtomiStack {
16581663 key,
16591664 value : secretValues ?. [ key ] || value ,
16601665 } ) )
1666+ type SealedSecretMetadata = {
1667+ annotations ?: Record < string , string >
1668+ labels ?: Record < string , string >
1669+ finalizers ?: string [ ]
1670+ }
1671+ const metadata = sealedSecret ?. metadata as SealedSecretMetadata
1672+ if ( metadata ) {
1673+ sealedSecret . metadata = {
1674+ ...metadata ,
1675+ annotations : mapObjectToKeyValueArray ( metadata . annotations ) ,
1676+ labels : mapObjectToKeyValueArray ( metadata . labels ) ,
1677+ }
1678+ }
16611679 const res = { ...sealedSecret , encryptedData, isDisabled } as any
16621680 return res
16631681 }
0 commit comments