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

Added config for base path for web UI #170

Merged

Conversation

SebastianOsuna
Copy link
Contributor

Description

Added FLAGR_WEB_PREFIX env so it is possible to serve the static web UI from another path different to /

Motivation and Context

For example, if deploying flagger in ECS behind and ELB it wouldn't be possible to deploy Flagr anywhere but in the /* listener since the Web UI is served in / and the API in /api/v1, this would allow to server the UI from /web/flagr/* for example.

How Has This Been Tested?

Built the code in a docker image, set the environment variable to /web/flagr and the UI was loading from that prefix

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [?] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • [?] All new and existing tests passed.

@SebastianOsuna
Copy link
Contributor Author

I'm unsure if I am following the code style or if this change needs a test, please let me know, or any other comments. Thanks

@SebastianOsuna SebastianOsuna force-pushed the feature/web-prefix-via-env branch from e4c7f51 to 144f5bf Compare September 25, 2018 22:48
@codecov-io
Copy link

Codecov Report

Merging #170 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #170      +/-   ##
==========================================
+ Coverage      93%   93.02%   +0.02%     
==========================================
  Files          25       25              
  Lines        1330     1334       +4     
==========================================
+ Hits         1237     1241       +4     
  Misses         63       63              
  Partials       30       30
Impacted Files Coverage Δ
pkg/config/middleware.go 100% <100%> (ø) ⬆️

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 63609e8...144f5bf. Read the comment docs.

Copy link
Collaborator

@zhouzhuojie zhouzhuojie 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!

@zhouzhuojie zhouzhuojie merged commit 754fa17 into openflagr:master Sep 25, 2018
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