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

Add support for dnsConfig and dnsPolicy in pod spec #12897

Merged
merged 2 commits into from
Apr 29, 2022

Conversation

stevenchen-db
Copy link
Contributor

@stevenchen-db stevenchen-db commented Apr 28, 2022

Fixes #5306

Proposed Changes

  • Allow specifying dnsConfig and dnsPolicy in pod specs based (gated behind a feature flag)

Release Note

Allows dnsConfig and dnsPolicy to be specified on pod specs when the feature is enabled in the config-features config map.

@knative-prow knative-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 28, 2022
@knative-prow
Copy link

knative-prow bot commented Apr 28, 2022

Hi @stevenchen-db. 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/test-infra repository.

@knative-prow knative-prow bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. area/API API objects and controllers labels Apr 28, 2022
@codecov
Copy link

codecov bot commented Apr 28, 2022

Codecov Report

Merging #12897 (af9a7c4) into main (5128270) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head af9a7c4 differs from pull request most recent head 9f4e17a. Consider uploading reports for the commit 9f4e17a to get more accurate results

@@            Coverage Diff             @@
##             main   #12897      +/-   ##
==========================================
- Coverage   87.03%   87.01%   -0.03%     
==========================================
  Files         197      197              
  Lines       14426    14437      +11     
==========================================
+ Hits        12556    12562       +6     
- Misses       1576     1579       +3     
- Partials      294      296       +2     
Impacted Files Coverage Δ
pkg/apis/config/features.go 95.23% <100.00%> (+0.32%) ⬆️
pkg/apis/serving/fieldmask.go 95.62% <100.00%> (+0.03%) ⬆️
pkg/reconciler/autoscaling/kpa/kpa.go 95.26% <100.00%> (+0.07%) ⬆️
pkg/autoscaler/statserver/server.go 75.55% <0.00%> (-2.23%) ⬇️
pkg/activator/net/revision_backends.go 92.19% <0.00%> (-0.58%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5128270...9f4e17a. Read the comment docs.

@psschwei
Copy link
Contributor

/ok-to-test

@knative-prow knative-prow bot 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 Apr 28, 2022
Copy link
Member

@nader-ziada nader-ziada left a comment

Choose a reason for hiding this comment

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

two quick questions:

  • Can we add a test in fieldmask_test.go
  • Is there any validation to be added in the k8s_validation.go, for example dnsPolicy allowed values?

@stevenchen-db
Copy link
Contributor Author

two quick questions:

  • Can we add a test in fieldmask_test.go
  • Is there any validation to be added in the k8s_validation.go, for example dnsPolicy allowed values?

I plan to manually test that values get passed through and I previously verified that the dnsPolicy and dnsConfig was masked. For this PR, I was primarily going off of several previous PRs that introduced new pod specs such as https://github.com/knative/serving/pull/9072/files and #12715, which appears to not have added field_mask tests maybe since they're all gated behind a feature flag.

I can add validation to dnsPolicy in k8s_validation.go

@dprotaso
Copy link
Member

Can we add a test in fieldmask_test.go

Technically the k8s validation test changes covered exercising the field mask code.

Is there any validation to be added in the k8s_validation.go, for example dnsPolicy allowed values?

I would skip this for pod spec fields guarded by feature flags - it's a black box for us and user beware

@dprotaso
Copy link
Member

/lgtm
/approve

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 29, 2022
@knative-prow
Copy link

knative-prow bot commented Apr 29, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, stevenchen-db

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

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 29, 2022
@stevenchen-db
Copy link
Contributor Author

Can we add a test in fieldmask_test.go

Technically the k8s validation test changes covered exercising the field mask code.

Is there any validation to be added in the k8s_validation.go, for example dnsPolicy allowed values?

I would skip this for pod spec fields guarded by feature flags - it's a black box for us and user beware

Makes sense, thanks for the clarification!

Copy link
Contributor

@psschwei psschwei left a comment

Choose a reason for hiding this comment

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

Would you also be able to submit a PR to the docs repo to update the feature flag page?

@knative-prow knative-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 29, 2022
@stevenchen-db
Copy link
Contributor Author

/retest-required

@dprotaso
Copy link
Member

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 29, 2022
@dprotaso
Copy link
Member

/test istio-latest-no-mesh-tls_serving_main

@knative-prow knative-prow bot merged commit f6cb424 into knative:main Apr 29, 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. area/API API objects and controllers lgtm 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow runtimeClassName and dnsPolicy in service template spec
4 participants