Skip to content

Commit 4e8fd0f

Browse files
author
Thejas N
committed
Add omitempty to dnsmanagementpolicy
Make dnsManagementPolicy required Signed-off-by: Thejas N <[email protected]>
1 parent bad89a2 commit 4e8fd0f

File tree

6 files changed

+43
-40
lines changed

6 files changed

+43
-40
lines changed

openapi/generated_openapi/zz_generated.openapi.go

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

openapi/openapi.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23723,7 +23723,7 @@
2372323723
"dnsManagementPolicy": {
2372423724
"description": "dnsManagementPolicy indicates if the lifecycle of the wildcard DNS record associated with the load balancer service will be managed by the ingress operator. It defaults to Managed. Valid values are: Managed and Unmanaged.",
2372523725
"type": "string",
23726-
"default": ""
23726+
"default": "Managed"
2372723727
},
2372823728
"providerParameters": {
2372923729
"description": "providerParameters holds desired load balancer information specific to the underlying infrastructure provider.\n\nIf empty, defaults will be applied. See specific providerParameters fields for details about their defaults.",
@@ -26408,7 +26408,7 @@
2640826408
"dnsManagementPolicy": {
2640926409
"description": "dnsManagementPolicy denotes the current policy applied on the DNS record. Records that have policy set as \"Unmanaged\" are ignored by the ingress operator. This means that the DNS record on the cloud provider is not managed by the operator, and the \"Published\" status condition will be updated to \"Unknown\" status, since it is externally managed. Any existing record on the cloud provider can be deleted at the discretion of the cluster admin.\n\nThis field defaults to Managed. Valid values are \"Managed\" and \"Unmanaged\".",
2641026410
"type": "string",
26411-
"default": ""
26411+
"default": "Managed"
2641226412
},
2641326413
"dnsName": {
2641426414
"description": "dnsName is the hostname of the DNS record",

operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ spec:
327327
- External
328328
type: string
329329
required:
330+
- dnsManagementPolicy
330331
- scope
331332
type: object
332333
nodePort:
@@ -442,20 +443,20 @@ spec:
442443
\"text/*\", \"image/svg+xml\", \"application/octet-stream\",
443444
\"X-custom/customsub\", etc. \n The format should follow the
444445
Content-Type definition in RFC 1341: Content-Type := type
445-
\"/\" subtype *[\";\" parameter] - The type in Content-Type
446-
can be one of: application, audio, image, message, multipart,
447-
text, video, or a custom type preceded by \"X-\" and followed
448-
by a token as defined below. - The token is a string of at
449-
least one character, and not containing white space, control
450-
characters, or any of the characters in the tspecials set.
451-
- The tspecials set contains the characters ()<>@,;:\\\"/[]?.=
452-
- The subtype in Content-Type is also a token. - The optional
453-
parameter/s following the subtype are defined as: token
454-
\"=\" (token / quoted-string) - The quoted-string, as defined
455-
in RFC 822, is surrounded by double quotes and can contain
456-
white space plus any character EXCEPT \\, \", and CR. It
457-
can also contain any single ASCII character as long as it
458-
is escaped by \\."
446+
\"/\" subtype *[\";\" parameter] - The type in Content-Type
447+
can be one of: application, audio, image, message, multipart,
448+
text, video, or a custom type preceded by \"X-\" and followed
449+
by a token as defined below. - The token is a string of
450+
at least one character, and not containing white space,
451+
control characters, or any of the characters in the tspecials
452+
set. - The tspecials set contains the characters ()<>@,;:\\\"/[]?.=
453+
\ - The subtype in Content-Type is also a token. - The
454+
optional parameter/s following the subtype are defined as:
455+
\ token \"=\" (token / quoted-string) - The quoted-string,
456+
as defined in RFC 822, is surrounded by double quotes and
457+
can contain white space plus any character EXCEPT \\, \",
458+
and CR. It can also contain any single ASCII character
459+
as long as it is escaped by \\."
459460
pattern: ^(?i)(x-[^][ ()\\<>@,;:"/?.=\x00-\x1F\x7F]+|application|audio|image|message|multipart|text|video)/[^][
460461
()\\<>@,;:"/?.=\x00-\x1F\x7F]+(; *[^][ ()\\<>@,;:"/?.=\x00-\x1F\x7F]+=([^][
461462
()\\<>@,;:"/?.=\x00-\x1F\x7F]+|"(\\[\x00-\x7F]|[^\x0D"\\])*"))*$
@@ -1612,6 +1613,7 @@ spec:
16121613
- External
16131614
type: string
16141615
required:
1616+
- dnsManagementPolicy
16151617
- scope
16161618
type: object
16171619
nodePort:

operator/v1/types_ingress.go

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -280,18 +280,18 @@ type HTTPCompressionPolicy struct {
280280
//
281281
// The format should follow the Content-Type definition in RFC 1341:
282282
// Content-Type := type "/" subtype *[";" parameter]
283-
// - The type in Content-Type can be one of:
284-
// application, audio, image, message, multipart, text, video, or a custom
285-
// type preceded by "X-" and followed by a token as defined below.
286-
// - The token is a string of at least one character, and not containing white
287-
// space, control characters, or any of the characters in the tspecials set.
288-
// - The tspecials set contains the characters ()<>@,;:\"/[]?.=
289-
// - The subtype in Content-Type is also a token.
290-
// - The optional parameter/s following the subtype are defined as:
291-
// token "=" (token / quoted-string)
292-
// - The quoted-string, as defined in RFC 822, is surrounded by double quotes
293-
// and can contain white space plus any character EXCEPT \, ", and CR.
294-
// It can also contain any single ASCII character as long as it is escaped by \.
283+
// - The type in Content-Type can be one of:
284+
// application, audio, image, message, multipart, text, video, or a custom
285+
// type preceded by "X-" and followed by a token as defined below.
286+
// - The token is a string of at least one character, and not containing white
287+
// space, control characters, or any of the characters in the tspecials set.
288+
// - The tspecials set contains the characters ()<>@,;:\"/[]?.=
289+
// - The subtype in Content-Type is also a token.
290+
// - The optional parameter/s following the subtype are defined as:
291+
// token "=" (token / quoted-string)
292+
// - The quoted-string, as defined in RFC 822, is surrounded by double quotes
293+
// and can contain white space plus any character EXCEPT \, ", and CR.
294+
// It can also contain any single ASCII character as long as it is escaped by \.
295295
//
296296
// +kubebuilder:validation:Pattern=`^(?i)(x-[^][ ()\\<>@,;:"/?.=\x00-\x1F\x7F]+|application|audio|image|message|multipart|text|video)/[^][ ()\\<>@,;:"/?.=\x00-\x1F\x7F]+(; *[^][ ()\\<>@,;:"/?.=\x00-\x1F\x7F]+=([^][ ()\\<>@,;:"/?.=\x00-\x1F\x7F]+|"(\\[\x00-\x7F]|[^\x0D"\\])*"))*$`
297297
type CompressionMIMEType string
@@ -391,9 +391,10 @@ type LoadBalancerStrategy struct {
391391
// Valid values are: Managed and Unmanaged.
392392
//
393393
// +kubebuilder:default:="Managed"
394-
// +kubebuilder:validation:Optional
395-
// +optional
396-
DNSManagementPolicy LoadBalancerDNSManagementPolicy `json:"dnsManagementPolicy"`
394+
// +kubebuilder:validation:Required
395+
// +required
396+
// +default="Managed"
397+
DNSManagementPolicy LoadBalancerDNSManagementPolicy `json:"dnsManagementPolicy,omitempty"`
397398
}
398399

399400
// LoadBalancerDNSManagementPolicy is a policy for configuring how
@@ -559,8 +560,7 @@ type AWSClassicLoadBalancerParameters struct {
559560

560561
// AWSNetworkLoadBalancerParameters holds configuration parameters for an
561562
// AWS Network load balancer.
562-
type AWSNetworkLoadBalancerParameters struct {
563-
}
563+
type AWSNetworkLoadBalancerParameters struct{}
564564

565565
// HostNetworkStrategy holds parameters for the HostNetwork endpoint publishing
566566
// strategy.
@@ -965,8 +965,7 @@ type SyslogLoggingDestinationParameters struct {
965965

966966
// ContainerLoggingDestinationParameters describes parameters for the Container
967967
// logging destination type.
968-
type ContainerLoggingDestinationParameters struct {
969-
}
968+
type ContainerLoggingDestinationParameters struct{}
970969

971970
// LoggingDestination describes a destination for log messages.
972971
// +union

operatoringress/v1/0000_50_dns-record.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ spec:
3838
description: spec is the specification of the desired behavior of the dnsRecord.
3939
type: object
4040
required:
41+
- dnsManagementPolicy
4142
- dnsName
4243
- recordTTL
4344
- recordType

operatoringress/v1/types.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ type DNSRecordSpec struct {
7070
// "Unmanaged".
7171
//
7272
// +kubebuilder:default:="Managed"
73-
// +kubebuilder:validation:Optional
74-
// +optional
75-
DNSManagementPolicy DNSManagementPolicy `json:"dnsManagementPolicy"`
73+
// +kubebuilder:validation:Required
74+
// +required
75+
// +default="Managed"
76+
DNSManagementPolicy DNSManagementPolicy `json:"dnsManagementPolicy,omitempty"`
7677
}
7778

7879
// DNSRecordStatus is the most recently observed status of each record.

0 commit comments

Comments
 (0)