-
Notifications
You must be signed in to change notification settings - Fork 6
/
zz_generated.defaults.go
35 lines (29 loc) · 1.24 KB
/
zz_generated.defaults.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
// Copyright 2021 Weaveworks or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MPL-2.0
// Code generated by defaulter-gen. DO NOT EDIT.
package v1alpha1
import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
// RegisterDefaults adds defaulters functions to the given scheme.
// Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error {
scheme.AddTypeDefaultingFunc(&MicrovmMachine{}, func(obj interface{}) { SetObjectDefaults_MicrovmMachine(obj.(*MicrovmMachine)) })
scheme.AddTypeDefaultingFunc(&MicrovmMachineTemplate{}, func(obj interface{}) { SetObjectDefaults_MicrovmMachineTemplate(obj.(*MicrovmMachineTemplate)) })
return nil
}
func SetObjectDefaults_MicrovmMachine(in *MicrovmMachine) {
for i := range in.Spec.VMSpec.NetworkInterfaces {
a := &in.Spec.VMSpec.NetworkInterfaces[i]
SetDefaults_NetworkInterface(a)
}
}
func SetObjectDefaults_MicrovmMachineTemplate(in *MicrovmMachineTemplate) {
for i := range in.Spec.Template.Spec.VMSpec.NetworkInterfaces {
a := &in.Spec.Template.Spec.VMSpec.NetworkInterfaces[i]
SetDefaults_NetworkInterface(a)
}
}