Skip to content

Commit

Permalink
Support status.ExternalRef
Browse files Browse the repository at this point in the history
  • Loading branch information
gemmahou committed Aug 23, 2024
1 parent 1252cb0 commit 4588327
Show file tree
Hide file tree
Showing 7 changed files with 183 additions and 95 deletions.
10 changes: 2 additions & 8 deletions apis/compute/v1beta1/computeforwardingrule_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package v1beta1

import (
refs "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1"
"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1"
commonv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/apis/common/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
Expand Down Expand Up @@ -365,9 +365,7 @@ type ComputeForwardingRuleSpec struct {

// +kcc:proto=google.cloud.compute.v1.ForwardingRule
type ComputeForwardingRuleStatus struct {
/* Conditions represent the latest available observations of the
ComputeForwardingRule's current state. */
Conditions []v1alpha1.Condition `json:"conditions,omitempty"`
commonv1alpha1.CommonStatus `json:",inline"`
/* [Output Only] The URL for the corresponding base Forwarding Rule. By base Forwarding Rule, we mean the Forwarding Rule that has the same IP address, protocol, and port settings with the current Forwarding Rule, but without sourceIPRanges specified. Always empty if the current Forwarding Rule does not have sourceIPRanges specified. */
// +optional
BaseForwardingRule *string `json:"baseForwardingRule,omitempty"`
Expand All @@ -381,10 +379,6 @@ type ComputeForwardingRuleStatus struct {
// +optional
LabelFingerprint *string `json:"labelFingerprint,omitempty"`

/* ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. */
// +optional
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`

/* The PSC connection id of the PSC Forwarding Rule. */
// +optional
PscConnectionId *string `json:"pscConnectionId,omitempty"`
Expand Down
12 changes: 1 addition & 11 deletions apis/compute/v1beta1/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 @@ -384,7 +384,7 @@ spec:
type: object
type: array
externalRef:
description: A unique specifier for the CloudBuild workerpool resource
description: A unique Config Connector specifier for the resource
in GCP.
type: string
observedGeneration:
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/common/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type CommonStatus struct {
// +optional
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`

/* A unique specifier for the CloudBuild workerpool resource in GCP.*/
/* A unique Config Connector specifier for the resource in GCP.*/
// +optional
ExternalRef *string `json:"externalRef,omitempty"`
}

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

Loading

0 comments on commit 4588327

Please sign in to comment.