mirror of
https://github.com/kairos-io/kcrypt-challenger.git
synced 2025-09-18 16:34:30 +00:00
Change sealedvolume CRD to add more fields to the partition
We use those field to identify which partition is requested. On the client side, the label is not available when the partition is encrypted. We allow the client to request the passphrase for a partition using the partition name (e.g. /dev/sdb1) or the UUID (as returned by blkid). Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
@@ -25,6 +25,22 @@ import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PartitionSpec) DeepCopyInto(out *PartitionSpec) {
|
||||
*out = *in
|
||||
out.Secret = in.Secret
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PartitionSpec.
|
||||
func (in *PartitionSpec) DeepCopy() *PartitionSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PartitionSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SealedVolume) DeepCopyInto(out *SealedVolume) {
|
||||
*out = *in
|
||||
@@ -87,20 +103,10 @@ func (in *SealedVolumeList) DeepCopyObject() runtime.Object {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SealedVolumeSpec) DeepCopyInto(out *SealedVolumeSpec) {
|
||||
*out = *in
|
||||
if in.Passphrase != nil {
|
||||
in, out := &in.Passphrase, &out.Passphrase
|
||||
*out = make(map[string]*SecretSpec, len(*in))
|
||||
for key, val := range *in {
|
||||
var outVal *SecretSpec
|
||||
if val == nil {
|
||||
(*out)[key] = nil
|
||||
} else {
|
||||
in, out := &val, &outVal
|
||||
*out = new(SecretSpec)
|
||||
**out = **in
|
||||
}
|
||||
(*out)[key] = outVal
|
||||
}
|
||||
if in.Partitions != nil {
|
||||
in, out := &in.Partitions, &out.Partitions
|
||||
*out = make([]PartitionSpec, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user