-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Exposing dnsPolicy and dnsConfig on the Strimzi api PodTemplate to allow custom name resolution for Pod resources #10949
Conversation
You should update the title and the description of the PR. You also seem to have some bad commits in there. The Pr has to be done against the |
b9e2cb2
to
dddc11d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We in general deal with the PR only once the proposal is approved. But I left one comment. No need to address it now, you can do it only once the proposal is approved. It would be also great to fix all the unnecessary whitespace changes that make the reviews harder, but will also mess up the Git history etc. (e.g. in the pom.xml
files, the values.yaml
, etc.)
You will also need to run make crd_install
to get the CRD changes copied out to the Helm Chart as well. And you will need to fix the DCO signoff. The instructions should be under the Details link next to the DCO signoff status in the PR.
@@ -53,6 +54,8 @@ public class PodTemplate implements HasMetadataTemplate, UnknownPropertyPreservi | |||
private String priorityClassName; | |||
private String schedulerName; | |||
private List<HostAlias> hostAliases; | |||
private PodDNSConfig dnsConfig; | |||
private String dnsPolicy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should have an Enum for the supported values. Check for example how
Line 12 in 0c334d8
public enum ExternalTrafficPolicy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 9bd12a2
dddc11d
to
00fc892
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some more nits. Also, there have been some changes to the main branch in between - could oyu please rebase it to address the conflicts? Thanks.
This might be also worth a record in the CHANGELOG.md
file?
cluster-operator/src/main/java/io/strimzi/operator/cluster/model/WorkloadUtils.java
Outdated
Show resolved
Hide resolved
@@ -339,6 +341,8 @@ public static PodTemplateSpec createPodTemplateSpec( | |||
.withPriorityClassName(template != null ? template.getPriorityClassName() : null) | |||
.withSchedulerName(template != null && template.getSchedulerName() != null ? template.getSchedulerName() : "default-scheduler") | |||
.withHostAliases(template != null ? template.getHostAliases() : null) | |||
.withDnsPolicy(template != null ? template.getDnsPolicy() != null ? template.getDnsPolicy().toValue() : null : null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in fffc5db
@@ -402,6 +406,8 @@ public static Pod createPod( | |||
.withPriorityClassName(template != null ? template.getPriorityClassName() : null) | |||
.withSchedulerName(template != null && template.getSchedulerName() != null ? template.getSchedulerName() : "default-scheduler") | |||
.withHostAliases(template != null ? template.getHostAliases() : null) | |||
.withDnsPolicy(template != null ? template.getDnsPolicy() != null ? template.getDnsPolicy().toValue() : null : null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in fffc5db
Signed-off-by: gertschouten <[email protected]>
Signed-off-by: gertschouten <[email protected]>
Signed-off-by: gertschouten <[email protected]>
…el/WorkloadUtils.java Co-authored-by: Jakub Scholz <[email protected]> Signed-off-by: gertschouten <[email protected]>
Signed-off-by: gertschouten <[email protected]>
…using the template sections Signed-off-by: gertschouten <[email protected]>
0346098
to
3e09203
Compare
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the PR! I left a couple of nits so when they are fixed I guess we can merge this.
api/src/main/java/io/strimzi/api/kafka/model/common/template/DnsPolicy.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/common/template/PodTemplate.java
Outdated
Show resolved
Hide resolved
cluster-operator/src/main/java/io/strimzi/operator/cluster/model/WorkloadUtils.java
Show resolved
Hide resolved
Signed-off-by: gertschouten <[email protected]>
Signed-off-by: gertschouten <[email protected]>
Signed-off-by: gertschouten <[email protected]>
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
Type of change
Description
By appending Strimzi's common PodTemplate in the Strimzi api with additional properties dnsPolicy and dnsConfig the system configuration file /etc/recolv.conf for Strimzi Pod resources can be controlled, thereby deciding how domain name resolution should be performed on a resource level.
Strimzi's CRDs will thereby allow user input for name resolution customization.
WorkloadUtils in the Strimzi cluster operator for PodBuilder and PodTemplateSpecBuilder propagate these properties to Pods controlled by the operator.
Provisioned Pods will thereby utilize name resolution configuration based on the user input if specified and fall back to defaults, similar to the current situation, in case no dnsConfig or dnsPolicy is specified by the user.
Checklist
Please go through this checklist and make sure all applicable tasks have been done