Repository: GoogleCloudPlatform/k8s-config-connector
Pull request #4054: Types and Mapper for resource api quotaadjustersettings
Author: login: barney-s
Labels: name: lgtm
name: approved
name: review
Created: 2025-03-17T00:41:54Z | Merged: 2025-03-26T16:20:04Z



Diff:
diff --git a/apis/cloudquota/v1alpha1/quotaadjustersettings_identity.go b/apis/cloudquota/v1alpha1/quotaadjustersettings_identity.go
new file mode 100644
index 00000000000..b97e3341f36
--- /dev/null
+++ b/apis/cloudquota/v1alpha1/quotaadjustersettings_identity.go
@@ -0,0 +1,118 @@
+// Copyright 2025 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package v1alpha1
+
+import (
+	"context"
+	"fmt"
+	"strings"
+
+	"github.com/GoogleCloudPlatform/k8s-config-connector/apis/common"
+	refsv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1"
+	"sigs.k8s.io/controller-runtime/pkg/client"
+)
+
+// QuotaAdjusterSettingsIdentity defines the resource reference to APIQuotaAdjusterSettings, which "External" field
+// holds the GCP identifier for the KRM object.
+type QuotaAdjusterSettingsIdentity struct {
+	parent *QuotaAdjusterSettingsParent
+	id     string
+}
+
+func (i *QuotaAdjusterSettingsIdentity) String() string {
+	return i.parent.String() + "/quotaAdjusterSettings/" + i.id
+}
+
+func (i *QuotaAdjusterSettingsIdentity) ID() string {
+	return i.id
+}
+
+func (i *QuotaAdjusterSettingsIdentity) Parent() *QuotaAdjusterSettingsParent {
+	return i.parent
+}
+
+// QuotaAdjusterSettingsParent defines the GCP project, location for the given QuotaAdjusterSettings resource.
+type QuotaAdjusterSettingsParent struct {
+	ProjectID string
+	Location  string
+}
+
+func (p *QuotaAdjusterSettingsParent) String() string {
+	return "projects/" + p.ProjectID + "/locations/" + p.Location
+}
+
+// New builds a QuotaAdjusterSettingsIdentity from the Config Connector QuotaAdjusterSettings object.
+func NewQuotaAdjusterSettingsIdentity(ctx context.Context, reader client.Reader, obj *APIQuotaAdjusterSettings) (*QuotaAdjusterSettingsIdentity, error) {
+
+	// Get Parent
+	projectRef, err := refsv1beta1.ResolveProject(ctx, reader, obj.GetNamespace(), obj.Spec.ProjectRef)
+	if err != nil {
+		return nil, err
+	}
+	projectID := projectRef.ProjectID
+	if projectID == "" {
+		return nil, fmt.Errorf("cannot resolve project")
+	}
+	location := obj.Spec.Location
+
+	// Get desired ID
+	resourceID := common.ValueOf(obj.Spec.ResourceID)
+	if resourceID == "" {
+		resourceID = obj.GetName()
+	}
+	if resourceID == "" {
+		return nil, fmt.Errorf("cannot resolve resource ID")
+	}
+
+	// Use approved External
+	externalRef := common.ValueOf(obj.Status.ExternalRef)
+	if externalRef != "" {
+		// Validate desired with actual
+		actualParent, actualResourceID, err := ParseQuotaAdjusterSettingsExternal(externalRef)
+		if err != nil {
+			return nil, err
+		}
+		if actualParent.ProjectID != projectID {
+			return nil, fmt.Errorf("spec.projectRef changed, expect %s, got %s", actualParent.ProjectID, projectID)
+		}
+		if actualParent.Location != location {
+			return nil, fmt.Errorf("spec.location changed, expect %s, got %s", actualParent.Location, location)
+		}
+		if actualResourceID != resourceID {
+			return nil, fmt.Errorf("cannot reset `metadata.name` or `spec.resourceID` to %s, since it has already assigned to %s",
+				resourceID, actualResourceID)
+		}
+	}
+	return &QuotaAdjusterSettingsIdentity{
+		parent: &QuotaAdjusterSettingsParent{
+			ProjectID: projectID,
+			Location:  location,
+		},
+		id: resourceID,
+	}, nil
+}
+
+func ParseQuotaAdjusterSettingsExternal(external string) (parent *QuotaAdjusterSettingsParent, resourceID string, err error) {
+	tokens := strings.Split(external, "/")
+	if len(tokens) != 6 || tokens[0] != "projects" || tokens[2] != "locations" || tokens[4] != "quotaAdjusterSettings" {
+		return nil, "", fmt.Errorf("format of APIQuotaAdjusterSettings external=%q was not known (use projects/{{projectID}}/locations/{{location}}/quotaAdjusterSettings/{{quotaAdjusterSettingsID}})", external)
+	}
+	parent = &QuotaAdjusterSettingsParent{
+		ProjectID: tokens[1],
+		Location:  tokens[3],
+	}
+	resourceID = tokens[5]
+	return parent, resourceID, nil
+}
diff --git a/apis/cloudquota/v1alpha1/quotaadjustersettings_reference.go b/apis/cloudquota/v1alpha1/quotaadjustersettings_reference.go
new file mode 100644
index 00000000000..d41be1c2494
--- /dev/null
+++ b/apis/cloudquota/v1alpha1/quotaadjustersettings_reference.go
@@ -0,0 +1,83 @@
+// Copyright 2025 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package v1alpha1
+
+import (
+	"context"
+	"fmt"
+
+	refsv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1"
+	"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/k8s"
+	apierrors "k8s.io/apimachinery/pkg/api/errors"
+	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+	"k8s.io/apimachinery/pkg/types"
+	"sigs.k8s.io/controller-runtime/pkg/client"
+)
+
+var _ refsv1beta1.ExternalNormalizer = &QuotaAdjusterSettingsRef{}
+
+// QuotaAdjusterSettingsRef defines the resource reference to APIQuotaAdjusterSettings, which "External" field
+// holds the GCP identifier for the KRM object.
+type QuotaAdjusterSettingsRef struct {
+	// A reference to an externally managed APIQuotaAdjusterSettings resource.
+	// Should be in the format "projects/{{projectID}}/locations/{{location}}/quotaadjustersettingss/{{quotaadjustersettingsID}}".
+	External string `json:"external,omitempty"`
+
+	// The name of a APIQuotaAdjusterSettings resource.
+	Name string `json:"name,omitempty"`
+
+	// The namespace of a APIQuotaAdjusterSettings resource.
+	Namespace string `json:"namespace,omitempty"`
+}
+
+// NormalizedExternal provision the "External" value for other resource that depends on APIQuotaAdjusterSettings.
+// If the "External" is given in the other resource's spec.APIQuotaAdjusterSettingsRef, the given value will be used.
+// Otherwise, the "Name" and "Namespace" will be used to query the actual APIQuotaAdjusterSettings object from the cluster.
+func (r *QuotaAdjusterSettingsRef) NormalizedExternal(ctx context.Context, reader client.Reader, otherNamespace string) (string, error) {
+	if r.External != "" && r.Name != "" {
+		return "", fmt.Errorf("cannot specify both name and external on %s reference", APIQuotaAdjusterSettingsGVK.Kind)
+	}
+	// From given External
+	if r.External != "" {
+		if _, _, err := ParseQuotaAdjusterSettingsExternal(r.External); err != nil {
+			return "", err
+		}
+		return r.External, nil
+	}
+
+	// From the Config Connector object
+	if r.Namespace == "" {
+		r.Namespace = otherNamespace
+	}
+	key := types.NamespacedName{Name: r.Name, Namespace: r.Namespace}
+	u := &unstructured.Unstructured{}
+	u.SetGroupVersionKind(APIQuotaAdjusterSettingsGVK)
+	if err := reader.Get(ctx, key, u); err != nil {
+		if apierrors.IsNotFound(err) {
+			return "", k8s.NewReferenceNotFoundError(u.GroupVersionKind(), key)
+		}
+		return "", fmt.Errorf("reading referenced %s %s: %w", APIQuotaAdjusterSettingsGVK, key, err)
+	}
+	// Get external from status.externalRef. This is the most trustworthy place.
+	actualExternalRef, _, err := unstructured.NestedString(u.Object, "status", "externalRef")
+	if err != nil {
+		return "", fmt.Errorf("reading status.externalRef: %w", err)
+	}
+	if actualExternalRef == "" {
+		return "", k8s.NewReferenceNotReadyError(u.GroupVersionKind(), key)
+	}
+	r.External = actualExternalRef
+	return r.External, nil
+}
diff --git a/apis/cloudquota/v1alpha1/quotaadjustersettings_types.go b/apis/cloudquota/v1alpha1/quotaadjustersettings_types.go
new file mode 100644
index 00000000000..cd13f3b5318
--- /dev/null
+++ b/apis/cloudquota/v1alpha1/quotaadjustersettings_types.go
@@ -0,0 +1,108 @@
+// Copyright 2025 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package v1alpha1
+
+import (
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+	refv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1"
+	"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/apis/k8s/v1alpha1"
+)
+
+var APIQuotaAdjusterSettingsGVK = GroupVersion.WithKind("APIQuotaAdjusterSettings")
+
+type AdjusterSettingsParent struct {
+	// +required
+	ProjectRef *refv1beta1.ProjectRef `json:"projectRef"`
+	// +required
+	Location string `json:"location"`
+}
+
+// APIQuotaAdjusterSettingsSpec defines the desired state of APIQuotaAdjusterSettings
+// +kcc:proto=google.api.cloudquotas.v1beta.QuotaAdjusterSettings
+type APIQuotaAdjusterSettingsSpec struct {
+	AdjusterSettingsParent `json:",inline"`
+	// The APIQuotaAdjusterSettings name. If not given, the metadata.name will be used.
+	ResourceID *string `json:"resourceID,omitempty"`
+	// Required. The configured value of the enablement at the given resource.
+	// +kcc:proto:field=google.api.cloudquotas.v1beta.QuotaAdjusterSettings.enablement
+	//+required
+	Enablement *string `json:"enablement,omitempty"`
+}
+
+// APIQuotaAdjusterSettingsStatus defines the config connector machine state of APIQuotaAdjusterSettings
+type APIQuotaAdjusterSettingsStatus struct {
+	/* Conditions represent the latest available observations of the
+	   object's current state. */
+	Conditions []v1alpha1.Condition `json:"conditions,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.
+	ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
+
+	// A unique specifier for the APIQuotaAdjusterSettings resource in GCP.
+	ExternalRef *string `json:"externalRef,omitempty"`
+
+	// ObservedState is the state of the resource as most recently observed in GCP.
+	ObservedState *APIQuotaAdjusterSettingsObservedState `json:"observedState,omitempty"`
+}
+
+// APIQuotaAdjusterSettingsObservedState is the state of the APIQuotaAdjusterSettings resource as most recently observed in GCP.
+// +kcc:proto=google.api.cloudquotas.v1beta.QuotaAdjusterSettings
+type APIQuotaAdjusterSettingsObservedState struct {
+	// Output only. The timestamp when the QuotaAdjusterSettings was last updated.
+	// +kcc:proto:field=google.api.cloudquotas.v1beta.QuotaAdjusterSettings.update_time
+	UpdateTime *string `json:"updateTime,omitempty"`
+	// Optional. The current etag of the QuotaAdjusterSettings. If an etag is
+	//  provided on update and does not match the current server's etag of the
+	//  QuotaAdjusterSettings, the request will be blocked and an ABORTED error
+	//  will be returned. See https://google.aip.dev/134#etags for more details on
+	//  etags.
+	// +kcc:proto:field=google.api.cloudquotas.v1beta.QuotaAdjusterSettings.etag
+	Etag *string `json:"etag,omitempty"`
+}
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// TODO(user): make sure the pluralizaiton below is correct
+// +kubebuilder:resource:categories=gcp,shortName=gcpapiquotaadjustersetting;gcpapiquotaadjustersettings
+// +kubebuilder:subresource:status
+// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true"
+// +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date"
+// +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded"
+// +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'"
+// +kubebuilder:printcolumn:name="Status Age",JSONPath=".status.conditions[?(@.type=='Ready')].lastTransitionTime",type="date",description="The last transition time for the value in 'Status'"
+
+// APIQuotaAdjusterSettings is the Schema for the APIQuotaAdjusterSettings API
+// +k8s:openapi-gen=true
+type APIQuotaAdjusterSettings struct {
+	metav1.TypeMeta   `json:",inline"`
+	metav1.ObjectMeta `json:"metadata,omitempty"`
+
+	// +required
+	Spec   APIQuotaAdjusterSettingsSpec   `json:"spec,omitempty"`
+	Status APIQuotaAdjusterSettingsStatus `json:"status,omitempty"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// APIQuotaAdjusterSettingsList contains a list of APIQuotaAdjusterSettings
+type APIQuotaAdjusterSettingsList struct {
+	metav1.TypeMeta `json:",inline"`
+	metav1.ListMeta `json:"metadata,omitempty"`
+	Items           []APIQuotaAdjusterSettings `json:"items"`
+}
+
+func init() {
+	SchemeBuilder.Register(&APIQuotaAdjusterSettings{}, &APIQuotaAdjusterSettingsList{})
+}
diff --git a/apis/cloudquota/v1alpha1/types.generated.go b/apis/cloudquota/v1alpha1/types.generated.go
index e7247a08e74..686d1fed947 100644
--- a/apis/cloudquota/v1alpha1/types.generated.go
+++ b/apis/cloudquota/v1alpha1/types.generated.go
@@ -50,3 +50,30 @@ type QuotaConfigObservedState struct {
 	// +kcc:proto:field=google.api.cloudquotas.v1beta.QuotaConfig.request_origin
 	RequestOrigin *string `json:"requestOrigin,omitempty"`
 }
+
+// +kcc:proto=google.api.cloudquotas.v1beta.QuotaAdjusterSettings
+type QuotaAdjusterSettings struct {
+	// Identifier. Name of the config would be of the format:
+	//    projects/12345/locations/global/quotaAdjusterSettings
+	// +kcc:proto:field=google.api.cloudquotas.v1beta.QuotaAdjusterSettings.name
+	Name *string `json:"name,omitempty"`
+
+	// Required. The configured value of the enablement at the given resource.
+	// +kcc:proto:field=google.api.cloudquotas.v1beta.QuotaAdjusterSettings.enablement
+	Enablement *string `json:"enablement,omitempty"`
+
+	// Optional. The current etag of the QuotaAdjusterSettings. If an etag is
+	//  provided on update and does not match the current server's etag of the
+	//  QuotaAdjusterSettings, the request will be blocked and an ABORTED error
+	//  will be returned. See https://google.aip.dev/134#etags for more details on
+	//  etags.
+	// +kcc:proto:field=google.api.cloudquotas.v1beta.QuotaAdjusterSettings.etag
+	Etag *string `json:"etag,omitempty"`
+}
+
+// +kcc:proto=google.api.cloudquotas.v1beta.QuotaAdjusterSettings
+type QuotaAdjusterSettingsObservedState struct {
+	// Output only. The timestamp when the QuotaAdjusterSettings was last updated.
+	// +kcc:proto:field=google.api.cloudquotas.v1beta.QuotaAdjusterSettings.update_time
+	UpdateTime *string `json:"updateTime,omitempty"`
+}
diff --git a/apis/cloudquota/v1alpha1/zz_generated.deepcopy.go b/apis/cloudquota/v1alpha1/zz_generated.deepcopy.go
index c36e0790088..2527b01cea9 100644
--- a/apis/cloudquota/v1alpha1/zz_generated.deepcopy.go
+++ b/apis/cloudquota/v1alpha1/zz_generated.deepcopy.go
@@ -24,6 +24,151 @@ import (
 	runtime "k8s.io/apimachinery/pkg/runtime"
 )
 
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *APIQuotaAdjusterSettings) DeepCopyInto(out *APIQuotaAdjusterSettings) {
+	*out = *in
+	out.TypeMeta = in.TypeMeta
+	in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+	in.Spec.DeepCopyInto(&out.Spec)
+	in.Status.DeepCopyInto(&out.Status)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIQuotaAdjusterSettings.
+func (in *APIQuotaAdjusterSettings) DeepCopy() *APIQuotaAdjusterSettings {
+	if in == nil {
+		return nil
+	}
+	out := new(APIQuotaAdjusterSettings)
+	in.DeepCopyInto(out)
+	return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *APIQuotaAdjusterSettings) DeepCopyObject() runtime.Object {
+	if c := in.DeepCopy(); c != nil {
+		return c
+	}
+	return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *APIQuotaAdjusterSettingsList) DeepCopyInto(out *APIQuotaAdjusterSettingsList) {
+	*out = *in
+	out.TypeMeta = in.TypeMeta
+	in.ListMeta.DeepCopyInto(&out.ListMeta)
+	if in.Items != nil {
+		in, out := &in.Items, &out.Items
+		*out = make([]APIQuotaAdjusterSettings, len(*in))
+		for i := range *in {
+			(*in)[i].DeepCopyInto(&(*out)[i])
+		}
+	}
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIQuotaAdjusterSettingsList.
+func (in *APIQuotaAdjusterSettingsList) DeepCopy() *APIQuotaAdjusterSettingsList {
+	if in == nil {
+		return nil
+	}
+	out := new(APIQuotaAdjusterSettingsList)
+	in.DeepCopyInto(out)
+	return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *APIQuotaAdjusterSettingsList) DeepCopyObject() runtime.Object {
+	if c := in.DeepCopy(); c != nil {
+		return c
+	}
+	return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *APIQuotaAdjusterSettingsObservedState) DeepCopyInto(out *APIQuotaAdjusterSettingsObservedState) {
+	*out = *in
+	if in.UpdateTime != nil {
+		in, out := &in.UpdateTime, &out.UpdateTime
+		*out = new(string)
+		**out = **in
+	}
+	if in.Etag != nil {
+		in, out := &in.Etag, &out.Etag
+		*out = new(string)
+		**out = **in
+	}
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIQuotaAdjusterSettingsObservedState.
+func (in *APIQuotaAdjusterSettingsObservedState) DeepCopy() *APIQuotaAdjusterSettingsObservedState {
+	if in == nil {
+		return nil
+	}
+	out := new(APIQuotaAdjusterSettingsObservedState)
+	in.DeepCopyInto(out)
+	return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *APIQuotaAdjusterSettingsSpec) DeepCopyInto(out *APIQuotaAdjusterSettingsSpec) {
+	*out = *in
+	in.AdjusterSettingsParent.DeepCopyInto(&out.AdjusterSettingsParent)
+	if in.ResourceID != nil {
+		in, out := &in.ResourceID, &out.ResourceID
+		*out = new(string)
+		**out = **in
+	}
+	if in.Enablement != nil {
+		in, out := &in.Enablement, &out.Enablement
+		*out = new(string)
+		**out = **in
+	}
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIQuotaAdjusterSettingsSpec.
+func (in *APIQuotaAdjusterSettingsSpec) DeepCopy() *APIQuotaAdjusterSettingsSpec {
+	if in == nil {
+		return nil
+	}
+	out := new(APIQuotaAdjusterSettingsSpec)
+	in.DeepCopyInto(out)
+	return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *APIQuotaAdjusterSettingsStatus) DeepCopyInto(out *APIQuotaAdjusterSettingsStatus) {
+	*out = *in
+	if in.Conditions != nil {
+		in, out := &in.Conditions, &out.Conditions
+		*out = make([]k8sv1alpha1.Condition, len(*in))
+		copy(*out, *in)
+	}
+	if in.ObservedGeneration != nil {
+		in, out := &in.ObservedGeneration, &out.ObservedGeneration
+		*out = new(int64)
+		**out = **in
+	}
+	if in.ExternalRef != nil {
+		in, out := &in.ExternalRef, &out.ExternalRef
+		*out = new(string)
+		**out = **in
+	}
+	if in.ObservedState != nil {
+		in, out := &in.ObservedState, &out.ObservedState
+		*out = new(APIQuotaAdjusterSettingsObservedState)
+		(*in).DeepCopyInto(*out)
+	}
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIQuotaAdjusterSettingsStatus.
+func (in *APIQuotaAdjusterSettingsStatus) DeepCopy() *APIQuotaAdjusterSettingsStatus {
+	if in == nil {
+		return nil
+	}
+	out := new(APIQuotaAdjusterSettingsStatus)
+	in.DeepCopyInto(out)
+	return out
+}
+
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *APIQuotaPreference) DeepCopyInto(out *APIQuotaPreference) {
 	*out = *in
@@ -211,6 +356,26 @@ func (in *APIQuotaPreferenceStatus) DeepCopy() *APIQuotaPreferenceStatus {
 	return out
 }
 
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AdjusterSettingsParent) DeepCopyInto(out *AdjusterSettingsParent) {
+	*out = *in
+	if in.ProjectRef != nil {
+		in, out := &in.ProjectRef, &out.ProjectRef
+		*out = new(v1beta1.ProjectRef)
+		**out = **in
+	}
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdjusterSettingsParent.
+func (in *AdjusterSettingsParent) DeepCopy() *AdjusterSettingsParent {
+	if in == nil {
+		return nil
+	}
+	out := new(AdjusterSettingsParent)
+	in.DeepCopyInto(out)
+	return out
+}
+
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *Parent) DeepCopyInto(out *Parent) {
 	*out = *in
@@ -241,6 +406,106 @@ func (in *Parent) DeepCopy() *Parent {
 	return out
 }
 
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *QuotaAdjusterSettings) DeepCopyInto(out *QuotaAdjusterSettings) {
+	*out = *in
+	if in.Name != nil {
+		in, out := &in.Name, &out.Name
+		*out = new(string)
+		**out = **in
+	}
+	if in.Enablement != nil {
+		in, out := &in.Enablement, &out.Enablement
+		*out = new(string)
+		**out = **in
+	}
+	if in.Etag != nil {
+		in, out := &in.Etag, &out.Etag
+		*out = new(string)
+		**out = **in
+	}
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaAdjusterSettings.
+func (in *QuotaAdjusterSettings) DeepCopy() *QuotaAdjusterSettings {
+	if in == nil {
+		return nil
+	}
+	out := new(QuotaAdjusterSettings)
+	in.DeepCopyInto(out)
+	return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *QuotaAdjusterSettingsIdentity) DeepCopyInto(out *QuotaAdjusterSettingsIdentity) {
+	*out = *in
+	if in.parent != nil {
+		in, out := &in.parent, &out.parent
+		*out = new(QuotaAdjusterSettingsParent)
+		**out = **in
+	}
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaAdjusterSettingsIdentity.
+func (in *QuotaAdjusterSettingsIdentity) DeepCopy() *QuotaAdjusterSettingsIdentity {
+	if in == nil {
+		return nil
+	}
+	out := new(QuotaAdjusterSettingsIdentity)
+	in.DeepCopyInto(out)
+	return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *QuotaAdjusterSettingsObservedState) DeepCopyInto(out *QuotaAdjusterSettingsObservedState) {
+	*out = *in
+	if in.UpdateTime != nil {
+		in, out := &in.UpdateTime, &out.UpdateTime
+		*out = new(string)
+		**out = **in
+	}
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaAdjusterSettingsObservedState.
+func (in *QuotaAdjusterSettingsObservedState) DeepCopy() *QuotaAdjusterSettingsObservedState {
+	if in == nil {
+		return nil
+	}
+	out := new(QuotaAdjusterSettingsObservedState)
+	in.DeepCopyInto(out)
+	return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *QuotaAdjusterSettingsParent) DeepCopyInto(out *QuotaAdjusterSettingsParent) {
+	*out = *in
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaAdjusterSettingsParent.
+func (in *QuotaAdjusterSettingsParent) DeepCopy() *QuotaAdjusterSettingsParent {
+	if in == nil {
+		return nil
+	}
+	out := new(QuotaAdjusterSettingsParent)
+	in.DeepCopyInto(out)
+	return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *QuotaAdjusterSettingsRef) DeepCopyInto(out *QuotaAdjusterSettingsRef) {
+	*out = *in
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaAdjusterSettingsRef.
+func (in *QuotaAdjusterSettingsRef) DeepCopy() *QuotaAdjusterSettingsRef {
+	if in == nil {
+		return nil
+	}
+	out := new(QuotaAdjusterSettingsRef)
+	in.DeepCopyInto(out)
+	return out
+}
+
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *QuotaConfig) DeepCopyInto(out *QuotaConfig) {
 	*out = *in
diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_apiquotaadjustersettings.cloudquota.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_apiquotaadjustersettings.cloudquota.cnrm.cloud.google.com.yaml
new file mode 100644
index 00000000000..4ee3a1c9e8d
--- /dev/null
+++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_apiquotaadjustersettings.cloudquota.cnrm.cloud.google.com.yaml
@@ -0,0 +1,176 @@
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  annotations:
+    cnrm.cloud.google.com/version: 0.0.0-dev
+  creationTimestamp: null
+  labels:
+    cnrm.cloud.google.com/managed-by-kcc: "true"
+    cnrm.cloud.google.com/system: "true"
+  name: apiquotaadjustersettings.cloudquota.cnrm.cloud.google.com
+spec:
+  group: cloudquota.cnrm.cloud.google.com
+  names:
+    categories:
+    - gcp
+    kind: APIQuotaAdjusterSettings
+    listKind: APIQuotaAdjusterSettingsList
+    plural: apiquotaadjustersettings
+    shortNames:
+    - gcpapiquotaadjustersetting
+    - gcpapiquotaadjustersettings
+    singular: apiquotaadjustersettings
+  preserveUnknownFields: false
+  scope: Namespaced
+  versions:
+  - additionalPrinterColumns:
+    - jsonPath: .metadata.creationTimestamp
+      name: Age
+      type: date
+    - description: When 'True', the most recent reconcile of the resource succeeded
+      jsonPath: .status.conditions[?(@.type=='Ready')].status
+      name: Ready
+      type: string
+    - description: The reason for the value in 'Ready'
+      jsonPath: .status.conditions[?(@.type=='Ready')].reason
+      name: Status
+      type: string
+    - description: The last transition time for the value in 'Status'
+      jsonPath: .status.conditions[?(@.type=='Ready')].lastTransitionTime
+      name: Status Age
+      type: date
+    name: v1alpha1
+    schema:
+      openAPIV3Schema:
+        description: APIQuotaAdjusterSettings is the Schema for the APIQuotaAdjusterSettings
+          API
+        properties:
+          apiVersion:
+            description: 'APIVersion defines the versioned schema of this representation
+              of an object. Servers should convert recognized schemas to the latest
+              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+            type: string
+          kind:
+            description: 'Kind is a string value representing the REST resource this
+              object represents. Servers may infer this from the endpoint the client
+              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+            type: string
+          metadata:
+            type: object
+          spec:
+            description: APIQuotaAdjusterSettingsSpec defines the desired state of
+              APIQuotaAdjusterSettings
+            properties:
+              enablement:
+                description: Required. The configured value of the enablement at the
+                  given resource.
+                type: string
+              location:
+                type: string
+              projectRef:
+                description: The Project that this resource belongs to.
+                oneOf:
+                - not:
+                    required:
+                    - external
+                  required:
+                  - name
+                - not:
+                    anyOf:
+                    - required:
+                      - name
+                    - required:
+                      - namespace
+                  required:
+                  - external
+                properties:
+                  external:
+                    description: The `projectID` field of a project, when not managed
+                      by Config Connector.
+                    type: string
+                  kind:
+                    description: The kind of the Project resource; optional but must
+                      be `Project` if provided.
+                    type: string
+                  name:
+                    description: The `name` field of a `Project` resource.
+                    type: string
+                  namespace:
+                    description: The `namespace` field of a `Project` resource.
+                    type: string
+                type: object
+              resourceID:
+                description: The APIQuotaAdjusterSettings name. If not given, the
+                  metadata.name will be used.
+                type: string
+            required:
+            - enablement
+            - location
+            - projectRef
+            type: object
+          status:
+            description: APIQuotaAdjusterSettingsStatus defines the config connector
+              machine state of APIQuotaAdjusterSettings
+            properties:
+              conditions:
+                description: Conditions represent the latest available observations
+                  of the object's current state.
+                items:
+                  properties:
+                    lastTransitionTime:
+                      description: Last time the condition transitioned from one status
+                        to another.
+                      type: string
+                    message:
+                      description: Human-readable message indicating details about
+                        last transition.
+                      type: string
+                    reason:
+                      description: Unique, one-word, CamelCase reason for the condition's
+                        last transition.
+                      type: string
+                    status:
+                      description: Status is the status of the condition. Can be True,
+                        False, Unknown.
+                      type: string
+                    type:
+                      description: Type is the type of the condition.
+                      type: string
+                  type: object
+                type: array
+              externalRef:
+                description: A unique specifier for the APIQuotaAdjusterSettings resource
+                  in GCP.
+                type: string
+              observedGeneration:
+                description: 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.
+                format: int64
+                type: integer
+              observedState:
+                description: ObservedState is the state of the resource as most recently
+                  observed in GCP.
+                properties:
+                  etag:
+                    description: Optional. The current etag of the QuotaAdjusterSettings.
+                      If an etag is provided on update and does not match the current
+                      server's etag of the QuotaAdjusterSettings, the request will
+                      be blocked and an ABORTED error will be returned. See https://google.aip.dev/134#etags
+                      for more details on etags.
+                    type: string
+                  updateTime:
+                    description: Output only. The timestamp when the QuotaAdjusterSettings
+                      was last updated.
+                    type: string
+                type: object
+            type: object
+        required:
+        - spec
+        type: object
+    served: true
+    storage: true
+    subresources:
+      status: {}
diff --git a/pkg/controller/direct/cloudquota/mapper.generated.go b/pkg/controller/direct/cloudquota/mapper.generated.go
index cad143c940b..8efd318395b 100644
--- a/pkg/controller/direct/cloudquota/mapper.generated.go
+++ b/pkg/controller/direct/cloudquota/mapper.generated.go
@@ -126,3 +126,86 @@ func QuotaConfigObservedState_ToProto(mapCtx *direct.MapContext, in *krm.QuotaCo
 	out.RequestOrigin = direct.Enum_ToProto[pb.QuotaConfig_Origin](mapCtx, in.RequestOrigin)
 	return out
 }
+
+func APIQuotaAdjusterSettingsObservedState_FromProto(mapCtx *direct.MapContext, in *pb.QuotaAdjusterSettings) *krm.APIQuotaAdjusterSettingsObservedState {
+	if in == nil {
+		return nil
+	}
+	out := &krm.APIQuotaAdjusterSettingsObservedState{}
+	// MISSING: Name
+	out.UpdateTime = direct.StringTimestamp_FromProto(mapCtx, in.GetUpdateTime())
+	out.Etag = direct.LazyPtr(in.GetEtag())
+	return out
+}
+func APIQuotaAdjusterSettingsObservedState_ToProto(mapCtx *direct.MapContext, in *krm.APIQuotaAdjusterSettingsObservedState) *pb.QuotaAdjusterSettings {
+	if in == nil {
+		return nil
+	}
+	out := &pb.QuotaAdjusterSettings{}
+	// MISSING: Name
+	out.UpdateTime = direct.StringTimestamp_ToProto(mapCtx, in.UpdateTime)
+	out.Etag = direct.ValueOf(in.Etag)
+	return out
+}
+func APIQuotaAdjusterSettingsSpec_FromProto(mapCtx *direct.MapContext, in *pb.QuotaAdjusterSettings) *krm.APIQuotaAdjusterSettingsSpec {
+	if in == nil {
+		return nil
+	}
+	out := &krm.APIQuotaAdjusterSettingsSpec{}
+	// MISSING: Name
+	out.Enablement = direct.Enum_FromProto(mapCtx, in.GetEnablement())
+	return out
+}
+func APIQuotaAdjusterSettingsSpec_ToProto(mapCtx *direct.MapContext, in *krm.APIQuotaAdjusterSettingsSpec) *pb.QuotaAdjusterSettings {
+	if in == nil {
+		return nil
+	}
+	out := &pb.QuotaAdjusterSettings{}
+	// MISSING: Name
+	out.Enablement = direct.Enum_ToProto[pb.QuotaAdjusterSettings_Enablement](mapCtx, in.Enablement)
+	return out
+}
+func QuotaAdjusterSettings_FromProto(mapCtx *direct.MapContext, in *pb.QuotaAdjusterSettings) *krm.QuotaAdjusterSettings {
+	if in == nil {
+		return nil
+	}
+	out := &krm.QuotaAdjusterSettings{}
+	out.Name = direct.LazyPtr(in.GetName())
+	out.Enablement = direct.Enum_FromProto(mapCtx, in.GetEnablement())
+	// MISSING: UpdateTime
+	out.Etag = direct.LazyPtr(in.GetEtag())
+	return out
+}
+func QuotaAdjusterSettings_ToProto(mapCtx *direct.MapContext, in *krm.QuotaAdjusterSettings) *pb.QuotaAdjusterSettings {
+	if in == nil {
+		return nil
+	}
+	out := &pb.QuotaAdjusterSettings{}
+	out.Name = direct.ValueOf(in.Name)
+	out.Enablement = direct.Enum_ToProto[pb.QuotaAdjusterSettings_Enablement](mapCtx, in.Enablement)
+	// MISSING: UpdateTime
+	out.Etag = direct.ValueOf(in.Etag)
+	return out
+}
+func QuotaAdjusterSettingsObservedState_FromProto(mapCtx *direct.MapContext, in *pb.QuotaAdjusterSettings) *krm.QuotaAdjusterSettingsObservedState {
+	if in == nil {
+		return nil
+	}
+	out := &krm.QuotaAdjusterSettingsObservedState{}
+	// MISSING: Name
+	// MISSING: Enablement
+	out.UpdateTime = direct.StringTimestamp_FromProto(mapCtx, in.GetUpdateTime())
+	// MISSING: Etag
+	return out
+}
+func QuotaAdjusterSettingsObservedState_ToProto(mapCtx *direct.MapContext, in *krm.QuotaAdjusterSettingsObservedState) *pb.QuotaAdjusterSettings {
+	if in == nil {
+		return nil
+	}
+	out := &pb.QuotaAdjusterSettings{}
+	// MISSING: Name
+	// MISSING: Enablement
+	out.UpdateTime = direct.StringTimestamp_ToProto(mapCtx, in.UpdateTime)
+	// MISSING: Etag
+	return out
+}
diff --git a/pkg/controller/direct/cloudquota/quotaadjustersettings_fuzzer.go b/pkg/controller/direct/cloudquota/quotaadjustersettings_fuzzer.go
new file mode 100644
index 00000000000..ad02393c68d
--- /dev/null
+++ b/pkg/controller/direct/cloudquota/quotaadjustersettings_fuzzer.go
@@ -0,0 +1,44 @@
+// Copyright 2024 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//	http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +tool:fuzz-gen
+// proto.message: google.api.cloudquotas.v1beta.QuotaAdjusterSettings
+// api.group: cloudquotas.cnrm.cloud.google.com
+
+package cloudquota
+
+import (
+	"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/fuzztesting"
+
+	pb "cloud.google.com/go/cloudquotas/apiv1beta/cloudquotaspb"
+)
+
+func init() {
+	fuzztesting.RegisterKRMFuzzer(aPIQuotaAdjusterSettingsFuzzer())
+}
+
+func aPIQuotaAdjusterSettingsFuzzer() fuzztesting.KRMFuzzer {
+	f := fuzztesting.NewKRMTypedFuzzer(&pb.QuotaAdjusterSettings{},
+		APIQuotaAdjusterSettingsSpec_FromProto, APIQuotaAdjusterSettingsSpec_ToProto,
+		APIQuotaAdjusterSettingsObservedState_FromProto, APIQuotaAdjusterSettingsObservedState_ToProto,
+	)
+	f.SpecFields.Insert(".enablement")
+
+	f.StatusFields.Insert(".update_time")
+	f.StatusFields.Insert(".etag")
+
+	f.UnimplementedFields.Insert(".name") // special field
+
+	return f
+}
diff --git a/pkg/controller/direct/cloudquota/quotapreference_fuzzer.go b/pkg/controller/direct/cloudquota/quotapreference_fuzzer.go
index 5246ff6f708..e6a12239a32 100644
--- a/pkg/controller/direct/cloudquota/quotapreference_fuzzer.go
+++ b/pkg/controller/direct/cloudquota/quotapreference_fuzzer.go
@@ -20,7 +20,6 @@ package cloudquota
 
 import (
 	pb "cloud.google.com/go/cloudquotas/apiv1beta/cloudquotaspb"
-	//pb "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/generated/mockgcp/api/cloudquotas/v1beta"
 	"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/fuzztesting"
 )
 
diff --git a/pkg/gvks/supportedgvks/gvks_generated.go b/pkg/gvks/supportedgvks/gvks_generated.go
index 1927a844e3a..fd7fc962414 100644
--- a/pkg/gvks/supportedgvks/gvks_generated.go
+++ b/pkg/gvks/supportedgvks/gvks_generated.go
@@ -395,6 +395,16 @@ var SupportedGVKs = map[schema.GroupVersionKind]GVKMetadata{
 			"cnrm.cloud.google.com/tf2crd":          "true",
 		},
 	},
+	{
+		Group:   "cloudquota.cnrm.cloud.google.com",
+		Version: "v1alpha1",
+		Kind:    "APIQuotaAdjusterSettings",
+	}: {
+		Labels: map[string]string{
+			"cnrm.cloud.google.com/managed-by-kcc": "true",
+			"cnrm.cloud.google.com/system":         "true",
+		},
+	},
 	{
 		Group:   "cloudquota.cnrm.cloud.google.com",
 		Version: "v1alpha1",


Reviews:
user: login: yuwenma
body: /approve
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-24T14:15:42Z
user: login: barney-s
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-25T03:39:13Z

Review comments:
diff_hunk: @@ -1 +1,2 @@
+[shortname_plural] crd=apiquotaadjustersettings.cloudquota.cnrm.cloud.google.com version=v1alpha1: plural shortName "gcpapiquotaadjustersettingss" appears to have incorrect pluralization of "gcpapiquotaadjustersettings"
path: tests/apichecks/testdata/exceptions/shortname_pluralization.txt
user: login: yuwenma
body: Please fix this.
created_at: 2025-03-24T14:15:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1 +1,2 @@
+[shortname_plural] crd=apiquotaadjustersettings.cloudquota.cnrm.cloud.google.com version=v1alpha1: plural shortName "gcpapiquotaadjustersettingss" appears to have incorrect pluralization of "gcpapiquotaadjustersettings"
path: tests/apichecks/testdata/exceptions/shortname_pluralization.txt
user: login: barney-s
body: done.
created_at: 2025-03-25T03:39:12Z
author_association: COLLABORATOR

PR comments:
user: login: google-oss-prow[bot]
created_at: 2025-03-24T14:16:02Z
body: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/GoogleCloudPlatform/k8s-config-connector/pull/4054#pullrequestreview-2710550100" title="Approved">yuwenma</a>*

The full list of commands accepted by this bot can be found [here](https://oss.gprow.dev/command-help?repo=GoogleCloudPlatform%2Fk8s-config-connector).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/GoogleCloudPlatform/k8s-config-connector/blob/master/OWNERS)~~ [yuwenma]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
author_association: CONTRIBUTOR
user: login: yuwenma
created_at: 2025-03-26T16:18:27Z
body: /lgtm
author_association: CONTRIBUTOR