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

docs: Add Makefile and documentation for "fast" development targets #27931

Merged
merged 1 commit into from Sep 6, 2023

Conversation

aanm
Copy link
Member

@aanm aanm commented Sep 4, 2023

This commit introduces documentation for "fast" development targets in Cilium. The "fast" targets allow for quicker development workflows by building Cilium locally and deploying it on an existing kind cluster. This approach eliminates the need to create and deploy Docker images each time a source code change is made.

Additionally, the documentation has been updated to include these new Makefile targets and provides a quick start guide with essential information for working with Cilium.

When a cluster is already running with a Cilium container, we can simply volume mount the binaries into the container and restart the pod to pick up the changes. A similar approach can be used for C code, with the caveat that the bpf/lib directory needs write permissions by Cilium to generate the C Header features file, making it impossible to use the volume as read-only. Since all nodes share the same kernel features, there won't be any conflicts when multiple nodes write to the same volume mount.

@aanm aanm added release-note/misc This PR makes changes that have no direct user impact. sig/contributing Impacts contribution workflow, guidelines, and tools. labels Sep 4, 2023
@aanm aanm requested review from a team as code owners September 4, 2023 23:05
Copy link
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

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

Looks all good. Some suggestions only, feel free to discard.

Thanks for this!

Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@qmonnet
Copy link
Member

qmonnet commented Sep 5, 2023

Is it something we could backport, so we could use it when troubleshooting issues on the older branches, as well?

@learnitall learnitall removed their request for review September 5, 2023 20:47
This commit introduces documentation for "fast" development targets in
Cilium. The "fast" targets allow for quicker development workflows by
building Cilium locally and deploying it on an existing kind cluster.
This approach eliminates the need to create and deploy Docker images
each time a source code change is made.

Additionally, the documentation has been updated to include these new
Makefile targets and provides a quick start guide with essential
information for working with Cilium.

When a cluster is already running with a Cilium container, we can
simply volume mount the binaries into the container and restart the
pod to pick up the changes. A similar approach can be used for C code,
with the caveat that the bpf/lib directory needs write permissions by
Cilium to generate the C Header features file, making it impossible
to use the volume as read-only. Since all nodes share the same kernel
features, there won't be any conflicts when multiple nodes write
to the same volume mount.

Signed-off-by: André Martins <andre@cilium.io>
@aanm
Copy link
Member Author

aanm commented Sep 6, 2023

/test

Copy link
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

@aanm aanm merged commit 5f88bbf into cilium:main Sep 6, 2023
60 of 61 checks passed
@aanm aanm deleted the pr/add-fast-targets branch September 6, 2023 15:13
@joestringer
Copy link
Member

Very cool! Do you think that at some point we could combine the -fast targets into the main workflow, make it faster? Or is the workflow different enough that developers need to know about exactly what the -fast targets are doing in order to choose the right target?

@jibi jibi added the needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch label Sep 7, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.14.2 Sep 7, 2023
@michi-covalent michi-covalent added this to Needs backport from main in 1.14.3 Sep 9, 2023
@michi-covalent michi-covalent removed this from Needs backport from main in 1.14.2 Sep 9, 2023
@gandro gandro mentioned this pull request Sep 12, 2023
15 tasks
@gandro gandro added backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. and removed needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch labels Sep 12, 2023
@gandro gandro added backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. and removed backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. labels Sep 25, 2023
sayboras added a commit to sayboras/cilium that referenced this pull request Feb 1, 2024
This is to print out command hints for Linux host, so that new Cilium
contributors didn't need to check docs.

Relates: cilium#27931
Signed-off-by: Tam Mach <tam.mach@cilium.io>
github-merge-queue bot pushed a commit that referenced this pull request Feb 1, 2024
This is to print out command hints for Linux host, so that new Cilium
contributors didn't need to check docs.

Relates: #27931
Signed-off-by: Tam Mach <tam.mach@cilium.io>
Pionerd pushed a commit to Pionerd/cilium that referenced this pull request Feb 13, 2024
This is to print out command hints for Linux host, so that new Cilium
contributors didn't need to check docs.

Relates: cilium#27931
Signed-off-by: Tam Mach <tam.mach@cilium.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. release-note/misc This PR makes changes that have no direct user impact. sig/contributing Impacts contribution workflow, guidelines, and tools.
Projects
No open projects
1.14.3
Needs backport from main
Development

Successfully merging this pull request may close these issues.

None yet

6 participants