1
- // Copyright 2025 Google LLC.
2
-
1
+ // Copyright 2025 Google LLC
2
+ //
3
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
4
// you may not use this file except in compliance with the License.
5
5
// You may obtain a copy of the License at
6
-
6
+ //
7
7
// http://www.apache.org/licenses/LICENSE-2.0
8
-
8
+ //
9
9
// Unless required by applicable law or agreed to in writing, software
10
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,69 +23,69 @@ import (
23
23
24
24
var ApigeeEnvgroupAttachmentGVK = GroupVersion .WithKind ("ApigeeEnvgroupAttachment" )
25
25
26
- // ApigeeEnvgroupAttachmentSpec defines the desired state of EnvgroupAttachment
26
+ // ApigeeEnvgroupAttachmentSpec defines the desired state of ApigeeEnvgroupAttachment
27
+ // +kcc:proto=mockgcp.cloud.apigee.v1.GoogleCloudApigeeV1EnvironmentGroupAttachment
27
28
type ApigeeEnvgroupAttachmentSpec struct {
28
- // Reference to parent ApigeeEnvgroup.
29
+ // Reference to parent Environment Group
29
30
// +required
30
- EnvgroupRef * ApigeeEnvgroupRef `json:"envgroupRef"`
31
+ EnvgroupRef * ApigeeEnvgroupRef `json:"envgroupRef,omitempty "`
31
32
32
- // The Apigee environment to attach to .
33
- // +required
34
- EnvironmentRef * apigeev1beta1.ApigeeEnvironmentRef `json:"environmentRef"`
33
+ // Required. ID of the attached environment .
34
+ // +kcc:proto:field=mockgcp.cloud.apigee.v1.GoogleCloudApigeeV1EnvironmentGroupAttachment.environment
35
+ EnvironmentRef * apigeev1beta1.ApigeeEnvironmentRef `json:"environmentRef,omitempty "`
35
36
36
- // The EnvgroupAttachment name. If not given, the metadata.name will be used.
37
+ // The ApigeeEnvgroupAttachment name. If not given, the metadata.name will be used.
37
38
ResourceID * string `json:"resourceID,omitempty"`
38
39
}
39
40
40
- // ApigeeEnvgroupAttachmentStatus defines the observed state of EnvgroupAttachment
41
+ // ApigeeEnvgroupAttachmentStatus defines the config connector machine state of ApigeeEnvgroupAttachment
41
42
type ApigeeEnvgroupAttachmentStatus struct {
42
- // Conditions represent the latest available observations of the
43
- // EnvgroupAttachment 's current state.
43
+ /* Conditions represent the latest available observations of the
44
+ object 's current state. */
44
45
Conditions []v1alpha1.Condition `json:"conditions,omitempty"`
45
46
46
- // ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller.
47
- // If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource.
48
- ObservedGeneration int64 `json:"observedGeneration,omitempty"`
47
+ // 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.
48
+ ObservedGeneration * int64 `json:"observedGeneration,omitempty"`
49
49
50
- // A unique specifier for the EnvgroupAttachment resource.
51
- // +optional
50
+ // A unique specifier for the ApigeeEnvgroupAttachment resource in GCP.
52
51
ExternalRef * string `json:"externalRef,omitempty"`
53
52
54
53
// ObservedState is the state of the resource as most recently observed in GCP.
55
- ObservedState * EnvgroupAttachmentObservedState `json:"observedState,omitempty"`
54
+ ObservedState * ApigeeEnvgroupAttachmentObservedState `json:"observedState,omitempty"`
56
55
}
57
56
58
- // EnvgroupAttachmentObservedState defines the desired state of ApigeeEnvgroupAttachment
59
- type EnvgroupAttachmentObservedState struct {
60
- // Output only. The time at which the environment group attachment
61
- // was created as milliseconds since epoch.
57
+ // ApigeeEnvgroupAttachmentObservedState is the state of the ApigeeEnvgroupAttachment resource as most recently observed in GCP.
58
+ // +kcc:proto=mockgcp.cloud.apigee.v1.GoogleCloudApigeeV1EnvironmentGroupAttachment
59
+ type ApigeeEnvgroupAttachmentObservedState struct {
60
+ // Output only. The time at which the environment group attachment was created as milliseconds since epoch.
61
+ // +kcc:proto:field=mockgcp.cloud.apigee.v1.GoogleCloudApigeeV1EnvironmentGroupAttachment.created_at
62
62
CreatedAt * string `json:"createdAt,omitempty"`
63
63
}
64
64
65
65
// +genclient
66
66
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
67
-
68
- // ApigeeEnvgroupAttachment is the Schema for the EnvgroupAttachments API
69
- // +genclient
70
- // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
67
+ // TODO(user): make sure the pluralizaiton below is correct
71
68
// +kubebuilder:resource:categories=gcp,shortName=gcpapigeeenvgroupattachment;gcpapigeeenvgroupattachments
72
69
// +kubebuilder:subresource:status
73
- // +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true";"cnrm.cloud.google.com/stability-level=alpha"
70
+ // +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true"
74
71
// +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date"
75
72
// +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded"
76
73
// +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'"
77
74
// +kubebuilder:printcolumn:name="Status Age",JSONPath=".status.conditions[?(@.type=='Ready')].lastTransitionTime",type="date",description="The last transition time for the value in 'Status'"
75
+
76
+ // ApigeeEnvgroupAttachment is the Schema for the ApigeeEnvgroupAttachment API
77
+ // +k8s:openapi-gen=true
78
78
type ApigeeEnvgroupAttachment struct {
79
79
metav1.TypeMeta `json:",inline"`
80
80
metav1.ObjectMeta `json:"metadata,omitempty"`
81
81
82
+ // +required
82
83
Spec ApigeeEnvgroupAttachmentSpec `json:"spec,omitempty"`
83
84
Status ApigeeEnvgroupAttachmentStatus `json:"status,omitempty"`
84
85
}
85
86
86
87
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
87
-
88
- // ApigeeEnvgroupAttachmentList contains a list of EnvgroupAttachment
88
+ // ApigeeEnvgroupAttachmentList contains a list of ApigeeEnvgroupAttachment
89
89
type ApigeeEnvgroupAttachmentList struct {
90
90
metav1.TypeMeta `json:",inline"`
91
91
metav1.ListMeta `json:"metadata,omitempty"`
0 commit comments