fix:modify the default resource reservation of gateway system, gateway.go typo

This commit is contained in:
hongzhouzi
2022-05-11 10:50:33 +08:00
parent 1a6bc3c890
commit dd836fc652
7 changed files with 63 additions and 21 deletions

View File

@@ -31,7 +31,7 @@ type GatewaySpec struct {
type ControllerSpec struct {
// +optional
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
Replicas *int32 `json:"replicas,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
// +optional
@@ -49,9 +49,11 @@ type ServiceSpec struct {
type DeploymentSpec struct {
// +optional
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
Replicas *int32 `json:"replicas,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
// +optional
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}
type Scope struct {

View File

@@ -40,6 +40,13 @@ func (in *ControllerSpec) DeepCopyInto(out *ControllerSpec) {
(*out)[key] = val
}
}
if in.Config != nil {
in, out := &in.Config, &out.Config
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
out.Scope = in.Scope
}
@@ -68,6 +75,7 @@ func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec) {
(*out)[key] = val
}
}
in.Resources.DeepCopyInto(&out.Resources)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentSpec.