apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

feat: allow to use env variables in config

Open ikatlinsky opened this issue 2 years ago • 6 comments

Why submit this pull request?

  • [ ] Bugfix
  • [x] New feature provided
  • [ ] Improve performance
  • [ ] Backport patches

What changes will this PR take into?

This ticket adds an ability to use environment variables in the dashboard configuration using viper decode hooks. Such change is required to simplify dashboard configuration based on the environment type. For example can be useful to provide dashboard users and their passwords.

Related issues

https://github.com/apache/apisix-dashboard/issues/2818

Checklist:

  • [x] Did you explain what problem does this PR solve? Or what new features have been added?
  • [x] Have you added corresponding test cases?
  • [ ] Have you modified the corresponding document?
  • [x] Is this PR backward compatible?

ikatlinsky avatar Jun 05 '23 10:06 ikatlinsky

Codecov Report

Merging #2819 (14c292b) into master (e0290c8) will decrease coverage by 2.84%. The diff coverage is 87.50%.

:exclamation: Current head 14c292b differs from pull request most recent head 06577e2. Consider uploading reports for the commit 06577e2 to get more accurate results

@@            Coverage Diff             @@
##           master    #2819      +/-   ##
==========================================
- Coverage   77.49%   74.65%   -2.84%     
==========================================
  Files         139      201      +62     
  Lines        3746     7860    +4114     
  Branches      881      881              
==========================================
+ Hits         2903     5868    +2965     
- Misses        843     1681     +838     
- Partials        0      311     +311     
Flag Coverage Δ
backend-e2e-test-ginkgo 65.16% <87.50%> (?)
backend-unit-test 50.10% <87.50%> (?)
frontend-e2e-test 77.44% <ø> (-0.06%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
api/internal/conf/conf.go 67.87% <87.50%> (ø)

... and 62 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Jun 05 '23 12:06 codecov-commenter

@Gallardot fixed the failing unit test, please approve workflow execution

ikatlinsky avatar Jun 05 '23 12:06 ikatlinsky

@juzhiyuan @bzp2010 @guoqqqi Sorry guys, can we proceed with this feature? Your reviews are very desired, thanks.

ikatlinsky avatar Jun 23 '23 14:06 ikatlinsky

@juzhiyuan @bzp2010 @guoqqqi up for review, thanks

ikatlinsky avatar Jul 26 '23 06:07 ikatlinsky

Hello, I personally not available those months.

juzhiyuan avatar Jul 27 '23 03:07 juzhiyuan

@bzp2010 @Baoyuantop hi, hope you will be able to check proposed changes, thanks

ikatlinsky avatar Aug 29 '23 16:08 ikatlinsky

I have to close this PR. Refer to https://github.com/apache/apisix-dashboard/issues/2981

juzhiyuan avatar Apr 17 '25 16:04 juzhiyuan