From 7950609b31df2354f31199dba6706d62959b48b4 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 12 Oct 2017 07:04:43 -0700 Subject: [PATCH] Enforce use of fixed size int types in the API Changes 'int' to 'int32', enforced by import_known_versions_test Follow up to PR #53402 --- cmd/kube-proxy/app/server.go | 2 +- pkg/apis/componentconfig/types.go | 4 +-- pkg/apis/componentconfig/v1alpha1/types.go | 4 +-- pkg/apis/core/types.go | 2 +- pkg/apis/extensions/types.go | 4 +-- .../v1beta1/zz_generated.conversion.go | 32 ++++--------------- pkg/master/import_known_versions_test.go | 2 +- pkg/proxy/apis/kubeproxyconfig/types.go | 2 +- .../v1alpha1/zz_generated.conversion.go | 4 +-- pkg/security/podsecuritypolicy/provider.go | 4 +-- plugin/cmd/kube-scheduler/app/server.go | 6 ++-- .../algorithm/priorities/interpod_affinity.go | 4 +-- .../priorities/interpod_affinity_test.go | 2 +- plugin/pkg/scheduler/api/types.go | 2 +- plugin/pkg/scheduler/factory/factory.go | 6 ++-- plugin/pkg/scheduler/factory/factory_test.go | 2 +- plugin/pkg/scheduler/factory/plugins.go | 2 +- plugin/pkg/scheduler/scheduler.go | 2 +- plugin/pkg/scheduler/testutil.go | 2 +- staging/src/k8s.io/api/core/v1/types.go | 2 +- 20 files changed, 35 insertions(+), 55 deletions(-) diff --git a/cmd/kube-proxy/app/server.go b/cmd/kube-proxy/app/server.go index 8db7af9d57..9c5b1ac9e7 100644 --- a/cmd/kube-proxy/app/server.go +++ b/cmd/kube-proxy/app/server.go @@ -144,7 +144,7 @@ func AddFlags(options *Options, fs *pflag.FlagSet) { fs.StringVar(&options.config.ClusterCIDR, "cluster-cidr", options.config.ClusterCIDR, "The CIDR range of pods in the cluster. When configured, traffic sent to a Service cluster IP from outside this range will be masqueraded and traffic sent from pods to an external LoadBalancer IP will be directed to the respective cluster IP instead") fs.StringVar(&options.config.ClientConnection.ContentType, "kube-api-content-type", options.config.ClientConnection.ContentType, "Content type of requests sent to apiserver.") fs.Float32Var(&options.config.ClientConnection.QPS, "kube-api-qps", options.config.ClientConnection.QPS, "QPS to use while talking with kubernetes apiserver") - fs.IntVar(&options.config.ClientConnection.Burst, "kube-api-burst", options.config.ClientConnection.Burst, "Burst to use while talking with kubernetes apiserver") + fs.Int32Var(&options.config.ClientConnection.Burst, "kube-api-burst", options.config.ClientConnection.Burst, "Burst to use while talking with kubernetes apiserver") fs.DurationVar(&options.config.UDPIdleTimeout.Duration, "udp-timeout", options.config.UDPIdleTimeout.Duration, "How long an idle UDP connection will be kept open (e.g. '250ms', '2s'). Must be greater than 0. Only applicable for proxy-mode=userspace") if options.config.Conntrack.Max == nil { options.config.Conntrack.Max = utilpointer.Int32Ptr(0) diff --git a/pkg/apis/componentconfig/types.go b/pkg/apis/componentconfig/types.go index f4c218185b..4a57eec48c 100644 --- a/pkg/apis/componentconfig/types.go +++ b/pkg/apis/componentconfig/types.go @@ -33,7 +33,7 @@ type ClientConnectionConfiguration struct { // cps controls the number of queries per second allowed for this connection. QPS float32 // burst allows extra queries to accumulate when a client is exceeding its rate. - Burst int + Burst int32 } // SchedulerPolicyConfigMapKey defines the key of the element in the @@ -87,7 +87,7 @@ type KubeSchedulerConfiguration struct { // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule // corresponding to every RequiredDuringScheduling affinity rule. // HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 0-100. - HardPodAffinitySymmetricWeight int + HardPodAffinitySymmetricWeight int32 // LeaderElection defines the configuration of leader election client. LeaderElection KubeSchedulerLeaderElectionConfiguration diff --git a/pkg/apis/componentconfig/v1alpha1/types.go b/pkg/apis/componentconfig/v1alpha1/types.go index 4414d5b193..55e99fb429 100644 --- a/pkg/apis/componentconfig/v1alpha1/types.go +++ b/pkg/apis/componentconfig/v1alpha1/types.go @@ -33,7 +33,7 @@ type ClientConnectionConfiguration struct { // cps controls the number of queries per second allowed for this connection. QPS float32 `json:"qps"` // burst allows extra queries to accumulate when a client is exceeding its rate. - Burst int `json:"burst"` + Burst int32 `json:"burst"` } // SchedulerPolicySource configures a means to obtain a scheduler Policy. One @@ -83,7 +83,7 @@ type KubeSchedulerConfiguration struct { // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule // corresponding to every RequiredDuringScheduling affinity rule. // HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 0-100. - HardPodAffinitySymmetricWeight int `json:"hardPodAffinitySymmetricWeight"` + HardPodAffinitySymmetricWeight int32 `json:"hardPodAffinitySymmetricWeight"` // LeaderElection defines the configuration of leader election client. LeaderElection KubeSchedulerLeaderElectionConfiguration `json:"leaderElection"` diff --git a/pkg/apis/core/types.go b/pkg/apis/core/types.go index a6165ae908..f861925cc7 100644 --- a/pkg/apis/core/types.go +++ b/pkg/apis/core/types.go @@ -4354,5 +4354,5 @@ const ( // corresponding to every RequiredDuringScheduling affinity rule. // When the --hard-pod-affinity-weight scheduler flag is not specified, // DefaultHardPodAffinityWeight defines the weight of the implicit PreferredDuringScheduling affinity rule. - DefaultHardPodAffinitySymmetricWeight int = 1 + DefaultHardPodAffinitySymmetricWeight int32 = 1 ) diff --git a/pkg/apis/extensions/types.go b/pkg/apis/extensions/types.go index 302818aa40..01c6de7dcd 100644 --- a/pkg/apis/extensions/types.go +++ b/pkg/apis/extensions/types.go @@ -879,9 +879,9 @@ type AllowedHostPath struct { // for pods to use. It requires both the start and end to be defined. type HostPortRange struct { // Min is the start of the range, inclusive. - Min int + Min int32 // Max is the end of the range, inclusive. - Max int + Max int32 } // AllowAllCapabilities can be used as a value for the PodSecurityPolicy.AllowAllCapabilities diff --git a/pkg/apis/extensions/v1beta1/zz_generated.conversion.go b/pkg/apis/extensions/v1beta1/zz_generated.conversion.go index 0f948a696c..89fe74883c 100644 --- a/pkg/apis/extensions/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/extensions/v1beta1/zz_generated.conversion.go @@ -761,8 +761,8 @@ func Convert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in } func autoConvert_v1beta1_HostPortRange_To_extensions_HostPortRange(in *v1beta1.HostPortRange, out *extensions.HostPortRange, s conversion.Scope) error { - out.Min = int(in.Min) - out.Max = int(in.Max) + out.Min = in.Min + out.Max = in.Max return nil } @@ -772,8 +772,8 @@ func Convert_v1beta1_HostPortRange_To_extensions_HostPortRange(in *v1beta1.HostP } func autoConvert_extensions_HostPortRange_To_v1beta1_HostPortRange(in *extensions.HostPortRange, out *v1beta1.HostPortRange, s conversion.Scope) error { - out.Min = int32(in.Min) - out.Max = int32(in.Max) + out.Min = in.Min + out.Max = in.Max return nil } @@ -1051,17 +1051,7 @@ func autoConvert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySp out.AllowedCapabilities = *(*[]core.Capability)(unsafe.Pointer(&in.AllowedCapabilities)) out.Volumes = *(*[]extensions.FSType)(unsafe.Pointer(&in.Volumes)) out.HostNetwork = in.HostNetwork - if in.HostPorts != nil { - in, out := &in.HostPorts, &out.HostPorts - *out = make([]extensions.HostPortRange, len(*in)) - for i := range *in { - if err := Convert_v1beta1_HostPortRange_To_extensions_HostPortRange(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.HostPorts = nil - } + out.HostPorts = *(*[]extensions.HostPortRange)(unsafe.Pointer(&in.HostPorts)) out.HostPID = in.HostPID out.HostIPC = in.HostIPC if err := Convert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, s); err != nil { @@ -1097,17 +1087,7 @@ func autoConvert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySp out.AllowedCapabilities = *(*[]v1.Capability)(unsafe.Pointer(&in.AllowedCapabilities)) out.Volumes = *(*[]v1beta1.FSType)(unsafe.Pointer(&in.Volumes)) out.HostNetwork = in.HostNetwork - if in.HostPorts != nil { - in, out := &in.HostPorts, &out.HostPorts - *out = make([]v1beta1.HostPortRange, len(*in)) - for i := range *in { - if err := Convert_extensions_HostPortRange_To_v1beta1_HostPortRange(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.HostPorts = nil - } + out.HostPorts = *(*[]v1beta1.HostPortRange)(unsafe.Pointer(&in.HostPorts)) out.HostPID = in.HostPID out.HostIPC = in.HostIPC if err := Convert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, s); err != nil { diff --git a/pkg/master/import_known_versions_test.go b/pkg/master/import_known_versions_test.go index fd015504ae..e6a69e7d6f 100644 --- a/pkg/master/import_known_versions_test.go +++ b/pkg/master/import_known_versions_test.go @@ -99,7 +99,7 @@ func ensureNoTags(t *testing.T, gvk schema.GroupVersionKind, tp reflect.Type, pa case reflect.Map, reflect.Slice, reflect.Ptr: ensureNoTags(t, gvk, tp.Elem(), parents) - case reflect.String, reflect.Bool, reflect.Float32, reflect.Int, reflect.Int32, reflect.Int64, reflect.Uint8, reflect.Uintptr, reflect.Uint32, reflect.Uint64, reflect.Interface: + case reflect.String, reflect.Bool, reflect.Float32, reflect.Int32, reflect.Int64, reflect.Uint8, reflect.Uintptr, reflect.Uint32, reflect.Uint64, reflect.Interface: // no-op case reflect.Struct: diff --git a/pkg/proxy/apis/kubeproxyconfig/types.go b/pkg/proxy/apis/kubeproxyconfig/types.go index 6a33710d6c..d8bf19fe5f 100644 --- a/pkg/proxy/apis/kubeproxyconfig/types.go +++ b/pkg/proxy/apis/kubeproxyconfig/types.go @@ -37,7 +37,7 @@ type ClientConnectionConfiguration struct { // qps controls the number of queries per second allowed for this connection. QPS float32 // burst allows extra queries to accumulate when a client is exceeding its rate. - Burst int + Burst int32 } // KubeProxyIPTablesConfiguration contains iptables-related configuration diff --git a/pkg/proxy/apis/kubeproxyconfig/v1alpha1/zz_generated.conversion.go b/pkg/proxy/apis/kubeproxyconfig/v1alpha1/zz_generated.conversion.go index f6b42768af..1b3a91c5aa 100644 --- a/pkg/proxy/apis/kubeproxyconfig/v1alpha1/zz_generated.conversion.go +++ b/pkg/proxy/apis/kubeproxyconfig/v1alpha1/zz_generated.conversion.go @@ -54,7 +54,7 @@ func autoConvert_v1alpha1_ClientConnectionConfiguration_To_kubeproxyconfig_Clien out.AcceptContentTypes = in.AcceptContentTypes out.ContentType = in.ContentType out.QPS = in.QPS - out.Burst = in.Burst + out.Burst = int32(in.Burst) return nil } @@ -68,7 +68,7 @@ func autoConvert_kubeproxyconfig_ClientConnectionConfiguration_To_v1alpha1_Clien out.AcceptContentTypes = in.AcceptContentTypes out.ContentType = in.ContentType out.QPS = in.QPS - out.Burst = in.Burst + out.Burst = int(in.Burst) return nil } diff --git a/pkg/security/podsecuritypolicy/provider.go b/pkg/security/podsecuritypolicy/provider.go index b374b265f5..139a453a9e 100644 --- a/pkg/security/podsecuritypolicy/provider.go +++ b/pkg/security/podsecuritypolicy/provider.go @@ -307,7 +307,7 @@ func (s *simpleProvider) ValidateContainerSecurityContext(pod *api.Pod, containe func (s *simpleProvider) hasInvalidHostPort(container *api.Container, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} for _, cp := range container.Ports { - if cp.HostPort > 0 && !s.isValidHostPort(int(cp.HostPort)) { + if cp.HostPort > 0 && !s.isValidHostPort(cp.HostPort) { detail := fmt.Sprintf("Host port %d is not allowed to be used. Allowed ports: [%s]", cp.HostPort, hostPortRangesToString(s.psp.Spec.HostPorts)) allErrs = append(allErrs, field.Invalid(fldPath.Child("hostPort"), cp.HostPort, detail)) } @@ -316,7 +316,7 @@ func (s *simpleProvider) hasInvalidHostPort(container *api.Container, fldPath *f } // isValidHostPort returns true if the port falls in any range allowed by the PSP. -func (s *simpleProvider) isValidHostPort(port int) bool { +func (s *simpleProvider) isValidHostPort(port int32) bool { for _, hostPortRange := range s.psp.Spec.HostPorts { if port >= hostPortRange.Min && port <= hostPortRange.Max { return true diff --git a/plugin/cmd/kube-scheduler/app/server.go b/plugin/cmd/kube-scheduler/app/server.go index 2a4c206dfe..8eef7ef3e3 100644 --- a/plugin/cmd/kube-scheduler/app/server.go +++ b/plugin/cmd/kube-scheduler/app/server.go @@ -122,11 +122,11 @@ func AddFlags(options *Options, fs *pflag.FlagSet) { fs.StringVar(&options.config.ClientConnection.KubeConfigFile, "kubeconfig", options.config.ClientConnection.KubeConfigFile, "Path to kubeconfig file with authorization and master location information.") fs.StringVar(&options.config.ClientConnection.ContentType, "kube-api-content-type", options.config.ClientConnection.ContentType, "Content type of requests sent to apiserver.") fs.Float32Var(&options.config.ClientConnection.QPS, "kube-api-qps", options.config.ClientConnection.QPS, "QPS to use while talking with kubernetes apiserver") - fs.IntVar(&options.config.ClientConnection.Burst, "kube-api-burst", options.config.ClientConnection.Burst, "Burst to use while talking with kubernetes apiserver") + fs.Int32Var(&options.config.ClientConnection.Burst, "kube-api-burst", options.config.ClientConnection.Burst, "Burst to use while talking with kubernetes apiserver") fs.StringVar(&options.config.SchedulerName, "scheduler-name", options.config.SchedulerName, "Name of the scheduler, used to select which pods will be processed by this scheduler, based on pod's \"spec.SchedulerName\".") fs.StringVar(&options.config.LeaderElection.LockObjectNamespace, "lock-object-namespace", options.config.LeaderElection.LockObjectNamespace, "Define the namespace of the lock object.") fs.StringVar(&options.config.LeaderElection.LockObjectName, "lock-object-name", options.config.LeaderElection.LockObjectName, "Define the name of the lock object.") - fs.IntVar(&options.config.HardPodAffinitySymmetricWeight, "hard-pod-affinity-symmetric-weight", options.config.HardPodAffinitySymmetricWeight, + fs.Int32Var(&options.config.HardPodAffinitySymmetricWeight, "hard-pod-affinity-symmetric-weight", options.config.HardPodAffinitySymmetricWeight, "RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule corresponding "+ "to every RequiredDuringScheduling affinity rule. --hard-pod-affinity-symmetric-weight represents the weight of implicit PreferredDuringScheduling affinity rule.") fs.MarkDeprecated("hard-pod-affinity-symmetric-weight", "This option was moved to the policy configuration file") @@ -358,7 +358,7 @@ type SchedulerServer struct { InformerFactory informers.SharedInformerFactory PodInformer coreinformers.PodInformer AlgorithmSource componentconfig.SchedulerAlgorithmSource - HardPodAffinitySymmetricWeight int + HardPodAffinitySymmetricWeight int32 EventClient v1core.EventsGetter Recorder record.EventRecorder Broadcaster record.EventBroadcaster diff --git a/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity.go b/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity.go index 7abe732d45..ae168d9c76 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity.go +++ b/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity.go @@ -37,14 +37,14 @@ type InterPodAffinity struct { info predicates.NodeInfo nodeLister algorithm.NodeLister podLister algorithm.PodLister - hardPodAffinityWeight int + hardPodAffinityWeight int32 } func NewInterPodAffinityPriority( info predicates.NodeInfo, nodeLister algorithm.NodeLister, podLister algorithm.PodLister, - hardPodAffinityWeight int) algorithm.PriorityFunction { + hardPodAffinityWeight int32) algorithm.PriorityFunction { interPodAffinity := &InterPodAffinity{ info: info, nodeLister: nodeLister, diff --git a/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go b/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go index 7ccd963bcf..6dd3429927 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go @@ -561,7 +561,7 @@ func TestHardPodAffinitySymmetricWeight(t *testing.T) { pod *v1.Pod pods []*v1.Pod nodes []*v1.Node - hardPodAffinityWeight int + hardPodAffinityWeight int32 expectedList schedulerapi.HostPriorityList test string }{ diff --git a/plugin/pkg/scheduler/api/types.go b/plugin/pkg/scheduler/api/types.go index 8f14027563..080fc386db 100644 --- a/plugin/pkg/scheduler/api/types.go +++ b/plugin/pkg/scheduler/api/types.go @@ -46,7 +46,7 @@ type Policy struct { // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule // corresponding to every RequiredDuringScheduling affinity rule. // HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 1-100. - HardPodAffinitySymmetricWeight int + HardPodAffinitySymmetricWeight int32 } type PredicatePolicy struct { diff --git a/plugin/pkg/scheduler/factory/factory.go b/plugin/pkg/scheduler/factory/factory.go index bbb2326d61..3bd07c6480 100644 --- a/plugin/pkg/scheduler/factory/factory.go +++ b/plugin/pkg/scheduler/factory/factory.go @@ -113,7 +113,7 @@ type configFactory struct { // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule // corresponding to every RequiredDuringScheduling affinity rule. // HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 0-100. - hardPodAffinitySymmetricWeight int + hardPodAffinitySymmetricWeight int32 // Equivalence class cache equivalencePodCache *core.EquivalenceCache @@ -136,7 +136,7 @@ func NewConfigFactory( statefulSetInformer appsinformers.StatefulSetInformer, serviceInformer coreinformers.ServiceInformer, pdbInformer policyinformers.PodDisruptionBudgetInformer, - hardPodAffinitySymmetricWeight int, + hardPodAffinitySymmetricWeight int32, enableEquivalenceClassCache bool, ) scheduler.Configurator { stopEverything := make(chan struct{}) @@ -434,7 +434,7 @@ func (c *configFactory) GetNodeLister() corelisters.NodeLister { return c.nodeLister } -func (c *configFactory) GetHardPodAffinitySymmetricWeight() int { +func (c *configFactory) GetHardPodAffinitySymmetricWeight() int32 { return c.hardPodAffinitySymmetricWeight } diff --git a/plugin/pkg/scheduler/factory/factory_test.go b/plugin/pkg/scheduler/factory/factory_test.go index 66b87a686d..db73370ac0 100644 --- a/plugin/pkg/scheduler/factory/factory_test.go +++ b/plugin/pkg/scheduler/factory/factory_test.go @@ -408,7 +408,7 @@ func TestInvalidFactoryArgs(t *testing.T) { client := clientset.NewForConfigOrDie(&restclient.Config{Host: server.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &legacyscheme.Registry.GroupOrDie(v1.GroupName).GroupVersion}}) testCases := []struct { - hardPodAffinitySymmetricWeight int + hardPodAffinitySymmetricWeight int32 expectErr string }{ { diff --git a/plugin/pkg/scheduler/factory/plugins.go b/plugin/pkg/scheduler/factory/plugins.go index 9f5398c54b..7bd15adf63 100644 --- a/plugin/pkg/scheduler/factory/plugins.go +++ b/plugin/pkg/scheduler/factory/plugins.go @@ -43,7 +43,7 @@ type PluginFactoryArgs struct { NodeInfo predicates.NodeInfo PVInfo predicates.PersistentVolumeInfo PVCInfo predicates.PersistentVolumeClaimInfo - HardPodAffinitySymmetricWeight int + HardPodAffinitySymmetricWeight int32 } // MetadataProducerFactory produces MetadataProducer from the given args. diff --git a/plugin/pkg/scheduler/scheduler.go b/plugin/pkg/scheduler/scheduler.go index df18fba450..2d9a44dc16 100644 --- a/plugin/pkg/scheduler/scheduler.go +++ b/plugin/pkg/scheduler/scheduler.go @@ -77,7 +77,7 @@ type Configurator interface { GetPriorityMetadataProducer() (algorithm.MetadataProducer, error) GetPredicateMetadataProducer() (algorithm.PredicateMetadataProducer, error) GetPredicates(predicateKeys sets.String) (map[string]algorithm.FitPredicate, error) - GetHardPodAffinitySymmetricWeight() int + GetHardPodAffinitySymmetricWeight() int32 GetSchedulerName() string MakeDefaultErrorFunc(backoff *util.PodBackoff, podQueue core.SchedulingQueue) func(pod *v1.Pod, err error) diff --git a/plugin/pkg/scheduler/testutil.go b/plugin/pkg/scheduler/testutil.go index b5a01e99b3..7976353ed4 100644 --- a/plugin/pkg/scheduler/testutil.go +++ b/plugin/pkg/scheduler/testutil.go @@ -55,7 +55,7 @@ func (fc *FakeConfigurator) GetPredicates(predicateKeys sets.String) (map[string } // GetHardPodAffinitySymmetricWeight is not implemented yet. -func (fc *FakeConfigurator) GetHardPodAffinitySymmetricWeight() int { +func (fc *FakeConfigurator) GetHardPodAffinitySymmetricWeight() int32 { panic("not implemented") } diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index 6d9ee611f0..c5ad91e67d 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -4924,7 +4924,7 @@ const ( // corresponding to every RequiredDuringScheduling affinity rule. // When the --hard-pod-affinity-weight scheduler flag is not specified, // DefaultHardPodAffinityWeight defines the weight of the implicit PreferredDuringScheduling affinity rule. - DefaultHardPodAffinitySymmetricWeight int = 1 + DefaultHardPodAffinitySymmetricWeight int32 = 1 ) // Sysctl defines a kernel parameter to be set