Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix configmaps and annotation parsing #82

Merged
merged 1 commit into from
Nov 24, 2016
Merged

Fix configmaps and annotation parsing #82

merged 1 commit into from
Nov 24, 2016

Conversation

pleshakov
Copy link
Contributor

Fixes parsing of annotations and configmaps.

@pleshakov
Copy link
Contributor Author

@thetechnick
I added a third return value to the GetMapKeyAs* functions. This value shows if the key exists. I think it's better to treat a missing key as not an error.
There were few related bugs. For example, in Configurator:

HTTP2, err := GetMapKeyAsBool(ingEx.Ingress.Annotations, "nginx.org/http2", ingEx.Ingress)
if err != nil && err != ErrorKeyNotFound {
	glog.Error(err)
} else {
	ingCfg.HTTP2 = HTTP2
}

the line ingCfg.HTTP2 = HTTP2 was executed even when the annotation wasn't present in the Ingress resource. This led to overriding values set via ConfigMap.

@thetechnick
Copy link
Contributor

@pleshakov
I like the additonal return value.
Sorry for the error. I will test my next PRs more thoroughly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants