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

node-builder: introduce BUILD_TYPE variable #216

Merged
merged 1 commit into from
Aug 26, 2024
Merged

Conversation

sprt
Copy link
Collaborator

@sprt sprt commented Aug 12, 2024

Merge Checklist
  • Followed patch format from upstream recommendation: https://github.com/kata-containers/community/blob/main/CONTRIBUTING.md#patch-format
    • Included a single commit in a given PR - at least unless there are related commits and each makes sense as a change on its own.
  • Aware about the PR to be merged using "create a merge commit" rather than "squash and merge" (or similar)
  • genPolicy only: Ensured the tool still builds on Windows
  • The upstream/missing label (or upstream/not-needed) has been set on the PR.
Summary

See commit message.

Test Methodology

Local build as described in commit message.

@sprt sprt added the upstream/not-needed PRs that will not be upstreamed (e.g. internal) label Aug 12, 2024
@sprt sprt marked this pull request as ready for review August 12, 2024 21:36
@sprt sprt requested review from a team as code owners August 12, 2024 21:36
@sprt sprt force-pushed the sprt/build-type-var branch 2 times, most recently from 6511aab to 57c8a03 Compare August 12, 2024 21:40
@sprt sprt force-pushed the sprt/build-type-var branch from 57c8a03 to 7b447d4 Compare August 26, 2024 22:59
This lets developers build and deploy Kata in debug mode without having to make
manual edits to the build scripts.

With BUILD_TYPE=debug (default is release):

 * The agent is built in debug mode.
 * The agent is built with a permissive policy (using allow-all.rego).
 * The shim debug config file is used, ie. we create the symlink
   configuration-clh-snp-debug.toml <- configuration-clh-snp.toml.

For example, building and deploying Kata-CC in debug mode is now as simple as:

   make BUILD_TYPE=debug all-confpods deploy-confpods

Also do note that make still lets you override the other variables even after
setting BUILD_TYPE. For example, you can use the production shim config with
BUILD_TYPE=debug:

   make BUILD_TYPE=debug SHIM_USE_DEBUG_CONFIG=no all-confpods deploy-confpods

Signed-off-by: Aurélien Bombo <[email protected]>
@sprt sprt force-pushed the sprt/build-type-var branch from 7b447d4 to 52a47b6 Compare August 26, 2024 23:01
@sprt sprt merged commit 74cc478 into msft-main Aug 26, 2024
44 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream/not-needed PRs that will not be upstreamed (e.g. internal)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants