mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Expose REST resource for endpoints and watch on services/endpoints
Will allow kube-proxies to listen on endpoints.
This commit is contained in:
@@ -26,6 +26,7 @@ import (
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/binding"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/controller"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/endpoint"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/etcd"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/minion"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/pod"
|
||||
@@ -54,6 +55,7 @@ type Master struct {
|
||||
podRegistry pod.Registry
|
||||
controllerRegistry controller.Registry
|
||||
serviceRegistry service.Registry
|
||||
endpointRegistry endpoint.Registry
|
||||
minionRegistry minion.Registry
|
||||
bindingRegistry binding.Registry
|
||||
storage map[string]apiserver.RESTStorage
|
||||
@@ -68,6 +70,7 @@ func New(c *Config) *Master {
|
||||
podRegistry: etcd.NewRegistry(etcdClient, minionRegistry),
|
||||
controllerRegistry: etcd.NewRegistry(etcdClient, minionRegistry),
|
||||
serviceRegistry: etcd.NewRegistry(etcdClient, minionRegistry),
|
||||
endpointRegistry: etcd.NewRegistry(etcdClient, minionRegistry),
|
||||
bindingRegistry: etcd.NewRegistry(etcdClient, minionRegistry),
|
||||
minionRegistry: minionRegistry,
|
||||
client: c.Client,
|
||||
@@ -118,6 +121,7 @@ func (m *Master) init(cloud cloudprovider.Interface, podInfoGetter client.PodInf
|
||||
}),
|
||||
"replicationControllers": controller.NewRegistryStorage(m.controllerRegistry, m.podRegistry),
|
||||
"services": service.NewRegistryStorage(m.serviceRegistry, cloud, m.minionRegistry),
|
||||
"endpoints": endpoint.NewStorage(m.endpointRegistry),
|
||||
"minions": minion.NewRegistryStorage(m.minionRegistry),
|
||||
|
||||
// TODO: should appear only in scheduler API group.
|
||||
|
||||
Reference in New Issue
Block a user