solo-io / gloo

The Cloud-Native API Gateway and AI Gateway
https://docs.solo.io/
Apache License 2.0
4.1k stars 446 forks source link

gloo-ee chart renders invalid yaml when default gw proxy disabled and kubeResourceOverride is used #8025

Open jenshu opened 1 year ago

jenshu commented 1 year ago

Gloo Edge Version

1.12.x

Kubernetes Version

None

Describe the bug

Trying to install GlooEE with these values

gloo:
  gatewayProxies:
    gatewayProxy:
      disabled: true
    otherProxy:
      disabled: false
      kubeResourceOverride:
        spec:
          template:
            metadata:
              labels:
                foo: bar
license_key: foobar

results in an error Error: Failed to render chart: exit status 1: Error: unable to build kubernetes objects from release manifest: error parsing : invalid Yaml document separator: apiVersion: apps/v1 due to the --- separator not being on its own line:

# Source: gloo-ee/charts/gloo/templates/7-gateway-proxy-deployment.yaml
---apiVersion: apps/v1
kind: Deployment

This seems to only occur when all the following are true:

Might be fixed by moving the divider to right after this line

We should add testing to ensure we're not making the same mistake in other templates too.

Steps to reproduce the bug

see above

Expected Behavior

render valid yaml

Additional Context

No response

ben-taussig-solo commented 7 months ago

I have just moved this issue to blocked. Some context:

sam-heilbron commented 7 months ago

It would be nice if we expanded our manifest renderer utility: https://github.com/solo-io/go-utils/tree/main/helmutils, so that we could proactively catch issues like this in the future

ben-taussig-solo commented 7 months ago

After reviewing this slack thread, I believe that:

AlfredoFausto commented 3 months ago

Can we prioritize this @nfuden @jbohanon??

nfuden commented 3 months ago

@kcbabo for prioritization question

sam-heilbron commented 2 months ago

This issue, still exists. There is a bug in our Helm chart, that is trigged when using the kubeResourceOverride. However, there was an enhancement made to the Helm API, to support the priority class name. The following issues were resolved by the linked PR:

The idea was that supporting the priorityClassName on the proxy would bypass the need to rely on the kubeResourceOverride. This was based on a conversation with @AlfredoFausto .

cc @BeauSelisker28 @kcbabo