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

introduce ct for local helm install test #911

Merged
merged 1 commit into from
Aug 11, 2022

Conversation

knelasevero
Copy link
Contributor

@knelasevero knelasevero commented Aug 10, 2022

Updated docs and also removed old approach. To test it locally you can make kind-multi-node and then make ct-helm

For reference, a failing gh-actions step also prevents merges by prow/tide: #907 (comment)

Will need to merge: kubernetes/test-infra#26630

Then merge this PR itself

Following: #895 (comment)

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 10, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @knelasevero. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 10, 2022
Copy link
Contributor

@damemi damemi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 10, 2022
@k8s-ci-robot
Copy link
Contributor

@knelasevero: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-descheduler-helm-test ba85e79 link true /test pull-descheduler-helm-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@knelasevero
Copy link
Contributor Author

knelasevero commented Aug 10, 2022

pull-descheduler-helm-test is failing because it still exists in test-infra, we need to merge kubernetes/test-infra#26630 to get this PR green :)

@@ -0,0 +1 @@
docker run -it --rm --network host --workdir=/data --volume ~/.kube/config:/root/.kube/config:ro --volume $(pwd):/data quay.io/helmpack/chart-testing:v3.7.0 /bin/bash -c "git config --global --add safe.directory /data; ct install --config=.github/ci/ct.yaml --helm-extra-set-args=\"--set=kind=Deployment --set=podSecurityPolicy.create=false\""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily needed in this PR. Though, it would be great to introduce CONTAINER_ENGINE var in the Makefile so we can use e.g. podman instead of the docker.

Copy link
Contributor

@ingvagabund ingvagabund Aug 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ make ct-helm
./hack/verify-chart.sh
Trying to pull quay.io/helmpack/chart-testing:v3.7.0...
Getting image source signatures
Copying blob 530afca65e2e done  
Copying blob 8fc6dd0270c7 done  
Copying blob 11468c6e8c15 done  
Copying blob 44f8ddf0f4fd done  
Copying blob becf289968d8 done  
Copying blob ef1d4f4b02fd done  
Copying blob 1e4c4ffbf3ee done  
Copying blob dff19b98de5f done  
Copying blob d2ab7f174e47 done  
Copying blob 4f4fb700ef54 done  
Copying config 30a5ebe114 done  
Writing manifest to image destination
Storing signatures
Installing charts...
Error: Error loading configuration: Error loading config file: open .github/ci/ct.yaml: permission denied
Error loading configuration: Error loading config file: open .github/ci/ct.yaml: permission denied
make: *** [Makefile:158: ct-helm] Error 1

Not sure whether this is related to running podman instead of docker.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With podman I got this

./hack/verify-chart.sh
ERRO[0000] cannot find UID/GID for user lucas: open /etc/subuid: no such file or directory - check rootless mode in man pages. 
WARN[0000] Using rootless single mapping into the namespace. This might break some images. Check /etc/subuid and /etc/subgid for adding sub*ids if not using a network user 
Trying to pull quay.io/helmpack/chart-testing:v3.7.0...
Getting image source signatures
Copying blob 11468c6e8c15 done  
Copying blob ef1d4f4b02fd done  
Copying blob 44f8ddf0f4fd done  
Copying blob 530afca65e2e done  
Copying blob becf289968d8 done  
Copying blob 8fc6dd0270c7 done  
Copying blob 1e4c4ffbf3ee done  
Copying blob d2ab7f174e47 done  
Copying blob dff19b98de5f done  
Copying blob 4f4fb700ef54 done  
Error: writing blob: adding layer with blob "sha256:530afca65e2ea04227630ae746e0c85b2bd1a179379cbf2b6501b49c4cab2ccc": Error processing tar file(exit status 1): potentially insufficient UIDs or GIDs available in user namespace (requested 0:42 for /etc/shadow): Check /etc/subuid and /etc/subgid if configured locally and run podman-system-migrate: lchown /etc/shadow: invalid argument
make: *** [Makefile:158: ct-helm] Error 125

Have you tried this with docker? We can introduce that variable and also podman support in a followup PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, it was about running podman with sudo in my case, It just worked after adding sudo (or adding my user to the right group).

Copy link
Contributor Author

@knelasevero knelasevero Aug 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, that error of yours does not make much sense 🤔 that file is 644, so it is readable by all 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Selinux was the culprit :)

@ingvagabund
Copy link
Contributor

+1 for cleaning
extending the makefile to support other container engines as a follow up
/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 11, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ingvagabund

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 11, 2022
@k8s-ci-robot k8s-ci-robot merged commit a1d4770 into kubernetes-sigs:master Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants