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

Allow overriding "coreAnnotations" on Kubernetes Ingress objects #4349

Merged
merged 1 commit into from
Jan 10, 2022
Merged

Allow overriding "coreAnnotations" on Kubernetes Ingress objects #4349

merged 1 commit into from
Jan 10, 2022

Conversation

ttyS0e
Copy link
Contributor

@ttyS0e ttyS0e commented Jan 10, 2022

The return value appender for the Ingress object annotations map is set up in the wrong order.

I would like to override the default kubernetes.io/ingress.class: 'kong' in an API Spec, like this:

openapi: "3.0.0"
info:
  version: 1.0.0
  title: Customers MDM API
  x-kubernetes-ingress-metadata:
    annotations:
      kubernetes.io/ingress.class: 'mdm-workspace-ingress-class'

but I can't, because when coreAnnotations is appended to the map, it clobbers my value from the OAS.

changelog(Inso CLI): You can now override annotations on Kubernetes Ingress objects

@ttyS0e ttyS0e changed the title patch annotation overrides Allow overriding "coreAnnotations" on Kubernetes Ingress objects Jan 10, 2022
Copy link
Contributor

@develohpanda develohpanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the coreAnnotations was expanded last so as to ensure the required annotation(s) always exist, but if a user wants to override one they should have the ability to IMO. Thanks for the PR!

Copy link
Contributor

@dimitropoulos dimitropoulos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me as well. been thinking about it all day and I think of what I would test manually beyond your use-case. If we have to revisit later with a deep merge, then we can (to get more granular).

@dimitropoulos dimitropoulos merged commit 0ae0dd4 into Kong:develop Jan 10, 2022
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.

None yet

3 participants