Add omitempty on PartitionSpec fields to make the optional

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
Dimitris Karakasilis
2022-11-10 09:57:28 +02:00
parent aa736211af
commit 3b9477b6ea
2 changed files with 4 additions and 9 deletions

View File

@@ -34,10 +34,10 @@ type SealedVolumeSpec struct {
// any of the fields: Label, DeviceName, UUID. The Secret defines the secret // any of the fields: Label, DeviceName, UUID. The Secret defines the secret
// which decrypts the partition. // which decrypts the partition.
type PartitionSpec struct { type PartitionSpec struct {
Label string `json:"label"` Label string `json:"label,omitempty"`
DeviceName string `json:"deviceName"` DeviceName string `json:"deviceName,omitempty"`
UUID string `json:"uuid"` UUID string `json:"uuid,omitempty"`
Secret *SecretSpec `json:"secret"` Secret *SecretSpec `json:"secret,omitempty"`
} }
type SecretSpec struct { type SecretSpec struct {

View File

@@ -56,11 +56,6 @@ spec:
type: object type: object
uuid: uuid:
type: string type: string
required:
- deviceName
- label
- secret
- uuid
type: object type: object
type: array type: array
quarantined: quarantined: