Skip to content

Conversation

thiagomedina
Copy link
Contributor

@thiagomedina thiagomedina commented Aug 12, 2025

Description

The securityContext field is now removed from the exported service by default.
The --include flag was added to explicitly include this field when needed.
For example: kn service export --include securityContext foo -o yaml

Since the --include flag accepts a list of values (comma-separated or repeated), it will be possible to add additional fields in the future

Changes

 * Removes securityContext from exported services by default
 * Add new flag(--include ) to kn service export

Reference

Close #1788

Release Note

The kn service export command now removes the securityContext field from the exported service by default to improve portability.
A new --include flag was added to explicitly include this field when needed (e.g., kn service export my-service --include securityContext)


@knative-prow knative-prow bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 12, 2025
Copy link

knative-prow bot commented Aug 12, 2025

Hi @thiagomedina. Thanks for your PR.

I'm waiting for a knative 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.

Copy link

knative-prow bot commented Aug 12, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: thiagomedina
Once this PR has been reviewed and has the lgtm label, please assign dsimansk for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@knative-prow knative-prow bot requested review from dsimansk and skonto August 12, 2025 16:23
Copy link

@knative-prow knative-prow bot left a comment

Choose a reason for hiding this comment

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

@thiagomedina: 1 warning.

In response to this:

Description

The securityContext field is now removed from the exported service by default to improve portability.
The --include flag was added to explicitly include this field when needed.
For example: kn service export --include securityContext foo -o yaml

Since the --include flag accepts a list of values (comma-separated or repeated), it will be possible to add additional fields in the future

Changes

 * Removes securityContext from exported services by default
 * Add new flag(--include ) to kn service export

Reference

Close #1788

Release Note

The kn service export command now removes the securityContext field from the exported service by default to improve portability.
A new --include flag was added to explicitly include this field when needed (e.g., kn service export my-service --include securityContext)


/lint

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.

@knative-prow knative-prow bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 12, 2025
Copy link

codecov bot commented Aug 12, 2025

Codecov Report

❌ Patch coverage is 76.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.07%. Comparing base (527deb6) to head (08ef531).
⚠️ Report is 23 commits behind head on main.

Files with missing lines Patch % Lines
pkg/commands/service/export.go 76.00% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2018   +/-   ##
=======================================
  Coverage   70.06%   70.07%           
=======================================
  Files         233      233           
  Lines       16464    16489   +25     
=======================================
+ Hits        11535    11554   +19     
- Misses       4123     4127    +4     
- Partials      806      808    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Service export should handle securityContext field
2 participants