-
Notifications
You must be signed in to change notification settings - Fork 433
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
Gloo-ee mixes extraAnnotations for two gatewayProxy service resources #4914
Comments
It can be reproduced in gloo-ee-1.7.0 helm chart, but not in gloo-ee-1.6.31 helm chart. |
This is not fixed in ee 1.8.1. The the following values.yaml gloo:
gatewayProxies:
gatewayProxy:
disabled: true
gatewayProxyPublic:
disabled: false
gatewayProxyInternal:
disabled: false
service:
extraAnnotations:
a: b results in the # Source: gloo-ee/charts/gloo/templates/8-gateway-proxy-service.yaml
apiVersion: v1
kind: Service
metadata:
labels:
app: gloo
gloo: gateway-proxy
gateway-proxy-id: gateway-proxy-internal
name: gateway-proxy-internal
namespace: default
annotations:
a: "b"
prometheus.io/path: "/metrics"
prometheus.io/port: "8081"
prometheus.io/scrape: "true"
spec:
---
# Source: gloo-ee/charts/gloo/templates/8-gateway-proxy-service.yaml
apiVersion: v1
kind: Service
metadata:
labels:
app: gloo
gloo: gateway-proxy
gateway-proxy-id: gateway-proxy-public
name: gateway-proxy-public
namespace: default
annotations:
a: "b"
prometheus.io/path: "/metrics"
prometheus.io/port: "8081"
prometheus.io/scrape: "true"
spec:
this fixes it (gloo-ee\charts\gloo\templates\8-gateway-proxy-service.yaml) +{{- range $name, $gatewaySpec := .Values.gatewayProxies }}
{{- $defaultGatewayProxySafe := deepCopy $gatewayProxy -}}
{{- $_ := unset $defaultGatewayProxySafe.service "extraAnnotations" -}}
-{{- range $name, $gatewaySpec := .Values.gatewayProxies }}
{{- $spec := deepCopy $gatewaySpec | mergeOverwrite $defaultGatewayProxySafe -}} |
As discussed in @kdorosh's comment on #4953, that PR only partially resolved this issue
The default gateway proxy ( a: value_a
b: value_b_2
c: value_c As you can see, the default gateway proxy inherits the annotation One proposition for resolving this issue has been to relocate inherited annotations under a different attribute, I.E.,: service:
extraAnnotations:
a: value_a
b: value_b_2
defaultAnnotations:
c: value_c |
Describe the bug
If we config two gatewayProxy instances under gloo.gatewayProxies in extra value file and install it through helm chart, the extraAnnotations values of gloo.gatewayProxies.gatewayProxy will be added to another gloo.gatewayProxies.gatewayProxyAny.
To Reproduce
Steps to reproduce the behavior:
helm install gloo glooe/gloo-ee --version 1.7.9 -f value.yml --namespace gloo-system
--create-namespace --set-string license_key=YOUR_LICENSE_KEY
To demonstrate the issue, we can also get the template only:
helm template "gloo" glooe/gloo-ee -f value.yml --version 1.7.9
Expected behavior
The annotations for k8s service resouce "gateway-proxy-foo" should be:
Additional context
Add any other context about the problem here, e.g.
gloo-ee-1.7.9 helm chart
AWS eks 1.18
The text was updated successfully, but these errors were encountered: