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
No known key found for this signature in database
GPG Key ID: 286DCAFD2C97DDE3
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
// which decrypts the partition.
type PartitionSpec struct {
Label string `json:"label"`
DeviceName string `json:"deviceName"`
UUID string `json:"uuid"`
Secret *SecretSpec `json:"secret"`
Label string `json:"label,omitempty"`
DeviceName string `json:"deviceName,omitempty"`
UUID string `json:"uuid,omitempty"`
Secret *SecretSpec `json:"secret,omitempty"`
}
type SecretSpec struct {

View File

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