Skip to content

Commit 2eb4378

Browse files
authored
Remove the deprecated cloud endpoint domain status (#727)
1 parent 51e627c commit 2eb4378

File tree

4 files changed

+0
-80
lines changed

4 files changed

+0
-80
lines changed

api/ngrok/v1alpha1/cloudendpoint_types.go

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ SOFTWARE.
2525
package v1alpha1
2626

2727
import (
28-
ingressv1alpha1 "github.com/ngrok/ngrok-operator/api/ingress/v1alpha1"
2928
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3029
)
3130

@@ -89,10 +88,6 @@ type CloudEndpointStatus struct {
8988
// ID is the unique identifier for this endpoint
9089
ID string `json:"id,omitempty"`
9190

92-
// Deprecated: This is here for backwards compatibility with the old DomainStatus object.
93-
// This will be removed in a future version. Use DomainRef instead.
94-
Domain *CloudEndpointStatusDeprecatedDomainStatus `json:"domain,omitempty"`
95-
9691
// DomainRef is a reference to the Domain resource associated with this endpoint.
9792
// For internal endpoints, this will be nil.
9893
// +kubebuilder:validation:Optional
@@ -108,31 +103,6 @@ type CloudEndpointStatus struct {
108103
Conditions []metav1.Condition `json:"conditions,omitempty"`
109104
}
110105

111-
// Deprecated: This is here for backwards compatibility with the old DomainStatus object.
112-
// This will be removed in a future version.
113-
type CloudEndpointStatusDeprecatedDomainStatus struct {
114-
// ID is the unique identifier of the domain
115-
ID string `json:"id,omitempty"`
116-
117-
// Domain is the domain that was reserved
118-
Domain string `json:"domain,omitempty"`
119-
120-
// Region is the region in which the domain was created
121-
Region string `json:"region,omitempty"`
122-
123-
// CNAMETarget is the CNAME target for the domain
124-
CNAMETarget *string `json:"cnameTarget,omitempty"`
125-
}
126-
127-
func ConvertDomainStatusToDeprecatedDomainStatus(domain *ingressv1alpha1.DomainStatus) *CloudEndpointStatusDeprecatedDomainStatus {
128-
return &CloudEndpointStatusDeprecatedDomainStatus{
129-
ID: domain.ID,
130-
Domain: domain.Domain,
131-
Region: domain.Region,
132-
CNAMETarget: domain.CNAMETarget,
133-
}
134-
}
135-
136106
// CloudEndpoint is the Schema for the cloudendpoints API
137107
//
138108
// +kubebuilder:object:root=true

api/ngrok/v1alpha1/zz_generated.deepcopy.go

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

helm/ngrok-operator/templates/crds/ngrok.k8s.ngrok.com_cloudendpoints.yaml

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

internal/controller/ngrok/cloudendpoint_controller.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,6 @@ func (r *CloudEndpointReconciler) updateStatus(ctx context.Context, clep *ngrokv
256256
clep.Status.ID = ngrokClep.ID
257257
}
258258

259-
// Update domain status fields
260-
if domainResult != nil && domainResult.Domain != nil {
261-
// Set the deprecated domain status for backwards compatibility
262-
//nolint:staticcheck
263-
clep.Status.Domain = ngrokv1alpha1.ConvertDomainStatusToDeprecatedDomainStatus(&domainResult.Domain.Status)
264-
}
265-
266259
// Calculate overall Ready condition based on other conditions and domain status
267260
calculateCloudEndpointReadyCondition(clep, domainResult)
268261

0 commit comments

Comments
 (0)