mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Fix a few occurences of old language (e.g. visibility -> ServiceType)
This commit is contained in:
parent
7346cc8042
commit
9255770068
@ -1020,7 +1020,7 @@ const (
|
||||
ServiceTypeClusterIP ServiceType = "ClusterIP"
|
||||
|
||||
// ServiceTypeNodePort means a service will be exposed on one port of
|
||||
// every node, in addition to 'ClusterIP' visibility.
|
||||
// every node, in addition to 'ClusterIP' type.
|
||||
ServiceTypeNodePort ServiceType = "NodePort"
|
||||
|
||||
// ServiceTypeLoadBalancer means a service will be exposed via an
|
||||
@ -1106,7 +1106,7 @@ type ServicePort struct {
|
||||
TargetPort util.IntOrString `json:"targetPort"`
|
||||
|
||||
// The port on each node on which this service is exposed.
|
||||
// Default is to auto-allocate a port if the visibility of this Service requires one.
|
||||
// Default is to auto-allocate a port if the ServiceType of this Service requires one.
|
||||
NodePort int `json:"nodePort" description:"the port on each node on which this service is exposed"`
|
||||
}
|
||||
|
||||
|
@ -1002,7 +1002,7 @@ const (
|
||||
ServiceTypeClusterIP ServiceType = "ClusterIP"
|
||||
|
||||
// ServiceTypeNodePort means a service will be exposed on one port of
|
||||
// every node, in addition to 'ClusterIP' visibility.
|
||||
// every node, in addition to 'ClusterIP' type.
|
||||
ServiceTypeNodePort ServiceType = "NodePort"
|
||||
|
||||
// ServiceTypeLoadBalancer means a service will be exposed via an
|
||||
@ -1084,7 +1084,7 @@ type ServicePort struct {
|
||||
TargetPort util.IntOrString `json:"targetPort,omitempty" description:"the port to access on the pods targeted by the service; defaults to the service port"`
|
||||
|
||||
// The port on each node on which this service is exposed.
|
||||
// Default is to auto-allocate a port if the visibility of this Service requires one.
|
||||
// Default is to auto-allocate a port if the ServiceType of this Service requires one.
|
||||
NodePort int `json:"nodePort" description:"the port on each node on which this service is exposed"`
|
||||
}
|
||||
|
||||
|
@ -844,7 +844,7 @@ const (
|
||||
ServiceTypeClusterIP ServiceType = "ClusterIP"
|
||||
|
||||
// ServiceTypeNodePort means a service will be exposed on one port of
|
||||
// every node, in addition to 'ClusterIP' visibility.
|
||||
// every node, in addition to 'ClusterIP' type.
|
||||
ServiceTypeNodePort ServiceType = "NodePort"
|
||||
|
||||
// ServiceTypeLoadBalancer means a service will be exposed via an
|
||||
@ -964,7 +964,7 @@ type ServicePort struct {
|
||||
ContainerPort util.IntOrString `json:"containerPort" description:"the port to access on the containers belonging to pods targeted by the service; defaults to the service port"`
|
||||
|
||||
// The port on each node on which this service is exposed.
|
||||
// Default is to auto-allocate a port if the visibility of this Service requires one.
|
||||
// Default is to auto-allocate a port if the ServiceType of this Service requires one.
|
||||
NodePort int `json:"nodePort" description:"the port on each node on which this service is exposed"`
|
||||
}
|
||||
|
||||
|
@ -846,7 +846,7 @@ const (
|
||||
ServiceTypeClusterIP ServiceType = "ClusterIP"
|
||||
|
||||
// ServiceTypeNodePort means a service will be exposed on one port of
|
||||
// every node, in addition to 'ClusterIP' visibility.
|
||||
// every node, in addition to 'ClusterIP' type.
|
||||
ServiceTypeNodePort ServiceType = "NodePort"
|
||||
|
||||
// ServiceTypeLoadBalancer means a service will be exposed via an
|
||||
@ -968,7 +968,7 @@ type ServicePort struct {
|
||||
ContainerPort util.IntOrString `json:"containerPort" description:"the port to access on the containers belonging to pods targeted by the service; defaults to the service port"`
|
||||
|
||||
// The port on each node on which this service is exposed.
|
||||
// Default is to auto-allocate a port if the visibility of this Service requires one.
|
||||
// Default is to auto-allocate a port if the ServiceType of this Service requires one.
|
||||
NodePort int `json:"nodePort" description:"the port on each node on which this service is exposed"`
|
||||
}
|
||||
|
||||
|
@ -1006,7 +1006,7 @@ const (
|
||||
ServiceTypeClusterIP ServiceType = "ClusterIP"
|
||||
|
||||
// ServiceTypeNodePort means a service will be exposed on one port of
|
||||
// every node, in addition to 'ClusterIP' visibility.
|
||||
// every node, in addition to 'ClusterIP' type.
|
||||
ServiceTypeNodePort ServiceType = "NodePort"
|
||||
|
||||
// ServiceTypeLoadBalancer means a service will be exposed via an
|
||||
@ -1091,7 +1091,7 @@ type ServicePort struct {
|
||||
TargetPort util.IntOrString `json:"targetPort,omitempty" description:"the port to access on the pods targeted by the service; defaults to the service port"`
|
||||
|
||||
// The port on each node on which this service is exposed.
|
||||
// Default is to auto-allocate a port if the visibility of this Service requires one.
|
||||
// Default is to auto-allocate a port if the ServiceType of this Service requires one.
|
||||
NodePort int `json:"nodePort" description:"the port on each node on which this service is exposed"`
|
||||
}
|
||||
|
||||
|
@ -509,7 +509,7 @@ func describeService(service *api.Service, endpoints *api.Endpoints, events *api
|
||||
fmt.Fprintf(out, "IP:\t%s\n", service.Spec.PortalIP)
|
||||
if len(service.Status.LoadBalancer.Ingress) > 0 {
|
||||
list := buildIngressString(service.Status.LoadBalancer.Ingress)
|
||||
fmt.Fprintf(out, "Ingress:\t%s\n", list)
|
||||
fmt.Fprintf(out, "LoadBalancer Ingress:\t%s\n", list)
|
||||
}
|
||||
for i := range service.Spec.Ports {
|
||||
sp := &service.Spec.Ports[i]
|
||||
@ -519,6 +519,9 @@ func describeService(service *api.Service, endpoints *api.Endpoints, events *api
|
||||
name = "<unnamed>"
|
||||
}
|
||||
fmt.Fprintf(out, "Port:\t%s\t%d/%s\n", name, sp.Port, sp.Protocol)
|
||||
if sp.NodePort != 0 {
|
||||
fmt.Fprintf(out, "NodePort:\t%s\t%d/%s\n", name, sp.Port, sp.Protocol)
|
||||
}
|
||||
fmt.Fprintf(out, "Endpoints:\t%s\t%s\n", name, formatEndpoints(endpoints, util.NewStringSet(sp.Name)))
|
||||
}
|
||||
fmt.Fprintf(out, "Session Affinity:\t%s\n", service.Spec.SessionAffinity)
|
||||
|
@ -144,7 +144,7 @@ type Config struct {
|
||||
// The name of the cluster.
|
||||
ClusterName string
|
||||
|
||||
// The range of ports to be assigned to services with visibility=NodePort or greater
|
||||
// The range of ports to be assigned to services with type=NodePort or greater
|
||||
ServiceNodePorts util.PortRange
|
||||
}
|
||||
|
||||
@ -236,7 +236,7 @@ func setDefaults(c *Config) {
|
||||
if c.ServiceNodePorts.Size == 0 {
|
||||
// TODO: Currently no way to specify an empty range (do we need to allow this?)
|
||||
// We should probably allow this for clouds that don't require NodePort to do load-balancing (GCE)
|
||||
// but then that breaks the strict nestedness of visibility.
|
||||
// but then that breaks the strict nestedness of ServiceType.
|
||||
// Review post-v1
|
||||
defaultServiceNodePorts := util.PortRange{Base: 30000, Size: 2767}
|
||||
c.ServiceNodePorts = defaultServiceNodePorts
|
||||
|
Loading…
Reference in New Issue
Block a user