hugepages empty on default and updated date in codegen files (#2512)
* hugepages empty on default using string pointer and updated date of codegen files
This commit is contained in:
parent
30ff382475
commit
39f426d56f
|
|
@ -153,10 +153,10 @@ type PostgresqlParam struct {
|
|||
|
||||
// ResourceDescription describes CPU and memory resources defined for a cluster.
|
||||
type ResourceDescription struct {
|
||||
CPU string `json:"cpu"`
|
||||
Memory string `json:"memory"`
|
||||
HugePages2Mi string `json:"hugepages-2Mi"`
|
||||
HugePages1Gi string `json:"hugepages-1Gi"`
|
||||
CPU string `json:"cpu"`
|
||||
Memory string `json:"memory"`
|
||||
HugePages2Mi *string `json:"hugepages-2Mi"`
|
||||
HugePages1Gi *string `json:"hugepages-1Gi"`
|
||||
}
|
||||
|
||||
// Resources describes requests and limits for the cluster resouces.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
@ -109,7 +109,7 @@ func (in *ConnectionPooler) DeepCopyInto(out *ConnectionPooler) {
|
|||
if in.Resources != nil {
|
||||
in, out := &in.Resources, &out.Resources
|
||||
*out = new(Resources)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -272,6 +272,11 @@ func (in *KubernetesMetaConfiguration) DeepCopyInto(out *KubernetesMetaConfigura
|
|||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.EnableFinalizers != nil {
|
||||
in, out := &in.EnableFinalizers, &out.EnableFinalizers
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -631,7 +636,7 @@ func (in *PostgresSpec) DeepCopyInto(out *PostgresSpec) {
|
|||
if in.Resources != nil {
|
||||
in, out := &in.Resources, &out.Resources
|
||||
*out = new(Resources)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.EnableConnectionPooler != nil {
|
||||
in, out := &in.EnableConnectionPooler, &out.EnableConnectionPooler
|
||||
|
|
@ -1160,6 +1165,16 @@ func (in *PreparedSchema) DeepCopy() *PreparedSchema {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ResourceDescription) DeepCopyInto(out *ResourceDescription) {
|
||||
*out = *in
|
||||
if in.HugePages2Mi != nil {
|
||||
in, out := &in.HugePages2Mi, &out.HugePages2Mi
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.HugePages1Gi != nil {
|
||||
in, out := &in.HugePages1Gi, &out.HugePages1Gi
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -1176,8 +1191,8 @@ func (in *ResourceDescription) DeepCopy() *ResourceDescription {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Resources) DeepCopyInto(out *Resources) {
|
||||
*out = *in
|
||||
out.ResourceRequests = in.ResourceRequests
|
||||
out.ResourceLimits = in.ResourceLimits
|
||||
in.ResourceRequests.DeepCopyInto(&out.ResourceRequests)
|
||||
in.ResourceLimits.DeepCopyInto(&out.ResourceLimits)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -1213,7 +1228,7 @@ func (in *Sidecar) DeepCopyInto(out *Sidecar) {
|
|||
if in.Resources != nil {
|
||||
in, out := &in.Resources, &out.Resources
|
||||
*out = new(Resources)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Ports != nil {
|
||||
in, out := &in.Ports, &out.Ports
|
||||
|
|
|
|||
|
|
@ -267,14 +267,14 @@ func fillResourceList(spec acidv1.ResourceDescription, defaults acidv1.ResourceD
|
|||
}
|
||||
}
|
||||
|
||||
if spec.HugePages2Mi != "" {
|
||||
requests[v1.ResourceHugePagesPrefix+"2Mi"], err = resource.ParseQuantity(spec.HugePages2Mi)
|
||||
if spec.HugePages2Mi != nil {
|
||||
requests[v1.ResourceHugePagesPrefix+"2Mi"], err = resource.ParseQuantity(*spec.HugePages2Mi)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not parse hugepages-2Mi quantity: %v", err)
|
||||
}
|
||||
}
|
||||
if spec.HugePages1Gi != "" {
|
||||
requests[v1.ResourceHugePagesPrefix+"1Gi"], err = resource.ParseQuantity(spec.HugePages1Gi)
|
||||
if spec.HugePages1Gi != nil {
|
||||
requests[v1.ResourceHugePagesPrefix+"1Gi"], err = resource.ParseQuantity(*spec.HugePages1Gi)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not parse hugepages-1Gi quantity: %v", err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3127,12 +3127,12 @@ func TestGenerateResourceRequirements(t *testing.T) {
|
|||
Spec: acidv1.PostgresSpec{
|
||||
Resources: &acidv1.Resources{
|
||||
ResourceRequests: acidv1.ResourceDescription{
|
||||
HugePages2Mi: "128Mi",
|
||||
HugePages1Gi: "1Gi",
|
||||
HugePages2Mi: k8sutil.StringToPointer("128Mi"),
|
||||
HugePages1Gi: k8sutil.StringToPointer("1Gi"),
|
||||
},
|
||||
ResourceLimits: acidv1.ResourceDescription{
|
||||
HugePages2Mi: "256Mi",
|
||||
HugePages1Gi: "2Gi",
|
||||
HugePages2Mi: k8sutil.StringToPointer("256Mi"),
|
||||
HugePages1Gi: k8sutil.StringToPointer("2Gi"),
|
||||
},
|
||||
},
|
||||
TeamID: "acid",
|
||||
|
|
@ -3145,14 +3145,14 @@ func TestGenerateResourceRequirements(t *testing.T) {
|
|||
ResourceRequests: acidv1.ResourceDescription{
|
||||
CPU: "100m",
|
||||
Memory: "100Mi",
|
||||
HugePages2Mi: "128Mi",
|
||||
HugePages1Gi: "1Gi",
|
||||
HugePages2Mi: k8sutil.StringToPointer("128Mi"),
|
||||
HugePages1Gi: k8sutil.StringToPointer("1Gi"),
|
||||
},
|
||||
ResourceLimits: acidv1.ResourceDescription{
|
||||
CPU: "1",
|
||||
Memory: "500Mi",
|
||||
HugePages2Mi: "256Mi",
|
||||
HugePages1Gi: "2Gi",
|
||||
HugePages2Mi: k8sutil.StringToPointer("256Mi"),
|
||||
HugePages1Gi: k8sutil.StringToPointer("2Gi"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -3174,12 +3174,12 @@ func TestGenerateResourceRequirements(t *testing.T) {
|
|||
DockerImage: "test-image",
|
||||
Resources: &acidv1.Resources{
|
||||
ResourceRequests: acidv1.ResourceDescription{
|
||||
HugePages2Mi: "128Mi",
|
||||
HugePages1Gi: "1Gi",
|
||||
HugePages2Mi: k8sutil.StringToPointer("128Mi"),
|
||||
HugePages1Gi: k8sutil.StringToPointer("1Gi"),
|
||||
},
|
||||
ResourceLimits: acidv1.ResourceDescription{
|
||||
HugePages2Mi: "256Mi",
|
||||
HugePages1Gi: "2Gi",
|
||||
HugePages2Mi: k8sutil.StringToPointer("256Mi"),
|
||||
HugePages1Gi: k8sutil.StringToPointer("2Gi"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -3194,14 +3194,14 @@ func TestGenerateResourceRequirements(t *testing.T) {
|
|||
ResourceRequests: acidv1.ResourceDescription{
|
||||
CPU: "100m",
|
||||
Memory: "100Mi",
|
||||
HugePages2Mi: "128Mi",
|
||||
HugePages1Gi: "1Gi",
|
||||
HugePages2Mi: k8sutil.StringToPointer("128Mi"),
|
||||
HugePages1Gi: k8sutil.StringToPointer("1Gi"),
|
||||
},
|
||||
ResourceLimits: acidv1.ResourceDescription{
|
||||
CPU: "1",
|
||||
Memory: "500Mi",
|
||||
HugePages2Mi: "256Mi",
|
||||
HugePages1Gi: "2Gi",
|
||||
HugePages2Mi: k8sutil.StringToPointer("256Mi"),
|
||||
HugePages1Gi: k8sutil.StringToPointer("2Gi"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 Compose, Zalando SE
|
||||
Copyright 2024 Compose, Zalando SE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
Loading…
Reference in New Issue