Skip to content

Commit 61d4d70

Browse files
author
Thejas N
committed
Make dnsManagementPolicy required
Signed-off-by: Thejas N <[email protected]>
1 parent a95768e commit 61d4d70

File tree

4 files changed

+35
-34
lines changed

4 files changed

+35
-34
lines changed

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: 16 additions & 18 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,8 +391,8 @@ type LoadBalancerStrategy struct {
391391
// Valid values are: Managed and Unmanaged.
392392
//
393393
// +kubebuilder:default:="Managed"
394-
// +kubebuilder:validation:Optional
395-
// +optional
394+
// +kubebuilder:validation:Required
395+
// +required
396396
// +default="Managed"
397397
DNSManagementPolicy LoadBalancerDNSManagementPolicy `json:"dnsManagementPolicy,omitempty"`
398398
}
@@ -560,8 +560,7 @@ type AWSClassicLoadBalancerParameters struct {
560560

561561
// AWSNetworkLoadBalancerParameters holds configuration parameters for an
562562
// AWS Network load balancer.
563-
type AWSNetworkLoadBalancerParameters struct {
564-
}
563+
type AWSNetworkLoadBalancerParameters struct{}
565564

566565
// HostNetworkStrategy holds parameters for the HostNetwork endpoint publishing
567566
// strategy.
@@ -966,8 +965,7 @@ type SyslogLoggingDestinationParameters struct {
966965

967966
// ContainerLoggingDestinationParameters describes parameters for the Container
968967
// logging destination type.
969-
type ContainerLoggingDestinationParameters struct {
970-
}
968+
type ContainerLoggingDestinationParameters struct{}
971969

972970
// LoggingDestination describes a destination for log messages.
973971
// +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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ type DNSRecordSpec struct {
7070
// "Unmanaged".
7171
//
7272
// +kubebuilder:default:="Managed"
73-
// +kubebuilder:validation:Optional
74-
// +optional
73+
// +kubebuilder:validation:Required
74+
// +required
7575
// +default="Managed"
7676
DNSManagementPolicy DNSManagementPolicy `json:"dnsManagementPolicy,omitempty"`
7777
}

0 commit comments

Comments
 (0)