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 annotations on stack nginx service #62

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ClashTheBunny
Copy link

This allows choosing an IP, for example. Or getting an SSL cert

Description

This alows adding annotations to the nginx service, like:

service:
  annotations:
    metallb.universe.tf/address-pool: bgp

Why is this needed

It is sometimes needed to add annotations depending on the configuration of the cluster, like if you want to use kubevip instead of the normal ingress.

Fixes: #

How Has This Been Tested?

I've tried it both with and without annotations, and it works both way, but with annotations for my metallb address-pool, the service gets a BGP address, and not an ARP'd address.

How are existing users impacted? What migration steps/scripts do we need?

This should be transparent, default dict is empty, so no annotations are the default.

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

@jacobweinstock
Copy link
Member

Thanks @ClashTheBunny. Mind resolving the DCO failure, please? reference

This allows choosing an IP, for example. Or getting an SSL cert
@jacobweinstock jacobweinstock force-pushed the allow-annotations-on-stack-nginx-service branch from 857b9a3 to cca4002 Compare October 16, 2023 14:57
@@ -139,6 +139,10 @@ metadata:
app: {{ .Values.stack.name }}
name: {{ .Values.stack.name }}
namespace: {{ .Release.Namespace | quote }}
annotations:
{{- with .Values.stack.service.annotations | default dict }}
{{ toYaml . | nindent 4 }}
Copy link
Member

Choose a reason for hiding this comment

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

Are you confident this works properly? I would've thought you'd want a preceding - to get rid of the whitespace up to annotations:.

    {{- toYaml . | nindent 4 }}

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