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

feat: expose stats tags in gateway-proxy stats config #8333

Merged
merged 5 commits into from
Jul 5, 2023

Conversation

jlourenc
Copy link
Contributor

@jlourenc jlourenc commented Jun 2, 2023

Description

This new feature can be used to configure gateway proxies stats configuration with stats tags.

Checklist:

  • I included a concise, user-facing changelog (for details, see https://github.com/solo-io/go-utils/tree/main/changelogutils) which references the issue that is resolved.
  • If I updated APIs (our protos) or helm values, I ran make -B install-go-tools generated-code to ensure there will be no code diff
  • I followed guidelines laid out in the Gloo Edge contribution guide
  • I opened a draft PR or added the work in progress label if my PR is not ready for review
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@jlourenc jlourenc requested a review from a team as a code owner June 2, 2023 13:23
@solo-build-bot
Copy link

solo-build-bot bot commented Jun 2, 2023

Waiting for approval from someone in the solo-io org to start testing.

@jlourenc jlourenc force-pushed the expose-statsconfig-tags branch 2 times, most recently from 90177b9 to b5b9356 Compare June 2, 2023 14:05
Copy link
Contributor

@sam-heilbron sam-heilbron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @jlourenc!

I like the idea here, there are just a few changes that we'll need to make:

  1. https://github.com/solo-io/gloo/blob/main/install/helm/gloo/generate/values.go is the source of truth for our helm docs. If you update the configuration you want to modify, and then run code-generation, the helm reference docs will be dynamically updated
  2. For any helm changes, we use https://github.com/solo-io/gloo/blob/main/install/test/helm_test.go to write a unit test to assert that the generated manifests match what we would expect. https://github.com/solo-io/gloo/blob/main/install/test/helm_test.go#L3607 is an example of a test that will be similar to yours (ie we apply some values, render the manifests, and assert the existence of the injected configuration)
  3. Have you explored https://docs.solo.io/gloo-edge/latest/reference/helm_chart_values/open_source_helm_chart_values/#helm-chart-kuberesourceoverrides? We expose a way to inject custom values to a lot of our templates, and perhaps you can use this to define the stats configuration generically (without being blocked by this helm change)

@jlourenc jlourenc force-pushed the expose-statsconfig-tags branch 2 times, most recently from c86859d to d78cc8a Compare June 15, 2023 00:14
@jlourenc
Copy link
Contributor Author

Hey @sam-heilbron , thanks for taking a look.

  1. I believe I have done the appropriate changes.
  2. I have added a unit-test.
  3. Unfortunately, I believe this mechanism is not available in this scenario as envoy.yaml is a string.

@sam-heilbron
Copy link
Contributor

/test

Copy link
Contributor

@sam-heilbron sam-heilbron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great! Sorry for the delay in getting back to you

changelog/v1.15.0-beta14/gwp-stats-config.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@sheidkamp sheidkamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! I have a few suggestions to tighten up the test.

Allows configuring Envoy stats_config propety in Gateway Proxy.
@jlourenc
Copy link
Contributor Author

jlourenc commented Jul 3, 2023

I have taken your suggestions onboard to update the test. Please take another look 🙏🏼

sheidkamp
sheidkamp previously approved these changes Jul 5, 2023
Copy link
Contributor

@sheidkamp sheidkamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but please don't squash between reviews in the future! It takes away the ability to see just the changes since the review. Thanks for the feature!

elcasteel
elcasteel previously approved these changes Jul 5, 2023
@elcasteel
Copy link
Contributor

/test run build-bot

@sheidkamp sheidkamp dismissed stale reviews from elcasteel and themself via bafa618 July 5, 2023 16:45
@sheidkamp
Copy link
Contributor

/kick not sure what's hung up

@sheidkamp
Copy link
Contributor

/test run build-bot

sheidkamp
sheidkamp previously approved these changes Jul 5, 2023
elcasteel
elcasteel previously approved these changes Jul 5, 2023
@sheidkamp sheidkamp dismissed stale reviews from elcasteel and themself via 52bd8f7 July 5, 2023 17:32
@elcasteel
Copy link
Contributor

/test rerun build bot with new changes

@soloio-bulldozer soloio-bulldozer bot merged commit df8555c into solo-io:main Jul 5, 2023
11 checks passed
jenshu pushed a commit that referenced this pull request Jul 12, 2023
* feat: expose Envoy statistics configuration in gwp

Allows configuring Envoy stats_config propety in Gateway Proxy.

* Update install/helm/gloo/generate/values.go

Co-authored-by: Rachael Graham <rachael.graham@solo.io>

* changelog and update docs

* Update gwp-stats-config.yaml

---------

Co-authored-by: Seth Heidkamp <61526534+sheidkamp@users.noreply.github.com>
Co-authored-by: Rachael Graham <rachael.graham@solo.io>
Co-authored-by: sheidkamp <seth.heidkamp@gmail.com>
soloio-bulldozer bot pushed a commit that referenced this pull request Jul 12, 2023
* feat: expose stats tags in gateway-proxy stats config (#8333)

* feat: expose Envoy statistics configuration in gwp

Allows configuring Envoy stats_config propety in Gateway Proxy.

* Update install/helm/gloo/generate/values.go

Co-authored-by: Rachael Graham <rachael.graham@solo.io>

* changelog and update docs

* Update gwp-stats-config.yaml

---------

Co-authored-by: Seth Heidkamp <61526534+sheidkamp@users.noreply.github.com>
Co-authored-by: Rachael Graham <rachael.graham@solo.io>
Co-authored-by: sheidkamp <seth.heidkamp@gmail.com>

* move cl

* Update gwp-stats-config.yaml

* Update gwp-stats-config.yaml

---------

Co-authored-by: Jérémy Lourenço <jeremy.lourenco@snyk.io>
Co-authored-by: Seth Heidkamp <61526534+sheidkamp@users.noreply.github.com>
Co-authored-by: Rachael Graham <rachael.graham@solo.io>
Co-authored-by: sheidkamp <seth.heidkamp@gmail.com>
@jlourenc jlourenc deleted the expose-statsconfig-tags branch July 12, 2023 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants