jsknnr / enshrouded-server

Run Enshrouded dedicated server in a container
MIT License
176 stars 20 forks source link

Enhancement Request: Add Custom Annotation Option for Service #54

Closed Enorshionari closed 2 months ago

Enorshionari commented 5 months ago

Issue: Currently, the service template in the helm chart lacks the ability to set custom annotations for services, which can be particularly beneficial for users utilizing metalLB or DigitalOcean LoadBalancers.

Suggestion: I propose adding an option to set custom annotations for services. This enhancement would allow users to define annotations tailored to their specific needs, providing greater flexibility and compatibility with various load balancing solutions.

apiVersion: v1
kind: Service
metadata:
  name: "enshrouded-dedicated-server-service"
  labels:
    app: "enshrouded-dedicated-server"
    chart: "enshrouded-dedicated-server-1.0.0"
    release: "enshrouded-test"
    heritage: "Helm"
  annotations:
    metallb.universe.tf/loadBalancerIPs: 192.168.88.200 # example MetalLB annotation
    custom.annotation/key: "value"  # custom annotation example
spec:
  type: LoadBalancer
  ports:
  - name: game-port
    port: 2222
    targetPort: game-port
    protocol: UDP
  - name: query-port
    port: 1111
    targetPort: query-port
    protocol: UDP
  selector:
    app: "enshrouded-dedicated-server"

Benefits:

Enhanced compatibility with metalLB and DigitalOcean LoadBalancers. Empowers users to define custom annotations tailored to their specific requirements. Provides greater flexibility in configuring and optimizing load balancing solutions.

jsknnr commented 5 months ago

I am using MetalLB myself with BGP route advertisement with the current chart. The MetalLB annotations seem to get plugged in automatically, at least the one that I need. However, I see your point for flexibility. I'll take a look at being able to specify arbitrary annotations.