File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
src/pages/secrets/create-edit Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -115,10 +115,23 @@ export default function SecretCreateEditPage({
115115 } , [ isDirty ] )
116116
117117 // If we have a sealedSecretName, we are converting the data to the form format
118- const formData = cloneDeep ( data ) as SealedSecretFormData
118+ /**
119+ * temporary workaround for wrong data shape send by API
120+ * REF: APL-1333
121+ */
122+ const formData = cloneDeep ( data ) as any
123+
119124 if ( ! isEmpty ( data ) ) {
125+ // hoist template.metadata -> metadata
126+ formData . metadata = {
127+ ...( formData . metadata ?? { } ) ,
128+ ...( formData . template ?. metadata ?? { } ) ,
129+ }
130+
120131 formData . encryptedData = mapObjectToKeyValueArray ( formData ?. encryptedData as Record < string , string > )
132+
121133 formData . metadata . annotations = mapObjectToKeyValueArray ( formData ?. metadata ?. annotations as Record < string , string > )
134+
122135 formData . metadata . labels = mapObjectToKeyValueArray ( formData ?. metadata ?. labels as Record < string , string > )
123136 }
124137
You can’t perform that action at this time.
0 commit comments