Adding annotations to Docker Services.

Bootchy98

Cadet
Joined
Feb 15, 2022
Messages
3
Heya!

So i'm getting along with RC2, working quite nice already!
But i'm running into an issue with Docker/k3s application setup.

Let's share the setup:
MetalLB installed using the Truecharts Catalog, defined the address pool at "10.30.10.11-10.30.10.49".
Pi-Hole installed, also using Truecharts, using the LoadBalancer option in the service entry's.

Using the metalLB, it gives al the respective services from the Pi-Hole container/pod a unique IP.
The issue with this, is that metalLB assigns unique IP's to all services seperately.
For PiHole (as an example) those services (DNS-TCP & DNS-UDP) need to be on the same IP address.

Easy, as one would say... Just add the "metallb.universe.tf/allow-shared-ip" annotation to the services, as described in the metalLB Manual.
Using that annotation you should be able to set the spec.loadBalancerIP on both services to the same IP, i.e. 10.30.10.11.

Current issue:
There is no entry for "annotations" in the gui when setting up a service.
Not even when setting up a Docker/k3s application manually.

Adding the annotation to a respective k8s/k3s service config file would be something like this:
Code:
apiVersion: v1
kind: Service
metadata:
  name: PiHole-DNS-TCP
  annotations:
    metallb.universe.tf/allow-shared-ip
spec:
  selector:
    app: pihole
  ports:
  - protocol: TCP
    port: 53
    targetPort: 53
  type: LoadBalancer
 
apiVersion: v1
kind: Service
metadata:
  name: PiHole-DNS-UDP
  annotations:
    metallb.universe.tf/allow-shared-ip
spec:
  selector:
    app: pihole
  ports:
  - protocol: UDP
    port: 53
    targetPort: 53
  type: LoadBalancer


As such my question is:
How does one add an annotation to a service?

Hopefully someone can clarify this for me...

Kind Regards,

Bootchy98 | Kevin
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
As such my question is:
How does one add an annotation to a service?
Seems you're using TrueCharts (which is not the official repository).
Some settings might and some settings might not be exposed (by default).

A GUI does not build itself, it needs carefull attention from our developers.
If you've any more questions about our platform in the (near) future, it might be best to reach out to our support staff directly.
 

Bootchy98

Cadet
Joined
Feb 15, 2022
Messages
3
Seems you're using TrueCharts (which is not the official repository).
Some settings might and some settings might not be exposed (by default).

A GUI does not build itself, it needs carefull attention from our developers.
If you've any more questions about our platform in the (near) future, it might be best to reach out to our support staff directly.
Thank you for the reply.

As I've stated, the issue I'm experiencing does not only exist when using TrueCharts.
I've ruled this out by trying to manually "Launch Docker Image", and adding it in the process.

I get that a GUI takes a da*n long time to build and make it 100%, but for the time being, I could use another solution.

I've also already tried changing the ix_values.yaml file in the /releases/pihole folder.
Code:
 
service:
  main:
    annotations:
      metallb.universe.tf/allow-shared-ip: pihole
    ports:
      main:
        port: 9089
        targetPort: 80
  dns-tcp:
    enabled: true
    annotations:
      metallb.universe.tf/allow-shared-ip: pihole
    ports:
      dns-tcp:
        enabled: true
        port: 53
        targetPort: 53
  dns:
    enabled: true
    annotations:
      metallb.universe.tf/allow-shared-ip: pihole
    ports:
      dns:
        enabled: true
        protocol: UDP
        port: 53
        targetPort: 53


With no avail, and thus the following error code (not that that matters xD)
 

Bootchy98

Cadet
Joined
Feb 15, 2022
Messages
3
Code:
"error":"can't change sharing key for \"ix-pihole/pihole-dns-tcp\", address also in use by ix-pihole/pihole: existing service does not allow sharing","level":"error","msg":"IP allocation failed","op":"allocateIP","service":"ix-pihole/pihole-dns-tcp"


Any party tricks to share by anyone?
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
Thank you for the reply.

As I've stated, the issue I'm experiencing does not only exist when using TrueCharts.
I've ruled this out by trying to manually "Launch Docker Image", and adding it in the process.

I get that a GUI takes a da*n long time to build and make it 100%, but for the time being, I could use another solution.

Every App creator (including Launch Docker) makes their own GUI.
It just happens to exist on both due to both of us not implementing this.


Code:
"error":"can't change sharing key for \"ix-pihole/pihole-dns-tcp\", address also in use by ix-pihole/pihole: existing service does not allow sharing","level":"error","msg":"IP allocation failed","op":"allocateIP","service":"ix-pihole/pihole-dns-tcp"


Any party tricks to share by anyone?

We don't actively support hacking away at our Apps, but to give you some insight:
IP sharing might not work with different protocols even with that annotation set.
 
Top