Skip to content
This repository was archived by the owner on Apr 8, 2021. It is now read-only.
This repository was archived by the owner on Apr 8, 2021. It is now read-only.

fabric8.io/ingress.annotations is not parsed as yaml #206

Description

@aure-olli

fabric8.io/ingress.annotations annotation is not parsed as yaml. The parsing code is really stupid, and can fail just to extra spaces or newlines. It is even more problematic to set the nginx.ingress.kubernetes.io/configuration-snippet annotation that takes directly nginx code.

	annotationsForIngress := svc.Annotations["fabric8.io/ingress.annotations"]
	if annotationsForIngress != "" {
		annotations := strings.Split(annotationsForIngress, "\n")
		for _, element := range annotations {
			annotation := strings.SplitN(element, ":", 2)
			key, value := annotation[0], strings.TrimSpace(annotation[1])
			ingress.Annotations[key] = value
		}
	}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions