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(k8s): consistent types in manifest.Manifest #338

Merged
merged 2 commits into from
Aug 15, 2020
Merged

Conversation

sh0rez
Copy link
Member

@sh0rez sh0rez commented Aug 10, 2020

The manifest.Manifest is a map[string]interface{}, which sticks to what json.Unmarshal returns, meaning it only includes concrete values, []interface{} and map[string]interface{}.

In a v0.10 change I accidentally broke that, without realizing it:

Up to #312, this didn't create any issues. Now however, because we called Annotations on all objects, types weren't like they should have been.

This caused subsetdiff to miss annotations, not computing the subset on them at all.

Fixes #318

The manifest.Manifest is a `map[string]interface{}`, which sticks to
what `json.Unmarshal` returns, meaning it only includes concrete values,
`[]interface{}` and `map[string]interface{}`.

In a v0.10
change (https://github.com/grafana/tanka/blob/a6d5fde5aac69dc4d66bb57d5a501e52ba60fada/pkg/kubernetes/manifest/manifest.go#L248)
I accidentally broke that, without realizing it.

Up to #312, this didn't create any issues. Now however, because we
called `Annotations` on all objects, types weren't like they should have
been.

This caused subsetdiff to miss annotations, not computing the subset on
them at all.

Fixes #318
@sh0rez sh0rez added kind/bug Something isn't working component/kubernetes Working with Kubernetes clusters labels Aug 10, 2020
pkg/kubernetes/subsetdiff.go Show resolved Hide resolved
@sh0rez sh0rez merged commit 6548855 into master Aug 15, 2020
@sh0rez sh0rez deleted the metadata-typing branch August 15, 2020 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/kubernetes Working with Kubernetes clusters kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After Upgrade to v0.11.0 tk apply shows diff on Ingress annotations
2 participants