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

Support OSM progressive traffic shifting in Flagger #955

Merged
merged 1 commit into from
Aug 12, 2021
Merged

Support OSM progressive traffic shifting in Flagger #955

merged 1 commit into from
Aug 12, 2021

Conversation

johnsonshi
Copy link
Contributor

@johnsonshi johnsonshi commented Jul 19, 2021

  • OSM Kustomize file and patch yaml files
  • OSM Metrics Observer with request-success-rate and request-duration based on osm-specific prometheus metrics
  • OSM Router (using SMI v1alpha2 router)
  • OSM option in Flagger main.go/init() --mesh-provider option
  • OSM option in Flagger helm install
  • OSM example yaml files for osm-canary.yaml and osm-canary-steps.yaml in artifacts/examples
  • E2E tests for OSM working with Flagger (canary promotion test, canary rollback test, canary promotion steps test)

@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2021

Codecov Report

Merging #955 (11375b6) into main (e2b08eb) will decrease coverage by 0.12%.
The diff coverage is 28.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #955      +/-   ##
==========================================
- Coverage   56.88%   56.76%   -0.13%     
==========================================
  Files          71       72       +1     
  Lines        5861     5886      +25     
==========================================
+ Hits         3334     3341       +7     
- Misses       2032     2046      +14     
- Partials      495      499       +4     
Impacted Files Coverage Δ
pkg/metrics/observers/factory.go 0.00% <0.00%> (ø)
pkg/router/factory.go 0.00% <0.00%> (ø)
pkg/metrics/observers/osm.go 46.66% <46.66%> (ø)
pkg/canary/config_tracker.go 83.40% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2b08eb...11375b6. Read the comment docs.

@johnsonshi johnsonshi changed the title Support osm in flagger Support osm progressive traffic shifting in flagger Jul 19, 2021
@johnsonshi
Copy link
Contributor Author

Related to openservicemesh/osm#1700

@johnsonshi
Copy link
Contributor Author

I have decided to write and include OSM Flagger docs in a separate PR immediately after this one (as this PR is getting large), which is why I reversed my docs additions: 003f1b3

@johnsonshi
Copy link
Contributor Author

johnsonshi commented Jul 20, 2021

@stefanprodan // @draychev - The E2E tests are currently failing not due to issues with this PR, but due to issues with Traefik's recent release. Running the Traefik E2E test run script (from latest upstream main commit) on a newly-created kind cluster fails as seen below.

~/Dev/src/github.com/fluxcd/flagger(main) » kind create cluster                                                                                                                                    johnsonshi@DESKTOP-AQ60TOB
Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.21.1) 🖼
 ✓ Preparing nodes 📦
 ✓ Writing configuration 📜
 ✓ Starting control-plane 🕹️
 ✓ Installing CNI 🔌
 ✓ Installing StorageClass 💾
Set kubectl context to "kind-kind"
You can now use your cluster with:

kubectl cluster-info --context kind-kind

Not sure what to do next? 😅  Check out https://kind.sigs.k8s.io/docs/user/quick-start/
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
~/Dev/src/github.com/fluxcd/flagger(main) » kubectl cluster-info --context kind-kind                                                                                                               johnsonshi@DESKTOP-AQ60TOB
Kubernetes control plane is running at https://127.0.0.1:51503
CoreDNS is running at https://127.0.0.1:51503/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
~/Dev/src/github.com/fluxcd/flagger(main) » git checkout main                                                                                                                                      johnsonshi@DESKTOP-AQ60TOB
Already on 'main'
Your branch is up to date with 'origin/main'.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
~/Dev/src/github.com/fluxcd/flagger(main) » git remote -v                                                                                                                                          johnsonshi@DESKTOP-AQ60TOB
origin	git@github.com:johnsonshi/flagger.git (fetch)
origin	git@github.com:johnsonshi/flagger.git (push)
upstream	https://github.com/fluxcd/flagger.git (fetch)
upstream	https://github.com/fluxcd/flagger.git (push)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
~/Dev/src/github.com/fluxcd/flagger(main) » git fetch upstream                                                                                                                                     johnsonshi@DESKTOP-AQ60TOB
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
~/Dev/src/github.com/fluxcd/flagger(main) » git rebase upstream/main                                                                                                                               johnsonshi@DESKTOP-AQ60TOB
Current branch main is up to date.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
~/Dev/src/github.com/fluxcd/flagger(main) » ./test/traefik/run.sh                                                                                                                                  johnsonshi@DESKTOP-AQ60TOB
>>> Creating traefik namespace
namespace/traefik created
>>> Installing Traefik
"traefik" already exists with the same configuration, skipping
Release "traefik" does not exist. Installing it now.
Error: unable to build kubernetes objects from release manifest: unable to decode "": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Annotations: ReadString: expects " or n, but found 9, error found in #10 byte of ...|io/port":9100,"prome|..., bigger context ...|metheus.io/path":"/metrics","prometheus.io/port":9100,"prometheus.io/scrape":"true"},"labels":{"app.|...
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

@johnsonshi johnsonshi marked this pull request as ready for review July 20, 2021 16:15
@johnsonshi johnsonshi requested a review from stefanprodan as a code owner July 20, 2021 16:15
pkg/metrics/observers/osm.go Outdated Show resolved Hide resolved
charts/podinfo/templates/tests/jwt.yaml Outdated Show resolved Hide resolved
charts/loadtester/templates/deployment.yaml Show resolved Hide resolved
@stefanprodan
Copy link
Member

@johnsonshi I have fixed the Traefik e2e tests, please rebase with main and force push.

@johnsonshi johnsonshi changed the title Support osm progressive traffic shifting in flagger Support OSM progressive traffic shifting in flagger Aug 10, 2021
@johnsonshi johnsonshi changed the title Support OSM progressive traffic shifting in flagger Support OSM progressive traffic shifting in Flagger Aug 10, 2021
@johnsonshi
Copy link
Contributor Author

It seems like Github Actions is facing an outage right now across different repos.

@johnsonshi
Copy link
Contributor Author

@stefanprodan This should be ready now.

@stefanprodan
Copy link
Member

stefanprodan commented Aug 11, 2021

@johnsonshi this looks great, can you squash/rearrange your commits please. Thank you!

Signed-off-by: Johnson Shi <Johnson.Shi@microsoft.com>
@johnsonshi
Copy link
Contributor Author

Hi @stefanprodan, just squashed my commits. Thanks!

@johnsonshi
Copy link
Contributor Author

Hi @stefanprodan, hopefully this can be merged soon! Thanks for all your comments in my PR.

Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @johnsonshi 🥇

PS. Are you going to add an OSM tutorial next?

@stefanprodan stefanprodan merged commit a6fae01 into fluxcd:main Aug 12, 2021
@johnsonshi johnsonshi deleted the support-osm-in-flagger branch August 12, 2021 19:20
@johnsonshi
Copy link
Contributor Author

Yes @stefanprodan, going to add the osm tutorial next.

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.

3 participants