Files
oc-monitord/models/volume.go
T

43 lines
1.3 KiB
Go
Raw Normal View History

2024-08-19 11:43:40 +02:00
package models
type VolumeClaimTemplate struct {
Metadata struct {
2026-03-25 11:13:12 +01:00
Name string `yaml:"name"`
Annotations map[string]string `yaml:"annotations,omitempty"`
2024-08-19 11:43:40 +02:00
} `yaml:"metadata"`
Spec VolumeSpec `yaml:"spec"`
}
type VolumeSpec struct {
AccessModes []string `yaml:"accessModes,flow"`
Resources struct {
Requests struct {
Storage string `yaml:"storage"`
} `yaml:"requests"`
} `yaml:"resources"`
}
2026-03-25 11:13:12 +01:00
2026-05-27 16:09:45 +02:00
// PVCRef references a pre-provisioned PersistentVolumeClaim by name.
type PVCRef struct {
ClaimName string `yaml:"claimName"`
}
// SecretRef references a K8s Secret to mount as a volume.
type SecretRef struct {
SecretName string `yaml:"secretName"`
}
// EmptyDirRef declares an emptyDir volume. Set Medium to "Memory" for /dev/shm-style RAM backing.
type EmptyDirRef struct {
Medium string `yaml:"medium,omitempty"`
}
// ExistingVolume represents any volume mounted into an Argo workflow spec.
// Exactly one of PersistentVolumeClaim, Secret, or EmptyDir should be non-nil.
2026-03-25 11:13:12 +01:00
type ExistingVolume struct {
2026-05-27 16:09:45 +02:00
Name string `yaml:"name"`
PersistentVolumeClaim *PVCRef `yaml:"persistentVolumeClaim,omitempty"`
Secret *SecretRef `yaml:"secret,omitempty"`
EmptyDir *EmptyDirRef `yaml:"emptyDir,omitempty"`
2026-03-25 11:13:12 +01:00
}