Skip to content

Commit aba424b

Browse files
committed
Support custom list of services to be added to /etc/hosts in cluster DNS operator - RFE-4145
1 parent c7fbd08 commit aba424b

File tree

7 files changed

+64
-0
lines changed

7 files changed

+64
-0
lines changed

openapi/generated_openapi/zz_generated.openapi.go

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi/openapi.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28842,6 +28842,14 @@
2884228842
"default": {},
2884328843
"$ref": "#/definitions/com.github.openshift.api.operator.v1.DNSNodePlacement"
2884428844
},
28845+
"nodeServices": {
28846+
"description": "nodeServices specifies K8s services for which entries should be added to /etc/hosts by the node resolver. These services will be added in addition to the default \"image-registry.openshift-image-registry.svc\" service. Each service should be a relative name following the format \"<service>.<namespace>.svc\"; for each relative name, an alias with the CLUSTER_DOMAIN suffix will also be added.",
28847+
"type": "array",
28848+
"items": {
28849+
"type": "string",
28850+
"default": ""
28851+
}
28852+
},
2884528853
"operatorLogLevel": {
2884628854
"description": "operatorLogLevel controls the logging level of the DNS Operator. Valid values are: \"Normal\", \"Debug\", \"Trace\". Defaults to \"Normal\". setting operatorLogLevel: Trace will produce extremely verbose logs.",
2884728855
"type": "string"

operator/v1/types_dns.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,17 @@ type DNSSpec struct {
9595
// +kubebuilder:default=Normal
9696
OperatorLogLevel DNSLogLevel `json:"operatorLogLevel,omitempty"`
9797

98+
// nodeServices specifies K8s services for which entries should be added
99+
// to /etc/hosts by the node resolver. These services will be added in addition to
100+
// the default "image-registry.openshift-image-registry.svc" service.
101+
// Each service should be a relative name following the format "<service>.<namespace>.svc";
102+
// for each relative name, an alias with the CLUSTER_DOMAIN suffix will also be added.
103+
//
104+
// +optional
105+
// +kubebuilder:validation:MaxItems=20
106+
// +kubebuilder:validation:items:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?\.[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.svc)?$`
107+
NodeServices []string `json:"nodeServices,omitempty"`
108+
98109
// logLevel describes the desired logging verbosity for CoreDNS.
99110
// Any one of the following values may be specified:
100111
// * Normal logs errors from upstream resolvers.

operator/v1/zz_generated.crd-manifests/0000_70_dns_00_dnses.crd.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,18 @@ spec:
191191
type: object
192192
type: array
193193
type: object
194+
nodeServices:
195+
description: |-
196+
nodeServices specifies K8s services for which entries should be added
197+
to /etc/hosts by the node resolver. These services will be added in addition to
198+
the default "image-registry.openshift-image-registry.svc" service.
199+
Each service should be a relative name following the format "<service>.<namespace>.svc";
200+
for each relative name, an alias with the CLUSTER_DOMAIN suffix will also be added.
201+
items:
202+
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?\.[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.svc)?$
203+
type: string
204+
maxItems: 20
205+
type: array
194206
operatorLogLevel:
195207
default: Normal
196208
description: |-

operator/v1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

operator/v1/zz_generated.featuregated-crd-manifests/dnses.operator.openshift.io/AAA_ungated.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,18 @@ spec:
192192
type: object
193193
type: array
194194
type: object
195+
nodeServices:
196+
description: |-
197+
nodeServices specifies K8s services for which entries should be added
198+
to /etc/hosts by the node resolver. These services will be added in addition to
199+
the default "image-registry.openshift-image-registry.svc" service.
200+
Each service should be a relative name following the format "<service>.<namespace>.svc";
201+
for each relative name, an alias with the CLUSTER_DOMAIN suffix will also be added.
202+
items:
203+
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?\.[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.svc)?$
204+
type: string
205+
maxItems: 20
206+
type: array
195207
operatorLogLevel:
196208
default: Normal
197209
description: |-

operator/v1/zz_generated.swagger_doc_generated.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)