|
| 1 | +package v1alpha1 |
| 2 | + |
| 3 | +import ( |
| 4 | + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 5 | +) |
| 6 | + |
| 7 | +// +genclient |
| 8 | +// +kubebuilder:object:root=true |
| 9 | +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object |
| 10 | + |
| 11 | +// APIAuthentication is a configuration for authenticating against Qdrant clusters. |
| 12 | +type APIAuthentication struct { |
| 13 | + metav1.TypeMeta `json:",inline"` |
| 14 | + // Standard object's metadata. |
| 15 | + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
| 16 | + // +optional |
| 17 | + metav1.ObjectMeta `json:"metadata,omitempty"` |
| 18 | + |
| 19 | + Spec APIAuthenticationSpec `json:"spec"` |
| 20 | +} |
| 21 | + |
| 22 | +// APIAuthenticationSpec describes the configuration for authenticating against Qdrant clusters. |
| 23 | +type APIAuthenticationSpec struct { |
| 24 | + // +kubebuilder:validation:MinLength=128 |
| 25 | + // +kubebuilder:validation:MaxLength=128 |
| 26 | + // +optional |
| 27 | + // SHA512 hash of an API key. |
| 28 | + SHA512 *string `json:"sha512,omitempty"` |
| 29 | + |
| 30 | + // +listType=set |
| 31 | + // List of cluster IDs for which the API key is valid |
| 32 | + ClusterIDs []string `json:"clusterIDs"` |
| 33 | +} |
| 34 | + |
| 35 | +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object |
| 36 | + |
| 37 | +// APIAuthenticationList is the whole list of all APIAuthentication objects. |
| 38 | +type APIAuthenticationList struct { |
| 39 | + metav1.TypeMeta `json:",inline"` |
| 40 | + // Standard list metadata. |
| 41 | + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| 42 | + // +optional |
| 43 | + metav1.ListMeta `json:"metadata,omitempty"` |
| 44 | + |
| 45 | + // List of APIAuthentication objects |
| 46 | + Items []APIAuthentication `json:"items"` |
| 47 | +} |
0 commit comments