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

Doc: Fix tilt up issue in feature discovering in developer guide #1889

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

ChaoyiHuang
Copy link
Contributor

The issue is due to the k3d/kind cluster created by ctlptl will run inside containers(it will serve as the virtual hosts).

Host folders which will be scaned by the nfd feature discovery should be mounted into the container ( the virtual host). otherwise the nfd-worker container which run inside the virtual host will just see the default base image rootfs /boot, /lib folders, which are usually empty, leads to the discovey failure.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 29, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @ChaoyiHuang. 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 29, 2024
Copy link

netlify bot commented Sep 29, 2024

Deploy Preview for kubernetes-sigs-nfd ready!

Name Link
🔨 Latest commit d08ea5e
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-nfd/deploys/67243dd78ece5d0008f196bb
😎 Deploy Preview https://deploy-preview-1889--kubernetes-sigs-nfd.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@fmuyassarov
Copy link
Member

Fixes: #1855

Comment on lines 259 to 290
- Create registry first through the command
```
cat <<EOF | ctlptl apply -f -
apiVersion: ctlptl.dev/v1alpha1
kind: Registry
name: ctlptl-registry
port: 5005
```
or
```
ctlptl create registry ctlptl-registry --port=5005
```
- Create a Kubernetes cluster, which will be deployed onto controller node and woker nodes running inside docker containers. Make sure mounting necessary host folders to worker nodes for feature discovery. For example, if k3d is used for cluster creation (please note that the mounted folders for feature discovering should be set to read only in production environment):
```
cat <<EOF | ctlptl apply -f -
apiVersion: ctlptl.dev/v1alpha1
kind: Cluster
registry: ctlptl-registry
product: k3d
k3d:
v1alpha5Simple:
volumes:
- volume: /boot:/boot
nodeFilters:
- server:0
- agent:*
- volume: /lib:/lib
nodeFilters:
- server:0
- agent:*
EOF
```
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the example! I believe we should avoid including a specific cluster installation method since it ties us to particular installers, which aren't standardized. For instance, v1alpha5Simple embeds k3d-specific configuration. Could we instead add a note highlighting the directories that need to be mounted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 8, 2024
@marquiz
Copy link
Contributor

marquiz commented Oct 31, 2024

Thank you @ChaoyiHuang for the patch. One nit: could you wrap the lines (like the rest of the file)? Other than that looks good to me.

@fmuyassarov any further comments?

/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 Oct 31, 2024
@marquiz
Copy link
Contributor

marquiz commented Oct 31, 2024

One nit: could you wrap the lines

Oh the CI (mdlint) was nitting about the same thing, and a few others

The issue is due to the k3d/kind cluster created by ctlptl will run
inside containers(it will serve as the virtual hosts).

Host folders which will be scaned by the nfd feature discovery should
be mounted into the container ( the virtual host). otherwise the nfd-worker
container which run inside the virtual host will just see the default base
image rootfs /boot, /lib folders, which are usually empty, leads to the
discovey failure.

Signed-off-by: Chaoyi Huang <[email protected]>
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 1, 2024
@ChaoyiHuang
Copy link
Contributor Author

One nit: could you wrap the lines

Oh the CI (mdlint) was nitting about the same thing, and a few others

yeah, fixed.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ChaoyiHuang, marquiz

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 Nov 1, 2024
Copy link
Member

@fmuyassarov fmuyassarov left a comment

Choose a reason for hiding this comment

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

Thank you!
/lgtm

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

LGTM label has been added.

Git tree hash: 40379f1afd3a9d1ef3e3145a18f4d60f02ae3bb1

@k8s-ci-robot k8s-ci-robot merged commit 955095c into kubernetes-sigs:master Nov 6, 2024
8 checks passed
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