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
Add Proposal of Refactor prepare_script #22
Conversation
Please squash your commits and fix the DCO issue. |
eb9f477
to
1fa9b97
Compare
|
||
|
||
4. Current config file is `harbor.cfg` which is configparser-style format. In order to describe more complex content, We need replace it using YAML format like `harbor.yml` . current config file may look like this. | ||
```yaml |
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.
Would it be possible to organize the yaml file in a more readable structure?
For example:
core:
proxy:
....
registry:
......
storage:
......
clair:
......
notary:
.....
Additionally, shall we remove the "user settings" from the configuration file?
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.
Agree with you, the final config file should like this. But the first step is compatible with the previous configParser format.
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.
Same comments
Two other goals we should consider to achieve in this refactor:
|
We also need a solution for migration from old |
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.
Please do changes.
├── Pipfile | ||
├── Pipfile.lock | ||
├── g.py | ||
├── main.py |
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.
Suggest adding comments for each file to describe what does the file do.
1. ``` | ||
├── Pipfile | ||
├── Pipfile.lock | ||
├── g.py |
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.
Suggest moving all the none global variables out of the g.py as it's used to keep global variables. Or rename it to v.py
/values.py
.
|
||
|
||
4. Current config file is `harbor.cfg` which is configparser-style format. In order to describe more complex content, We need replace it using YAML format like `harbor.yml` . current config file may look like this. | ||
```yaml |
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.
Same comments
| uaa_verify_cert | boolean | | ||
|
||
|
||
5. Packaging all files and its denpendencies into a container. All these codes and changes is related to python, so we should using official python images as the base image in Dockerfile. But there is a issue that some action need super user to operate. like change the owner and group of an file, create files on host system. I have no proper method to handle this. Maybe mount the directory on host specified in config file to container can solve last question. |
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.
Suggest adding an upgrading section to talk about how to upgrade config from old version to new version.
|
||
4. Current config file is `harbor.cfg` which is configparser-style format. In order to describe more complex content, We need replace it using YAML format like `harbor.yml` . current config file may look like this. | ||
```yaml | ||
## Configuration file of Harbor |
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.
Please append the property table copied from daojun's PR to let reviewers know what settings will be removed from harbor.yaml
.
1fa9b97
to
335ca02
Compare
I know the existing As far as I can tell, python is only used in some test scripts and the CLI tool which is deprecated. |
I think the effort of rewriting it into |
I have some relatively broad thoughts on the topic of having to run a With that said, though, I do agree with @nlowe that having multiple components in disparate languages is something we should eventually aim to address. We should pick one lingua franca and stick with it as much as possible (within reason). |
7f83531
to
2820575
Compare
Signed-off-by: Qian Deng <dengq@vmware.com>
Signed-off-by: Qian Deng <dengq@vmware.com>
…are_script.md Signed-off-by: Qian Deng <dengq@vmware.com>
2820575
to
81c4b1f
Compare
Signed-off-by: Qian Deng <dengq@vmware.com>
Signed-off-by: Qian Deng <dengq@vmware.com>
Signed-off-by: Qian Deng <dengq@vmware.com>
Signed-off-by: Qian Deng <dengq@vmware.com>
Signed-off-by: Qian Deng <dengq@vmware.com>
Signed-off-by: Qian Deng <dengq@vmware.com>
Signed-off-by: Qian Deng <dengq@vmware.com>
Per lazy consensus rule, merge proposal to main. |
propose to refactor
prepare
script