Skip to content

Instantly share code, notes, and snippets.

@didil
Last active November 19, 2020 17:58
Show Gist options
  • Save didil/42dc795f3b166d3ebd50f922d935727c to your computer and use it in GitHub Desktop.
Save didil/42dc795f3b166d3ebd50f922d935727c to your computer and use it in GitHub Desktop.
Bucket CRD in GO
// BucketSpec defines the desired state of Bucket
type BucketSpec struct {
// Cloud platform
// +kubebuilder:validation:Enum=gcp
// +kubebuilder:validation:Required
Cloud BucketCloud `json:"cloud"`
// FullName is the cloud storage bucket full name
// +kubebuilder:validation:Required
FullName string `json:"fullName"`
// OnDeletePolicy defines the behavior when the Deployment/Bucket objects are deleted
// +kubebuilder:validation:Enum=destroy;ignore
// +kubebuilder:validation:Required
OnDeletePolicy BucketOnDeletePolicy `json:"onDeletePolicy"`
}
// BucketStatus defines the observed state of Bucket
type BucketStatus struct {
// CreatedAt is the cloud storage bucket creation time
CreatedAt string `json:"createdAt,omitempty"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment