Skip to content

Commit 6c07bb9

Browse files
authored
add docs for DNS ndots setting (datastax#149)
1 parent f3d9ca8 commit 6c07bb9

9 files changed

+69
-10
lines changed

helm/kaap/crds/autorecoveries.kaap.oss.datastax.com-v1.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,13 @@ spec:
12811281
type: string
12821282
type: object
12831283
dnsConfig:
1284-
description: DNS config for each pod.
1284+
description: |
1285+
Override default DNS config for each pod. Note that because we use fully qualified service names for intra
1286+
cluster networking with Pulsar components, we set the ndots value to 4 (the default is 5). This prevents
1287+
unnecessary DNS lookups for the fully qualified service names that would be guaranteed to result in NXDOMAIN.
1288+
For example, the name 'pulsar-broker.pulsar.svc.cluster.local' has 4 dots, so it would be resolved directly
1289+
instead of appending the configured search domains.
1290+
More info here: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config.
12851291
properties:
12861292
nameservers:
12871293
items:

helm/kaap/crds/bastions.kaap.oss.datastax.com-v1.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,13 @@ spec:
12851285
type: string
12861286
type: object
12871287
dnsConfig:
1288-
description: DNS config for each pod.
1288+
description: |
1289+
Override default DNS config for each pod. Note that because we use fully qualified service names for intra
1290+
cluster networking with Pulsar components, we set the ndots value to 4 (the default is 5). This prevents
1291+
unnecessary DNS lookups for the fully qualified service names that would be guaranteed to result in NXDOMAIN.
1292+
For example, the name 'pulsar-broker.pulsar.svc.cluster.local' has 4 dots, so it would be resolved directly
1293+
instead of appending the configured search domains.
1294+
More info here: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config.
12891295
properties:
12901296
nameservers:
12911297
items:

helm/kaap/crds/bookkeepers.kaap.oss.datastax.com-v1.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,13 @@ spec:
4848
type: string
4949
type: object
5050
dnsConfig:
51-
description: DNS config for each pod.
51+
description: |
52+
Override default DNS config for each pod. Note that because we use fully qualified service names for intra
53+
cluster networking with Pulsar components, we set the ndots value to 4 (the default is 5). This prevents
54+
unnecessary DNS lookups for the fully qualified service names that would be guaranteed to result in NXDOMAIN.
55+
For example, the name 'pulsar-broker.pulsar.svc.cluster.local' has 4 dots, so it would be resolved directly
56+
instead of appending the configured search domains.
57+
More info here: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config.
5258
properties:
5359
nameservers:
5460
items:

helm/kaap/crds/brokers.kaap.oss.datastax.com-v1.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,13 @@ spec:
4848
type: string
4949
type: object
5050
dnsConfig:
51-
description: DNS config for each pod.
51+
description: |
52+
Override default DNS config for each pod. Note that because we use fully qualified service names for intra
53+
cluster networking with Pulsar components, we set the ndots value to 4 (the default is 5). This prevents
54+
unnecessary DNS lookups for the fully qualified service names that would be guaranteed to result in NXDOMAIN.
55+
For example, the name 'pulsar-broker.pulsar.svc.cluster.local' has 4 dots, so it would be resolved directly
56+
instead of appending the configured search domains.
57+
More info here: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config.
5258
properties:
5359
nameservers:
5460
items:

helm/kaap/crds/functionsworkers.kaap.oss.datastax.com-v1.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ spec:
5050
type: string
5151
type: object
5252
dnsConfig:
53-
description: DNS config for each pod.
53+
description: |
54+
Override default DNS config for each pod. Note that because we use fully qualified service names for intra
55+
cluster networking with Pulsar components, we set the ndots value to 4 (the default is 5). This prevents
56+
unnecessary DNS lookups for the fully qualified service names that would be guaranteed to result in NXDOMAIN.
57+
For example, the name 'pulsar-broker.pulsar.svc.cluster.local' has 4 dots, so it would be resolved directly
58+
instead of appending the configured search domains.
59+
More info here: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config.
5460
properties:
5561
nameservers:
5662
items:

helm/kaap/crds/proxies.kaap.oss.datastax.com-v1.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,13 @@ spec:
4848
type: string
4949
type: object
5050
dnsConfig:
51-
description: DNS config for each pod.
51+
description: |
52+
Override default DNS config for each pod. Note that because we use fully qualified service names for intra
53+
cluster networking with Pulsar components, we set the ndots value to 4 (the default is 5). This prevents
54+
unnecessary DNS lookups for the fully qualified service names that would be guaranteed to result in NXDOMAIN.
55+
For example, the name 'pulsar-broker.pulsar.svc.cluster.local' has 4 dots, so it would be resolved directly
56+
instead of appending the configured search domains.
57+
More info here: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config.
5258
properties:
5359
nameservers:
5460
items:

helm/kaap/crds/pulsarclusters.kaap.oss.datastax.com-v1.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,13 @@ spec:
4848
type: string
4949
type: object
5050
dnsConfig:
51-
description: DNS config for each pod.
51+
description: |
52+
Override default DNS config for each pod. Note that because we use fully qualified service names for intra
53+
cluster networking with Pulsar components, we set the ndots value to 4 (the default is 5). This prevents
54+
unnecessary DNS lookups for the fully qualified service names that would be guaranteed to result in NXDOMAIN.
55+
For example, the name 'pulsar-broker.pulsar.svc.cluster.local' has 4 dots, so it would be resolved directly
56+
instead of appending the configured search domains.
57+
More info here: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config.
5258
properties:
5359
nameservers:
5460
items:

helm/kaap/crds/zookeepers.kaap.oss.datastax.com-v1.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -2133,7 +2133,13 @@ spec:
21332133
type: string
21342134
type: object
21352135
dnsConfig:
2136-
description: DNS config for each pod.
2136+
description: |
2137+
Override default DNS config for each pod. Note that because we use fully qualified service names for intra
2138+
cluster networking with Pulsar components, we set the ndots value to 4 (the default is 5). This prevents
2139+
unnecessary DNS lookups for the fully qualified service names that would be guaranteed to result in NXDOMAIN.
2140+
For example, the name 'pulsar-broker.pulsar.svc.cluster.local' has 4 dots, so it would be resolved directly
2141+
instead of appending the configured search domains.
2142+
More info here: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config.
21372143
properties:
21382144
nameservers:
21392145
items:

operator/src/main/java/com/datastax/oss/kaap/crds/GlobalSpec.java

+13-2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ public class GlobalSpec extends ValidableSpec<GlobalSpec> implements WithDefault
5252

5353
public static final String DEFAULT_TLS_SECRET_NAME = "pulsar-tls";
5454

55+
56+
/** See CRD docs for more info about this setting. */
57+
public static final String DNS_NDOTS = "4";
58+
5559
private static final Supplier<TlsConfig> DEFAULT_TLS_CONFIG = () -> TlsConfig.builder()
5660
.enabled(false)
5761
.caPath("/etc/ssl/certs/ca-certificates.crt")
@@ -91,7 +95,7 @@ public class GlobalSpec extends ValidableSpec<GlobalSpec> implements WithDefault
9195
private static final Supplier<PodDNSConfig> DEFAULT_DNS_CONFIG = () -> new PodDNSConfigBuilder()
9296
.withOptions(new PodDNSConfigOptionBuilder()
9397
.withName("ndots")
94-
.withValue("4")
98+
.withValue(DNS_NDOTS)
9599
.build())
96100
.build();
97101

@@ -162,7 +166,14 @@ public static class GlobalStorageConfig {
162166
private String clusterName;
163167
@JsonPropertyDescription("Pulsar cluster components names.")
164168
private Components components;
165-
@JsonPropertyDescription("DNS config for each pod.")
169+
@JsonPropertyDescription("""
170+
Override default DNS config for each pod. Note that because we use fully qualified service names for intra
171+
cluster networking with Pulsar components, we set the ndots value to 4 (the default is 5). This prevents
172+
unnecessary DNS lookups for the fully qualified service names that would be guaranteed to result in NXDOMAIN.
173+
For example, the name 'pulsar-broker.pulsar.svc.cluster.local' has 4 dots, so it would be resolved directly
174+
instead of appending the configured search domains.
175+
More info here: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config.
176+
""")
166177
private PodDNSConfig dnsConfig;
167178
@JsonPropertyDescription("""
168179
The domain name for your kubernetes cluster.

0 commit comments

Comments
 (0)