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

Updating incorrect Ingress annotation value does not update Gslb #1765

Open
donovanmuller opened this issue Oct 28, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@donovanmuller
Copy link
Contributor

donovanmuller commented Oct 28, 2024

K8gb version: 0.14.0

Using Ingress annotations and initially providing an invalid value for k8gb.io/strategy for example:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
    alb.ingress.kubernetes.io/ssl-redirect: "443"
    alb.ingress.kubernetes.io/target-type: ip
    k8gb.io/primary-geotag: eu
    k8gb.io/strategy: round-robin # incorrect
...

will result in a new implicit Gslb resource with the incorrect value. Controller logs show the expected error:

2024-10-28T19:31:29Z ERR github.com/k8gb-io/k8gb/controllers/logging/logr.go:72 > events: Reconciler error {"Gslb":"test/xxx","controller":"gslb","controllerGroup":"k8gb.absa.oss","controllerKind":"Gslb","name":"xxx","namespace":"test","reconcileID":"59640c10-7eb4-4ed7-bc6b-f9ff18f91b28"} error="resolving spec ('Type' must be one of the values [roundRobin geoip failover])"

However, adjusting the incorrect k8gb.io/strategy value to roundRobin does not update the Gslb resource.

@donovanmuller donovanmuller added the bug Something isn't working label Oct 28, 2024
@abaguas
Copy link
Collaborator

abaguas commented Nov 6, 2024

Would you be able to migrate to the new refResolver structure?
That would help simplifying the codebase since we would not have to watch any resources besides the GSLB.

apiVersion: k8gb.absa.oss/v1beta1
kind: Gslb
metadata:
  name: test-gslb-failover
  namespace: test-gslb
spec:
  resourceRef:
    apiVersion: networking.k8s.io/v1
    kind: Ingress
    matchLabels:
      app: test-gslb-failover
  strategy:
    type: failover
    primaryGeoTag: eu-west-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants