Only copy fields being used
This commit is contained in:
parent
67808c0ed8
commit
f78e2e3849
1 changed files with 4 additions and 2 deletions
|
@ -594,7 +594,9 @@ func (s *k8sStore) extractAnnotations(ing *extensions.Ingress) {
|
||||||
key := k8s.MetaNamespaceKey(ing)
|
key := k8s.MetaNamespaceKey(ing)
|
||||||
glog.V(3).Infof("updating annotations information for ingress %v", key)
|
glog.V(3).Infof("updating annotations information for ingress %v", key)
|
||||||
|
|
||||||
copyIng := ing.DeepCopy()
|
copyIng := &extensions.Ingress{}
|
||||||
|
ing.ObjectMeta.DeepCopyInto(©Ing.ObjectMeta)
|
||||||
|
ing.Spec.DeepCopyInto(©Ing.Spec)
|
||||||
|
|
||||||
for ri, rule := range copyIng.Spec.Rules {
|
for ri, rule := range copyIng.Spec.Rules {
|
||||||
if rule.HTTP == nil {
|
if rule.HTTP == nil {
|
||||||
|
@ -610,7 +612,7 @@ func (s *k8sStore) extractAnnotations(ing *extensions.Ingress) {
|
||||||
|
|
||||||
err := s.listers.IngressWithAnnotation.Update(&ingress.Ingress{
|
err := s.listers.IngressWithAnnotation.Update(&ingress.Ingress{
|
||||||
Ingress: *copyIng,
|
Ingress: *copyIng,
|
||||||
ParsedAnnotations: s.annotations.Extract(copyIng),
|
ParsedAnnotations: s.annotations.Extract(ing),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Error(err)
|
glog.Error(err)
|
||||||
|
|
Loading…
Reference in a new issue