mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-21 01:50:55 +00:00
Update generator to not use reflect
This commit is contained in:
8
pkg/apis/batch/v1/zz_generated.defaults.go
generated
8
pkg/apis/batch/v1/zz_generated.defaults.go
generated
@@ -21,8 +21,6 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
v1 "k8s.io/api/batch/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
corev1 "k8s.io/kubernetes/pkg/apis/core/v1"
|
||||
@@ -103,7 +101,7 @@ func SetObjectDefaults_Job(in *v1.Job) {
|
||||
corev1.SetDefaults_Container(a)
|
||||
for j := range a.Ports {
|
||||
b := &a.Ports[j]
|
||||
if reflect.ValueOf(b.Protocol).IsZero() {
|
||||
if b.Protocol == "" {
|
||||
b.Protocol = "TCP"
|
||||
}
|
||||
}
|
||||
@@ -153,7 +151,7 @@ func SetObjectDefaults_Job(in *v1.Job) {
|
||||
corev1.SetDefaults_Container(a)
|
||||
for j := range a.Ports {
|
||||
b := &a.Ports[j]
|
||||
if reflect.ValueOf(b.Protocol).IsZero() {
|
||||
if b.Protocol == "" {
|
||||
b.Protocol = "TCP"
|
||||
}
|
||||
}
|
||||
@@ -203,7 +201,7 @@ func SetObjectDefaults_Job(in *v1.Job) {
|
||||
corev1.SetDefaults_EphemeralContainer(a)
|
||||
for j := range a.EphemeralContainerCommon.Ports {
|
||||
b := &a.EphemeralContainerCommon.Ports[j]
|
||||
if reflect.ValueOf(b.Protocol).IsZero() {
|
||||
if b.Protocol == "" {
|
||||
b.Protocol = "TCP"
|
||||
}
|
||||
}
|
||||
|
14
pkg/apis/batch/v1beta1/zz_generated.defaults.go
generated
14
pkg/apis/batch/v1beta1/zz_generated.defaults.go
generated
@@ -21,8 +21,6 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
v1beta1 "k8s.io/api/batch/v1beta1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
v1 "k8s.io/kubernetes/pkg/apis/core/v1"
|
||||
@@ -104,7 +102,7 @@ func SetObjectDefaults_CronJob(in *v1beta1.CronJob) {
|
||||
v1.SetDefaults_Container(a)
|
||||
for j := range a.Ports {
|
||||
b := &a.Ports[j]
|
||||
if reflect.ValueOf(b.Protocol).IsZero() {
|
||||
if b.Protocol == "" {
|
||||
b.Protocol = "TCP"
|
||||
}
|
||||
}
|
||||
@@ -154,7 +152,7 @@ func SetObjectDefaults_CronJob(in *v1beta1.CronJob) {
|
||||
v1.SetDefaults_Container(a)
|
||||
for j := range a.Ports {
|
||||
b := &a.Ports[j]
|
||||
if reflect.ValueOf(b.Protocol).IsZero() {
|
||||
if b.Protocol == "" {
|
||||
b.Protocol = "TCP"
|
||||
}
|
||||
}
|
||||
@@ -204,7 +202,7 @@ func SetObjectDefaults_CronJob(in *v1beta1.CronJob) {
|
||||
v1.SetDefaults_EphemeralContainer(a)
|
||||
for j := range a.EphemeralContainerCommon.Ports {
|
||||
b := &a.EphemeralContainerCommon.Ports[j]
|
||||
if reflect.ValueOf(b.Protocol).IsZero() {
|
||||
if b.Protocol == "" {
|
||||
b.Protocol = "TCP"
|
||||
}
|
||||
}
|
||||
@@ -324,7 +322,7 @@ func SetObjectDefaults_JobTemplate(in *v1beta1.JobTemplate) {
|
||||
v1.SetDefaults_Container(a)
|
||||
for j := range a.Ports {
|
||||
b := &a.Ports[j]
|
||||
if reflect.ValueOf(b.Protocol).IsZero() {
|
||||
if b.Protocol == "" {
|
||||
b.Protocol = "TCP"
|
||||
}
|
||||
}
|
||||
@@ -374,7 +372,7 @@ func SetObjectDefaults_JobTemplate(in *v1beta1.JobTemplate) {
|
||||
v1.SetDefaults_Container(a)
|
||||
for j := range a.Ports {
|
||||
b := &a.Ports[j]
|
||||
if reflect.ValueOf(b.Protocol).IsZero() {
|
||||
if b.Protocol == "" {
|
||||
b.Protocol = "TCP"
|
||||
}
|
||||
}
|
||||
@@ -424,7 +422,7 @@ func SetObjectDefaults_JobTemplate(in *v1beta1.JobTemplate) {
|
||||
v1.SetDefaults_EphemeralContainer(a)
|
||||
for j := range a.EphemeralContainerCommon.Ports {
|
||||
b := &a.EphemeralContainerCommon.Ports[j]
|
||||
if reflect.ValueOf(b.Protocol).IsZero() {
|
||||
if b.Protocol == "" {
|
||||
b.Protocol = "TCP"
|
||||
}
|
||||
}
|
||||
|
14
pkg/apis/batch/v2alpha1/zz_generated.defaults.go
generated
14
pkg/apis/batch/v2alpha1/zz_generated.defaults.go
generated
@@ -21,8 +21,6 @@ limitations under the License.
|
||||
package v2alpha1
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
v2alpha1 "k8s.io/api/batch/v2alpha1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
v1 "k8s.io/kubernetes/pkg/apis/core/v1"
|
||||
@@ -104,7 +102,7 @@ func SetObjectDefaults_CronJob(in *v2alpha1.CronJob) {
|
||||
v1.SetDefaults_Container(a)
|
||||
for j := range a.Ports {
|
||||
b := &a.Ports[j]
|
||||
if reflect.ValueOf(b.Protocol).IsZero() {
|
||||
if b.Protocol == "" {
|
||||
b.Protocol = "TCP"
|
||||
}
|
||||
}
|
||||
@@ -154,7 +152,7 @@ func SetObjectDefaults_CronJob(in *v2alpha1.CronJob) {
|
||||
v1.SetDefaults_Container(a)
|
||||
for j := range a.Ports {
|
||||
b := &a.Ports[j]
|
||||
if reflect.ValueOf(b.Protocol).IsZero() {
|
||||
if b.Protocol == "" {
|
||||
b.Protocol = "TCP"
|
||||
}
|
||||
}
|
||||
@@ -204,7 +202,7 @@ func SetObjectDefaults_CronJob(in *v2alpha1.CronJob) {
|
||||
v1.SetDefaults_EphemeralContainer(a)
|
||||
for j := range a.EphemeralContainerCommon.Ports {
|
||||
b := &a.EphemeralContainerCommon.Ports[j]
|
||||
if reflect.ValueOf(b.Protocol).IsZero() {
|
||||
if b.Protocol == "" {
|
||||
b.Protocol = "TCP"
|
||||
}
|
||||
}
|
||||
@@ -324,7 +322,7 @@ func SetObjectDefaults_JobTemplate(in *v2alpha1.JobTemplate) {
|
||||
v1.SetDefaults_Container(a)
|
||||
for j := range a.Ports {
|
||||
b := &a.Ports[j]
|
||||
if reflect.ValueOf(b.Protocol).IsZero() {
|
||||
if b.Protocol == "" {
|
||||
b.Protocol = "TCP"
|
||||
}
|
||||
}
|
||||
@@ -374,7 +372,7 @@ func SetObjectDefaults_JobTemplate(in *v2alpha1.JobTemplate) {
|
||||
v1.SetDefaults_Container(a)
|
||||
for j := range a.Ports {
|
||||
b := &a.Ports[j]
|
||||
if reflect.ValueOf(b.Protocol).IsZero() {
|
||||
if b.Protocol == "" {
|
||||
b.Protocol = "TCP"
|
||||
}
|
||||
}
|
||||
@@ -424,7 +422,7 @@ func SetObjectDefaults_JobTemplate(in *v2alpha1.JobTemplate) {
|
||||
v1.SetDefaults_EphemeralContainer(a)
|
||||
for j := range a.EphemeralContainerCommon.Ports {
|
||||
b := &a.EphemeralContainerCommon.Ports[j]
|
||||
if reflect.ValueOf(b.Protocol).IsZero() {
|
||||
if b.Protocol == "" {
|
||||
b.Protocol = "TCP"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user