Skip to content

Commit

Permalink
init for autokeyconfig to beta
Browse files Browse the repository at this point in the history
  • Loading branch information
nb-goog committed Nov 13, 2024
1 parent 863ba97 commit 178847c
Show file tree
Hide file tree
Showing 20 changed files with 641 additions and 270 deletions.
8 changes: 8 additions & 0 deletions apis/kms/v1alpha1/keyhandle_reference.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,11 @@ func AsKMSKeyHandleExternal_FromSpec(spec *KMSKeyHandleSpec) (parent *KMSKeyHand
}
return parent, valueOf(spec.ResourceID), nil
}

func valueOf[T any](t *T) T {
var zeroVal T
if t == nil {
return zeroVal
}
return *t
}
27 changes: 0 additions & 27 deletions apis/kms/v1alpha1/types.generated.go

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

204 changes: 0 additions & 204 deletions apis/kms/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 @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package v1alpha1
package v1beta1

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package v1alpha1
package v1beta1

import (
"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/apis/k8s/v1alpha1"
Expand All @@ -22,7 +22,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

var KMSAutokeyConfigGVK = GroupVersion.WithKind("KMSAutokeyConfig")
var KMSAutokeyConfigGVK = SchemeGroupVersion.WithKind("KMSAutokeyConfig")

// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

Expand Down Expand Up @@ -68,14 +68,15 @@ type KMSAutokeyConfigObservedState struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:categories=gcp,shortName=gcpkmsautokeyconfig;gcpkmsautokeyconfigs
// +kubebuilder:subresource:status
// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true"
// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true";"cnrm.cloud.google.com/stability-level=beta"
// +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'"

// KMSAutokeyConfig is the Schema for the KMSAutokeyConfig API
// +k8s:openapi-gen=true
// +kubebuilder:storageversion
type KMSAutokeyConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
7 changes: 6 additions & 1 deletion apis/kms/v1beta1/types.generated.go

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

Loading

0 comments on commit 178847c

Please sign in to comment.