-
Notifications
You must be signed in to change notification settings - Fork 449
Add ability to disable creation of dns zone for unmanaged installs #5666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -21,16 +21,20 @@ import ( | |||||
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" | ||||||
) | ||||||
|
||||||
// PrivateDNSZoneMode determines if the Private DNS Zone gets created. | ||||||
// It is created by default on a private cluster and can be skipped based on a configured value. | ||||||
type PrivateDNSZoneMode string | ||||||
|
||||||
const ( | ||||||
// ManagedClusterFinalizer allows Reconcile to clean up Azure resources associated with the AzureManagedControlPlane before | ||||||
// removing it from the apiserver. | ||||||
ManagedClusterFinalizer = "azuremanagedcontrolplane.infrastructure.cluster.x-k8s.io" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Can you move |
||||||
|
||||||
// PrivateDNSZoneModeSystem represents mode System for azuremanagedcontrolplane. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I think this is a better description but feel free to disregard if not. |
||||||
PrivateDNSZoneModeSystem string = "System" | ||||||
PrivateDNSZoneModeSystem PrivateDNSZoneMode = "System" | ||||||
|
||||||
// PrivateDNSZoneModeNone represents mode None for azuremanagedcontrolplane. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Same as above |
||||||
PrivateDNSZoneModeNone string = "None" | ||||||
PrivateDNSZoneModeNone PrivateDNSZoneMode = "None" | ||||||
) | ||||||
|
||||||
// UpgradeChannel determines the type of upgrade channel for automatically upgrading the cluster. | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -459,6 +459,12 @@ type NetworkClassSpec struct { | |
// +optional | ||
PrivateDNSZoneName string `json:"privateDNSZoneName,omitempty"` | ||
|
||
// PrivateDNSZone enables private dns zone creation modes for a private cluster. | ||
// When unspecified, it defaults to PrivateDNSZoneModeSystem which creates a private DNS zone. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you specify what are the valid options for this field? Looks like it'll be "System or None". Can this also be validated in a webhook? |
||
// +kubebuilder:validation:Enum=System;None | ||
// +optional | ||
PrivateDNSZone *PrivateDNSZoneMode `json:"privateDNSZone,omitempty"` | ||
|
||
// PrivateDNSZoneResourceGroup defines the resource group to be used for Azure Private DNS Zone. | ||
// If not specified, the resource group of the cluster will be used to create the Azure Private DNS Zone. | ||
// +optional | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this comment mean that if
PrivateDNSZoneMode
is not set, the Private DNS Zone is not created? Or is it not created if set to None? I think the comment is fine but may need a bit more clarification.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
PrivateDNSZoneMode
is not set, it would follow the default behavior where Private DNS Zone will be created. That is the same behavior when its value ti set to PrivateDNSZoneModeSystem.We set to PrivateDNSZoneModeNone, Private DNS Zone creation would be skipped.
Updated comment to hepefully make it clearer.