Skip to content

Commit 78e6254

Browse files
authored
Fix missing metadata fields in AdditionalVolumeClaimTemplates (#240)
1 parent ad2c80c commit 78e6254

5 files changed

Lines changed: 172 additions & 417 deletions

File tree

api/v1/qdrantcluster_types.go

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,12 +842,44 @@ type Storage struct {
842842
// AdditionalVolumeClaimTemplates specifies volumeClaimTemplates to create for each Qdrant Pod.
843843
// These are added in addition to the default storage and snapshot PVCs created by the operator.
844844
// +optional
845-
AdditionalVolumeClaimTemplates []corev1.PersistentVolumeClaim `json:"additionalVolumeClaimTemplates,omitempty"`
845+
AdditionalVolumeClaimTemplates []PersistentVolumeClaimTemplate `json:"additionalVolumeClaimTemplates,omitempty"`
846846
// AdditionalVolumeMounts specifies additional volumeMounts to add to the Qdrant container.
847847
// +optional
848848
AdditionalVolumeMounts []corev1.VolumeMount `json:"additionalVolumeMounts,omitempty"`
849849
}
850850

851+
type PersistentVolumeClaimTemplate struct {
852+
Metadata TemplateMetadata `json:"metadata,omitempty"`
853+
854+
// spec defines the desired characteristics of a volume requested by a pod author.
855+
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
856+
// +optional
857+
Spec corev1.PersistentVolumeClaimSpec `json:"spec,omitempty"`
858+
}
859+
860+
type TemplateMetadata struct {
861+
// Name must be unique within a namespace. Is required when creating resources, although
862+
// some resources may allow a client to request the generation of an appropriate name
863+
// automatically. Name is primarily intended for creation idempotence and configuration
864+
// definition.
865+
// Cannot be updated.
866+
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
867+
// +optional
868+
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
869+
// Map of string keys and values that can be used to organize and categorize
870+
// (scope and select) objects. May match selectors of replication controllers
871+
// and services.
872+
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
873+
// +optional
874+
Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`
875+
// Annotations is an unstructured key value map stored with a resource that may be
876+
// set by external tools to store and retrieve arbitrary metadata. They are not
877+
// queryable and should be preserved when modifying objects.
878+
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
879+
// +optional
880+
Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"`
881+
}
882+
851883
// Validate storage configurations
852884
func (s *Storage) Validate() error {
853885
if s == nil {

api/v1/zz_generated.deepcopy.go

Lines changed: 47 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)