-
Notifications
You must be signed in to change notification settings - Fork 702
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
Refactored chart-museum logic for E2E tests #5143
Conversation
Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
✅ Deploy Preview for kubeapps-dev canceled.
|
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.
license-eye has totally checked 1555 files.
Valid | Invalid | Ignored | Fixed |
---|---|---|---|
758 | 1 | 796 | 0 |
Click to see the invalid file list
- script/chart-museum.sh
Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
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.
Great, nice improvements. It's good to have all the chartmuseum-related logic altogether.
script/chart-museum.sh
Outdated
CM_PORT=${CM_PORT:-8090} | ||
CM_USER=${CM_USER:-"admin"} | ||
CM_PWD=${CM_PWD:-"password"} | ||
CHART_MUSEUM_NS=${CHART_MUSEUM_NS:-"chart-museum"} | ||
CM_VERSION=${CM_VERSION:-"3.9.0"} |
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.
As per #5119 (comment), I think we should use the same CHART_MUSEUM_
prefix, no?
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.
Yep, agree. Changed it to CHARTMUSEUM_
as in the e2e-test.sh
file.
Thanks @antgamdia ! |
Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
Signed-off-by: Rafa Castelblanque rcastelblanq@vmware.com
Description of the change
This PR tackles two issues:
After Make ChartMuseum CI version configurable #5119 Charts museum version was upgraded. Parameters of the chart for user authentication have changed in the newer versions.
Previous version installation command
helm install chartmuseum --namespace chart-museum "https://github.com/chartmuseum/charts/releases/download/chartmuseum-3.8.0/chartmuseum-3.8.0.tgz" \ --set env.open.DISABLE_API=false \ --set persistence.enabled=true \ --set secret.AUTH_USER=admin \ --set secret.AUTH_PASS=password
Authentication was not working with newer version + old parameters. ChartMuseum could be accessed without any authentication:
kubectl run tmp-shell --restart=Never --rm -i --tty --image centos -- /bin/sh -c "curl http://chartmuseum.chart-museum.svc.cluster.local:8080/index.yaml"
Newer versions installation command
helm install chartmuseum --namespace chart-museum "https://github.com/chartmuseum/charts/releases/download/chartmuseum-3.8.0/chartmuseum-3.8.0.tgz" \ --set env.open.DISABLE_API=false \ --set persistence.enabled=true \ --set env.secret.BASIC_AUTH_USER=admin \ --set env.secret.BASIC_AUTH_PASS=password
Scripting code used for managing ChartMuseum was mixed with the E2E code and scattered in a couple of files. This PR refactors that and keeps all ChartMuseum logic within a single file. It is also installed in its own namespace, instead of
kubeapps
. The script can be used externally as a regular script, I mean apart from E2E.Benefits
Fix for authentication against ChartMuseum and tidier scripting code.
Possible drawbacks
N/A
Additional information