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

[demo] Remove FeatureFlagService and add flagd #1082

Merged
merged 16 commits into from
Apr 5, 2024

Conversation

julianocosta89
Copy link
Member

The PR open-telemetry/opentelemetry-demo#1388 removed FeatureFlag Service and replaced it with flagd.

This PR updates the charts to reflect the latest changes on the demo.
It also updates the dependencies charts.

@julianocosta89 julianocosta89 requested a review from a team March 13, 2024 22:22
@julianocosta89
Copy link
Member Author

@puckpuck you mention in the .env file that # must also update version field in /src/grafana/provisioning/datasources/opensearch.yml, does that also apply for the Helm Chart?

I've updated opensearch, but I couldn't find where to update it on Grafana datasource.

@puckpuck
Copy link
Contributor

Line 809 of the values file for the Helm chart.

I'm on PTO using my phone so apologies for the short message.

@julianocosta89
Copy link
Member Author

Line 809 of the values file for the Helm chart.

Thank you!

@julianocosta89
Copy link
Member Author

Hey @TylerHelmuth 👋🏽

Do you happen to know what am I doing wrong here?
I'm trying to create the flagd configMap and attach it to the container, but I'm failing miserably 😭

@AlexPSplunk
Copy link

AlexPSplunk commented Mar 19, 2024

For me the flagd container just runs and exits as if no config has been specified. Configmap appears to be mounted at /etc/flagd. Below is the output I get when looking at the flagd container logs.
Is it possible that the flagd container build is bad?

$ kubectl logs astroshop-edu-o11y-flagd-6f85c496b9-j2f5f

		 ______   __       ________   _______    ______
		/_____/\ /_/\     /_______/\ /______/\  /_____/\
		\::::_\/_\:\ \    \::: _  \ \\::::__\/__\:::_ \ \
		 \:\/___/\\:\ \    \::(_)  \ \\:\ /____/\\:\ \ \ \
		  \:::._\/ \:\ \____\:: __  \ \\:\\_  _\/ \:\ \ \ \
		   \:\ \    \:\/___/\\:.\ \  \ \\:\_\ \ \  \:\/.:| |
		    \_\/     \_____\/ \__\/\__\/ \_____\/   \____/_/

Flagd is a simple command line tool for fetching and presenting feature flags to services. It is designed to conform to Open Feature schema for flag definitions.

Usage:
  flagd [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  start       Start flagd
  version     Print the version number of flagd

Flags:
      --config string   config file (default is $HOME/.agent.yaml)
  -x, --debug           verbose logging
  -h, --help            help for flagd

Use "flagd [command] --help" for more information about a command.```

Signed-off-by: Pierre Tessier <[email protected]>
# Conflicts:
#	charts/opentelemetry-demo/Chart.yaml
#	charts/opentelemetry-demo/examples/bring-your-own-observability/rendered/component.yaml
#	charts/opentelemetry-demo/examples/bring-your-own-observability/rendered/serviceaccount.yaml
#	charts/opentelemetry-demo/examples/collector-as-daemonset/rendered/component.yaml
#	charts/opentelemetry-demo/examples/collector-as-daemonset/rendered/grafana-dashboards.yaml
#	charts/opentelemetry-demo/examples/collector-as-daemonset/rendered/serviceaccount.yaml
#	charts/opentelemetry-demo/examples/custom-environment-variables/rendered/component.yaml
#	charts/opentelemetry-demo/examples/custom-environment-variables/rendered/grafana-dashboards.yaml
#	charts/opentelemetry-demo/examples/custom-environment-variables/rendered/serviceaccount.yaml
#	charts/opentelemetry-demo/examples/default/rendered/component.yaml
#	charts/opentelemetry-demo/examples/default/rendered/grafana-dashboards.yaml
#	charts/opentelemetry-demo/examples/default/rendered/serviceaccount.yaml
#	charts/opentelemetry-demo/examples/kubernetes-infra-monitoring/rendered/component.yaml
#	charts/opentelemetry-demo/examples/kubernetes-infra-monitoring/rendered/grafana-dashboards.yaml
#	charts/opentelemetry-demo/examples/kubernetes-infra-monitoring/rendered/serviceaccount.yaml
#	charts/opentelemetry-demo/examples/public-hosted-ingress/rendered/component.yaml
#	charts/opentelemetry-demo/examples/public-hosted-ingress/rendered/grafana-dashboards.yaml
#	charts/opentelemetry-demo/examples/public-hosted-ingress/rendered/serviceaccount.yaml
Signed-off-by: Pierre Tessier <[email protected]>
Signed-off-by: Pierre Tessier <[email protected]>
@puckpuck
Copy link
Contributor

@julianocosta89 I pushed a commit to your branch to get flagd working. There were a few small other issues, but the main one was having to specify the command arguments.

This did bring up an interesting point. Right now we have 2 environment variables, FLAGD_HOST and FLAGD_PORT. The demo uses both of these, but for everything else, we use a single _ADDR variant instead. I think we should update the demo to use this single variable instead.

Signed-off-by: Pierre Tessier <[email protected]>
@julianocosta89
Copy link
Member Author

@puckpuck I actually started doing that, but glad doesn't support it.

https://flagd.dev/reference/specifications/in-process-providers/?h=environmen#explicit-declaration

I'm on the phone so the link may not be pointing to the right place, but check out the environment variables in this page.

@julianocosta89
Copy link
Member Author

BTW, thanks for taking a look and fixing the PR

@julianocosta89
Copy link
Member Author

Would we be able to get this merged?
We are getting a bunch of PRs in the demo that would require helm updates, but the flagd is not merged yet.

@puckpuck
Copy link
Contributor

We need the demo to cut a release first, then we can target those images in this Helm chart to ensure all CI tests pass.

@julianocosta89 julianocosta89 changed the title Remove FeatureFlagService and add flagd [demo] Remove FeatureFlagService and add flagd Apr 3, 2024
@julianocosta89
Copy link
Member Author

@puckpuck this one should be good to go! 🥳

@puckpuck
Copy link
Contributor

puckpuck commented Apr 5, 2024

@julianocosta89 I updated NOTES.txt to remove references to the old feature flag UI, and replaced demo.flagd.json with the same from the demo repo to ensure they are the same.

Everything looks good!

@TylerHelmuth TylerHelmuth merged commit 5009834 into open-telemetry:main Apr 5, 2024
3 checks passed
@julianocosta89 julianocosta89 deleted the demo-add-flagd branch April 6, 2024 19:59
12ushan pushed a commit to giffgaff/opentelemetry-helm-charts that referenced this pull request Jul 22, 2024
* Remove FeatureFlagService and add flagd

* Override image name

* Update Grafana OpenSearch datasource version

* Update Grafana OpenSearch datasource

* fix flagd service

Signed-off-by: Pierre Tessier <[email protected]>

* fix flagd service

Signed-off-by: Pierre Tessier <[email protected]>

* fix flagd service

Signed-off-by: Pierre Tessier <[email protected]>

* fix flagd service

Signed-off-by: Pierre Tessier <[email protected]>

* Update chart with latest release

* Update shippingservice env var

* Remove feature flag service from notes

Signed-off-by: Pierre Tessier <[email protected]>

* Use demo.flagd.json from demo repo

Signed-off-by: Pierre Tessier <[email protected]>

---------

Signed-off-by: Pierre Tessier <[email protected]>
Co-authored-by: Pierre Tessier <[email protected]>
Co-authored-by: Tyler Helmuth <[email protected]>
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.

4 participants