-
Notifications
You must be signed in to change notification settings - Fork 32
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
[K8s] Generate migration_services.yaml from ConfigMaps #1307
base: main
Are you sure you want to change the base?
Changes from all commits
39e8f1c
86b30c2
d7954d7
1d63751
8f00d31
b323537
60dbecd
e0e7435
4aba04c
ecff916
8f5eb79
5429bed
420bd0a
a04fdb5
6769b6c
2c75593
91d31c5
2794c9e
8b1337c
407f2f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[run] | ||
source = configmap2yaml | ||
|
||
[report] | ||
omit = | ||
*/tests/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: I like seeing test coverage information, makes it really clear when tests are disabled or we've got extraneous logic that should be reviewed |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Kubernetes Config Map Utility Library | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whats the lifecycle of this tool, it looks like it should be turned on and it watches for changes, or should it be triggered on /off by something? |
||
This library provides utilities for working with Kubernetes ConfigMaps and specifically generating a `migration_services.yaml` usable by the Migration Console from ConfigMap values | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you provide more details on where/how those ConfigMap values are set? |
||
|
||
## Development | ||
|
||
To install the library for development purposes, create a virtual env and install the library. It will automatically install its dependencies as well. | ||
|
||
```shell | ||
pipenv install | ||
``` | ||
|
||
To run `config_watcher.py` locally, a command like below can be used: | ||
```shell | ||
pipenv run config_watcher --outfile ./test.yaml | ||
``` | ||
|
||
### Unit Tests | ||
|
||
Unit tests can be run from this current `k8sConfigMapUtilScripts/` directory by first installing dependencies then running pytest: | ||
|
||
```shell | ||
pipenv install --dev | ||
pipenv run test | ||
``` | ||
|
||
### Coverage | ||
|
||
_Code coverage_ metrics can be generated after a unit-test run. A report can either be printed on the command line: | ||
|
||
```shell | ||
pipenv run coverage report | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we instead add the k8 urls that are common to the project like the above that we have so we can be sure we are using valid urls save for really specific items?