Skip to content

Commit 2df055c

Browse files
Merge pull request #1270 from thejasn/fixes/dnsmanagementpolicy-defaulting
Add omitempty to dnsmanagementpolicy
2 parents 66f8283 + f3501b4 commit 2df055c

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
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
@@ -23871,7 +23871,7 @@
2387123871
"dnsManagementPolicy": {
2387223872
"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.",
2387323873
"type": "string",
23874-
"default": ""
23874+
"default": "Managed"
2387523875
},
2387623876
"providerParameters": {
2387723877
"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.",
@@ -26556,7 +26556,7 @@
2655626556
"dnsManagementPolicy": {
2655726557
"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\".",
2655826558
"type": "string",
26559-
"default": ""
26559+
"default": "Managed"
2656026560
},
2656126561
"dnsName": {
2656226562
"description": "dnsName is the hostname of the DNS record",

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

Lines changed: 2 additions & 0 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:
@@ -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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@ 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+
// +default="Managed"
396+
DNSManagementPolicy LoadBalancerDNSManagementPolicy `json:"dnsManagementPolicy,omitempty"`
397397
}
398398

399399
// LoadBalancerDNSManagementPolicy is a policy for configuring how

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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ 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+
// +default="Managed"
75+
DNSManagementPolicy DNSManagementPolicy `json:"dnsManagementPolicy,omitempty"`
7676
}
7777

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

0 commit comments

Comments
 (0)