1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-04 21:35:23 +02:00

fix(annotations): parse annotation keys in angular forms [r8s-170] (#233)

This commit is contained in:
Ali 2024-12-11 17:50:08 +13:00 committed by GitHub
parent 94d2e32b49
commit e1388eff84
3 changed files with 9 additions and 5 deletions

View file

@ -118,7 +118,7 @@ export class KubernetesIngressConverter {
const res = new KubernetesIngress();
res.Name = formValues.IngressClass.Name;
res.Namespace = formValues.Namespace;
const pairs = _.map(formValues.Annotations, (a) => [a.Key, a.Value]);
const pairs = _.map(formValues.Annotations, (a) => [a.key, a.value]);
res.Annotations = _.fromPairs(pairs);
res.Annotations[PortainerIngressClassTypes] = formValues.IngressClass.Name;
res.IngressClassName = formValues.IngressClass.Name;
@ -149,8 +149,8 @@ export class KubernetesIngressConverter {
const annotations = _.map(_.toPairs(ingress.Annotations), ([key, value]) => {
if (key !== PortainerIngressClassTypes) {
const annotation = new KubernetesResourcePoolIngressClassAnnotationFormValue();
annotation.Key = key;
annotation.Value = value;
annotation.key = key;
annotation.value = value;
return annotation;
}
});