init annotations if it is nil to fix kubemci e2e test failures

pull/8/head
nikhiljindal 2018-03-31 16:14:38 -07:00
parent 61cddc9a7f
commit cacc9cc87f
1 changed files with 3 additions and 0 deletions

View File

@ -1627,6 +1627,9 @@ func (j *IngressTestJig) SetUpBacksideHTTPSIngress(cs clientset.Interface, names
}
ingToCreate := generateBacksideHTTPSIngressSpec(namespace)
if staticIPName != "" {
if ingToCreate.Annotations == nil {
ingToCreate.Annotations = map[string]string{}
}
ingToCreate.Annotations[IngressStaticIPKey] = staticIPName
}
ingCreated, err := j.runCreate(ingToCreate)