Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiying-lin committed Sep 4, 2024
1 parent 100e62a commit 64e43c1
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 23 deletions.
4 changes: 2 additions & 2 deletions api/v1alpha1/internalserviceexport_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ type InternalServiceExportSpec struct {
IsDNSLabelConfigured bool `json:"isDNSLabelConfigured,omitempty"`
// IsInternalLoadBalancer determines if the Service is an internal load balancer type.
IsInternalLoadBalancer bool `json:"isInternalLoadBalancer,omitempty"`
// ExternalIPResourceID is the Azure Resource URI of external IP. This is only applicable for Load Balancer type Services.
ExternalIPResourceID *string `json:"externalIPResourceID,omitempty"`
// PublicIPResourceID is the Azure Resource URI of public IP. This is only applicable for Load Balancer type Services.
PublicIPResourceID *string `json:"externalIPResourceID,omitempty"`
}

// InternalServiceExportStatus contains the current status of an InternalServiceExport.
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/trafficmanagerbackend_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ type TrafficManagerBackendStatus struct {
// +optional
Endpoints []TrafficManagerEndpointStatus `json:"endpoints,omitempty"`

// Current service state
// Current backend state
// +optional
// +patchMergeKey=type
// +patchStrategy=merge
Expand Down
15 changes: 6 additions & 9 deletions api/v1alpha1/trafficmanagerprofile_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,18 @@ type MonitorConfig struct {
// of each endpoint in this profile.
// You can specify two values here: 30 seconds (normal probing) and 10 seconds (fast probing).
// +optional
// +kubebuilder:default=30
IntervalInSeconds *int64 `json:"intervalInSeconds,omitempty"`

// The path relative to the endpoint domain name used to probe for endpoint health.
// +optional
// +kubebuilder:default="/"
Path *string `json:"path,omitempty"`

// The TCP port used to probe for endpoint health.
// +optional
// +kubebuilder:default=80
Port *int64 `json:"port,omitempty"`

// The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.
// +kubebuilder:validation:Enum=HTTP;HTTPS;TCP
// +kubebuilder:default=HTTP
// +optional
Protocol *TrafficManagerMonitorProtocol `json:"protocol,omitempty"`

Expand All @@ -72,7 +68,6 @@ type MonitorConfig struct {
// The number of consecutive failed health check that Traffic Manager tolerates before declaring an endpoint in this profile
// Degraded after the next failed health check.
// +optional
// +kubebuilder:default=3
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=9
ToleratedNumberOfFailures *int64 `json:"toleratedNumberOfFailures,omitempty"`
Expand All @@ -89,11 +84,13 @@ const (

type TrafficManagerProfileStatus struct {
// DNSName is the fully-qualified domain name (FQDN) of the Traffic Manager profile.
// For example, "azuresdkfornetautoresttrafficmanager3880.tmpreview.watmtest.azure-test.net"
// It consists of profile name and the DNS domain name used by Azure Traffic Manager to form the fully-qualified
// domain name (FQDN) of the profile.
// For example, "<TrafficManagerProfileName>.trafficmanager.net"
// +optional
DNSName *string `json:"dnsName,omitempty"`

// Current service state
// Current profile state
// +optional
// +patchMergeKey=type
// +patchStrategy=merge
Expand Down Expand Up @@ -136,8 +133,8 @@ const (
// TrafficManagerProfileReasonInvalid is used with the "Programmed" when the profile is syntactically or semantically invalid.
TrafficManagerProfileReasonInvalid TrafficManagerProfileConditionReason = "Invalid"

// TrafficManagerProfileReasonAddressNotUsable is used with the "Programmed" condition when the generated DNS name is not usable.
TrafficManagerProfileReasonAddressNotUsable TrafficManagerProfileConditionReason = "AddressNotUsable"
// TrafficManagerProfileReasonDNSNameNotAvailable is used with the "Programmed" condition when the generated DNS name is not available.
TrafficManagerProfileReasonDNSNameNotAvailable TrafficManagerProfileConditionReason = "DNSNameNotAvailable"

// TrafficManagerProfileReasonPending is used with the "Programmed" when creating or updating the profile hits an internal error
// with more detail in the message and the controller will keep retry.
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
exported Service are sync'd.
properties:
externalIPResourceID:
description: ExternalIPResourceID is the Azure Resource URI of external
description: PublicIPResourceID is the Azure Resource URI of public
IP. This is only applicable for Load Balancer type Services.
type: string
isDNSLabelConfigured:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ spec:
description: The observed status of TrafficManagerBackend.
properties:
conditions:
description: Current service state
description: Current backend state
items:
description: "Condition contains details for one aspect of the current
state of this API Resource.\n---\nThis struct is intended for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,21 @@ spec:
profile.
properties:
intervalInSeconds:
default: 30
description: |-
The monitor interval for endpoints in this profile. This is the interval at which Traffic Manager will check the health
of each endpoint in this profile.
You can specify two values here: 30 seconds (normal probing) and 10 seconds (fast probing).
format: int64
type: integer
path:
default: /
description: The path relative to the endpoint domain name used
to probe for endpoint health.
type: string
port:
default: 80
description: The TCP port used to probe for endpoint health.
format: int64
type: integer
protocol:
default: HTTP
description: The protocol (HTTP, HTTPS or TCP) used to probe for
endpoint health.
enum:
Expand All @@ -97,7 +93,6 @@ spec:
format: int64
type: integer
toleratedNumberOfFailures:
default: 3
description: |-
The number of consecutive failed health check that Traffic Manager tolerates before declaring an endpoint in this profile
Degraded after the next failed health check.
Expand All @@ -111,7 +106,7 @@ spec:
description: The observed status of TrafficManagerProfile.
properties:
conditions:
description: Current service state
description: Current profile state
items:
description: "Condition contains details for one aspect of the current
state of this API Resource.\n---\nThis struct is intended for
Expand Down Expand Up @@ -186,7 +181,9 @@ spec:
dnsName:
description: |-
DNSName is the fully-qualified domain name (FQDN) of the Traffic Manager profile.
For example, "azuresdkfornetautoresttrafficmanager3880.tmpreview.watmtest.azure-test.net"
It consists of profile name and the DNS domain name used by Azure Traffic Manager to form the fully-qualified
domain name (FQDN) of the profile.
For example, "<TrafficManagerProfileName>.trafficmanager.net"
type: string
type: object
required:
Expand Down

0 comments on commit 64e43c1

Please sign in to comment.