Promoting EndpointSlices to beta
This commit is contained in:
parent
c466fd9eaf
commit
a7e589a8c6
138
api/openapi-spec/swagger.json
generated
138
api/openapi-spec/swagger.json
generated
@ -12021,7 +12021,7 @@
|
|||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"io.k8s.api.discovery.v1alpha1.Endpoint": {
|
"io.k8s.api.discovery.v1beta1.Endpoint": {
|
||||||
"description": "Endpoint represents a single logical \"backend\" implementing a service.",
|
"description": "Endpoint represents a single logical \"backend\" implementing a service.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"addresses": {
|
"addresses": {
|
||||||
@ -12033,7 +12033,7 @@
|
|||||||
"x-kubernetes-list-type": "set"
|
"x-kubernetes-list-type": "set"
|
||||||
},
|
},
|
||||||
"conditions": {
|
"conditions": {
|
||||||
"$ref": "#/definitions/io.k8s.api.discovery.v1alpha1.EndpointConditions",
|
"$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointConditions",
|
||||||
"description": "conditions contains information about the current status of the endpoint."
|
"description": "conditions contains information about the current status of the endpoint."
|
||||||
},
|
},
|
||||||
"hostname": {
|
"hostname": {
|
||||||
@ -12057,7 +12057,7 @@
|
|||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"io.k8s.api.discovery.v1alpha1.EndpointConditions": {
|
"io.k8s.api.discovery.v1beta1.EndpointConditions": {
|
||||||
"description": "EndpointConditions represents the current condition of an endpoint.",
|
"description": "EndpointConditions represents the current condition of an endpoint.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"ready": {
|
"ready": {
|
||||||
@ -12067,7 +12067,7 @@
|
|||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"io.k8s.api.discovery.v1alpha1.EndpointPort": {
|
"io.k8s.api.discovery.v1beta1.EndpointPort": {
|
||||||
"description": "EndpointPort represents a Port used by an EndpointSlice",
|
"description": "EndpointPort represents a Port used by an EndpointSlice",
|
||||||
"properties": {
|
"properties": {
|
||||||
"appProtocol": {
|
"appProtocol": {
|
||||||
@ -12090,7 +12090,7 @@
|
|||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"io.k8s.api.discovery.v1alpha1.EndpointSlice": {
|
"io.k8s.api.discovery.v1beta1.EndpointSlice": {
|
||||||
"description": "EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.",
|
"description": "EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"addressType": {
|
"addressType": {
|
||||||
@ -12104,7 +12104,7 @@
|
|||||||
"endpoints": {
|
"endpoints": {
|
||||||
"description": "endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.",
|
"description": "endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/io.k8s.api.discovery.v1alpha1.Endpoint"
|
"$ref": "#/definitions/io.k8s.api.discovery.v1beta1.Endpoint"
|
||||||
},
|
},
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"x-kubernetes-list-type": "atomic"
|
"x-kubernetes-list-type": "atomic"
|
||||||
@ -12120,7 +12120,7 @@
|
|||||||
"ports": {
|
"ports": {
|
||||||
"description": "ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates \"all ports\". Each slice may include a maximum of 100 ports.",
|
"description": "ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates \"all ports\". Each slice may include a maximum of 100 ports.",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/io.k8s.api.discovery.v1alpha1.EndpointPort"
|
"$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointPort"
|
||||||
},
|
},
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"x-kubernetes-list-type": "atomic"
|
"x-kubernetes-list-type": "atomic"
|
||||||
@ -12135,11 +12135,11 @@
|
|||||||
{
|
{
|
||||||
"group": "discovery.k8s.io",
|
"group": "discovery.k8s.io",
|
||||||
"kind": "EndpointSlice",
|
"kind": "EndpointSlice",
|
||||||
"version": "v1alpha1"
|
"version": "v1beta1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"io.k8s.api.discovery.v1alpha1.EndpointSliceList": {
|
"io.k8s.api.discovery.v1beta1.EndpointSliceList": {
|
||||||
"description": "EndpointSliceList represents a list of endpoint slices",
|
"description": "EndpointSliceList represents a list of endpoint slices",
|
||||||
"properties": {
|
"properties": {
|
||||||
"apiVersion": {
|
"apiVersion": {
|
||||||
@ -12149,7 +12149,7 @@
|
|||||||
"items": {
|
"items": {
|
||||||
"description": "List of endpoint slices",
|
"description": "List of endpoint slices",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/io.k8s.api.discovery.v1alpha1.EndpointSlice"
|
"$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointSlice"
|
||||||
},
|
},
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"x-kubernetes-list-type": "set"
|
"x-kubernetes-list-type": "set"
|
||||||
@ -12171,7 +12171,7 @@
|
|||||||
{
|
{
|
||||||
"group": "discovery.k8s.io",
|
"group": "discovery.k8s.io",
|
||||||
"kind": "EndpointSliceList",
|
"kind": "EndpointSliceList",
|
||||||
"version": "v1alpha1"
|
"version": "v1beta1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -19611,6 +19611,11 @@
|
|||||||
"kind": "DeleteOptions",
|
"kind": "DeleteOptions",
|
||||||
"version": "v1alpha1"
|
"version": "v1alpha1"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"group": "discovery.k8s.io",
|
||||||
|
"kind": "DeleteOptions",
|
||||||
|
"version": "v1beta1"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"group": "events.k8s.io",
|
"group": "events.k8s.io",
|
||||||
"kind": "DeleteOptions",
|
"kind": "DeleteOptions",
|
||||||
@ -20252,6 +20257,11 @@
|
|||||||
"kind": "WatchEvent",
|
"kind": "WatchEvent",
|
||||||
"version": "v1alpha1"
|
"version": "v1alpha1"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"group": "discovery.k8s.io",
|
||||||
|
"kind": "WatchEvent",
|
||||||
|
"version": "v1beta1"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"group": "events.k8s.io",
|
"group": "events.k8s.io",
|
||||||
"kind": "WatchEvent",
|
"kind": "WatchEvent",
|
||||||
@ -77651,7 +77661,7 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/apis/discovery.k8s.io/v1alpha1/": {
|
"/apis/discovery.k8s.io/v1beta1/": {
|
||||||
"get": {
|
"get": {
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json",
|
"application/json",
|
||||||
@ -77659,7 +77669,7 @@
|
|||||||
"application/vnd.kubernetes.protobuf"
|
"application/vnd.kubernetes.protobuf"
|
||||||
],
|
],
|
||||||
"description": "get available resources",
|
"description": "get available resources",
|
||||||
"operationId": "getDiscoveryV1alpha1APIResources",
|
"operationId": "getDiscoveryV1beta1APIResources",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json",
|
"application/json",
|
||||||
"application/yaml",
|
"application/yaml",
|
||||||
@ -77680,17 +77690,17 @@
|
|||||||
"https"
|
"https"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"discovery_v1alpha1"
|
"discovery_v1beta1"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/apis/discovery.k8s.io/v1alpha1/endpointslices": {
|
"/apis/discovery.k8s.io/v1beta1/endpointslices": {
|
||||||
"get": {
|
"get": {
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"*/*"
|
"*/*"
|
||||||
],
|
],
|
||||||
"description": "list or watch objects of kind EndpointSlice",
|
"description": "list or watch objects of kind EndpointSlice",
|
||||||
"operationId": "listDiscoveryV1alpha1EndpointSliceForAllNamespaces",
|
"operationId": "listDiscoveryV1beta1EndpointSliceForAllNamespaces",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json",
|
"application/json",
|
||||||
"application/yaml",
|
"application/yaml",
|
||||||
@ -77702,7 +77712,7 @@
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/io.k8s.api.discovery.v1alpha1.EndpointSliceList"
|
"$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointSliceList"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"401": {
|
"401": {
|
||||||
@ -77713,13 +77723,13 @@
|
|||||||
"https"
|
"https"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"discovery_v1alpha1"
|
"discovery_v1beta1"
|
||||||
],
|
],
|
||||||
"x-kubernetes-action": "list",
|
"x-kubernetes-action": "list",
|
||||||
"x-kubernetes-group-version-kind": {
|
"x-kubernetes-group-version-kind": {
|
||||||
"group": "discovery.k8s.io",
|
"group": "discovery.k8s.io",
|
||||||
"kind": "EndpointSlice",
|
"kind": "EndpointSlice",
|
||||||
"version": "v1alpha1"
|
"version": "v1beta1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@ -77788,13 +77798,13 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"/apis/discovery.k8s.io/v1alpha1/namespaces/{namespace}/endpointslices": {
|
"/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices": {
|
||||||
"delete": {
|
"delete": {
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"*/*"
|
"*/*"
|
||||||
],
|
],
|
||||||
"description": "delete collection of EndpointSlice",
|
"description": "delete collection of EndpointSlice",
|
||||||
"operationId": "deleteDiscoveryV1alpha1CollectionNamespacedEndpointSlice",
|
"operationId": "deleteDiscoveryV1beta1CollectionNamespacedEndpointSlice",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.",
|
"description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.",
|
||||||
@ -77908,13 +77918,13 @@
|
|||||||
"https"
|
"https"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"discovery_v1alpha1"
|
"discovery_v1beta1"
|
||||||
],
|
],
|
||||||
"x-kubernetes-action": "deletecollection",
|
"x-kubernetes-action": "deletecollection",
|
||||||
"x-kubernetes-group-version-kind": {
|
"x-kubernetes-group-version-kind": {
|
||||||
"group": "discovery.k8s.io",
|
"group": "discovery.k8s.io",
|
||||||
"kind": "EndpointSlice",
|
"kind": "EndpointSlice",
|
||||||
"version": "v1alpha1"
|
"version": "v1beta1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"get": {
|
"get": {
|
||||||
@ -77922,7 +77932,7 @@
|
|||||||
"*/*"
|
"*/*"
|
||||||
],
|
],
|
||||||
"description": "list or watch objects of kind EndpointSlice",
|
"description": "list or watch objects of kind EndpointSlice",
|
||||||
"operationId": "listDiscoveryV1alpha1NamespacedEndpointSlice",
|
"operationId": "listDiscoveryV1beta1NamespacedEndpointSlice",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.",
|
"description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.",
|
||||||
@ -77992,7 +78002,7 @@
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/io.k8s.api.discovery.v1alpha1.EndpointSliceList"
|
"$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointSliceList"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"401": {
|
"401": {
|
||||||
@ -78003,13 +78013,13 @@
|
|||||||
"https"
|
"https"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"discovery_v1alpha1"
|
"discovery_v1beta1"
|
||||||
],
|
],
|
||||||
"x-kubernetes-action": "list",
|
"x-kubernetes-action": "list",
|
||||||
"x-kubernetes-group-version-kind": {
|
"x-kubernetes-group-version-kind": {
|
||||||
"group": "discovery.k8s.io",
|
"group": "discovery.k8s.io",
|
||||||
"kind": "EndpointSlice",
|
"kind": "EndpointSlice",
|
||||||
"version": "v1alpha1"
|
"version": "v1beta1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@ -78034,14 +78044,14 @@
|
|||||||
"*/*"
|
"*/*"
|
||||||
],
|
],
|
||||||
"description": "create an EndpointSlice",
|
"description": "create an EndpointSlice",
|
||||||
"operationId": "createDiscoveryV1alpha1NamespacedEndpointSlice",
|
"operationId": "createDiscoveryV1beta1NamespacedEndpointSlice",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"name": "body",
|
"name": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/io.k8s.api.discovery.v1alpha1.EndpointSlice"
|
"$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointSlice"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -78068,19 +78078,19 @@
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/io.k8s.api.discovery.v1alpha1.EndpointSlice"
|
"$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointSlice"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"201": {
|
"201": {
|
||||||
"description": "Created",
|
"description": "Created",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/io.k8s.api.discovery.v1alpha1.EndpointSlice"
|
"$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointSlice"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"202": {
|
"202": {
|
||||||
"description": "Accepted",
|
"description": "Accepted",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/io.k8s.api.discovery.v1alpha1.EndpointSlice"
|
"$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointSlice"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"401": {
|
"401": {
|
||||||
@ -78091,23 +78101,23 @@
|
|||||||
"https"
|
"https"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"discovery_v1alpha1"
|
"discovery_v1beta1"
|
||||||
],
|
],
|
||||||
"x-kubernetes-action": "post",
|
"x-kubernetes-action": "post",
|
||||||
"x-kubernetes-group-version-kind": {
|
"x-kubernetes-group-version-kind": {
|
||||||
"group": "discovery.k8s.io",
|
"group": "discovery.k8s.io",
|
||||||
"kind": "EndpointSlice",
|
"kind": "EndpointSlice",
|
||||||
"version": "v1alpha1"
|
"version": "v1beta1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/apis/discovery.k8s.io/v1alpha1/namespaces/{namespace}/endpointslices/{name}": {
|
"/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}": {
|
||||||
"delete": {
|
"delete": {
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"*/*"
|
"*/*"
|
||||||
],
|
],
|
||||||
"description": "delete an EndpointSlice",
|
"description": "delete an EndpointSlice",
|
||||||
"operationId": "deleteDiscoveryV1alpha1NamespacedEndpointSlice",
|
"operationId": "deleteDiscoveryV1beta1NamespacedEndpointSlice",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "body",
|
"in": "body",
|
||||||
@ -78171,13 +78181,13 @@
|
|||||||
"https"
|
"https"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"discovery_v1alpha1"
|
"discovery_v1beta1"
|
||||||
],
|
],
|
||||||
"x-kubernetes-action": "delete",
|
"x-kubernetes-action": "delete",
|
||||||
"x-kubernetes-group-version-kind": {
|
"x-kubernetes-group-version-kind": {
|
||||||
"group": "discovery.k8s.io",
|
"group": "discovery.k8s.io",
|
||||||
"kind": "EndpointSlice",
|
"kind": "EndpointSlice",
|
||||||
"version": "v1alpha1"
|
"version": "v1beta1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"get": {
|
"get": {
|
||||||
@ -78185,7 +78195,7 @@
|
|||||||
"*/*"
|
"*/*"
|
||||||
],
|
],
|
||||||
"description": "read the specified EndpointSlice",
|
"description": "read the specified EndpointSlice",
|
||||||
"operationId": "readDiscoveryV1alpha1NamespacedEndpointSlice",
|
"operationId": "readDiscoveryV1beta1NamespacedEndpointSlice",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18.",
|
"description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18.",
|
||||||
@ -78211,7 +78221,7 @@
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/io.k8s.api.discovery.v1alpha1.EndpointSlice"
|
"$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointSlice"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"401": {
|
"401": {
|
||||||
@ -78222,13 +78232,13 @@
|
|||||||
"https"
|
"https"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"discovery_v1alpha1"
|
"discovery_v1beta1"
|
||||||
],
|
],
|
||||||
"x-kubernetes-action": "get",
|
"x-kubernetes-action": "get",
|
||||||
"x-kubernetes-group-version-kind": {
|
"x-kubernetes-group-version-kind": {
|
||||||
"group": "discovery.k8s.io",
|
"group": "discovery.k8s.io",
|
||||||
"kind": "EndpointSlice",
|
"kind": "EndpointSlice",
|
||||||
"version": "v1alpha1"
|
"version": "v1beta1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@ -78264,7 +78274,7 @@
|
|||||||
"application/apply-patch+yaml"
|
"application/apply-patch+yaml"
|
||||||
],
|
],
|
||||||
"description": "partially update the specified EndpointSlice",
|
"description": "partially update the specified EndpointSlice",
|
||||||
"operationId": "patchDiscoveryV1alpha1NamespacedEndpointSlice",
|
"operationId": "patchDiscoveryV1beta1NamespacedEndpointSlice",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "body",
|
"in": "body",
|
||||||
@ -78305,7 +78315,7 @@
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/io.k8s.api.discovery.v1alpha1.EndpointSlice"
|
"$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointSlice"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"401": {
|
"401": {
|
||||||
@ -78316,13 +78326,13 @@
|
|||||||
"https"
|
"https"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"discovery_v1alpha1"
|
"discovery_v1beta1"
|
||||||
],
|
],
|
||||||
"x-kubernetes-action": "patch",
|
"x-kubernetes-action": "patch",
|
||||||
"x-kubernetes-group-version-kind": {
|
"x-kubernetes-group-version-kind": {
|
||||||
"group": "discovery.k8s.io",
|
"group": "discovery.k8s.io",
|
||||||
"kind": "EndpointSlice",
|
"kind": "EndpointSlice",
|
||||||
"version": "v1alpha1"
|
"version": "v1beta1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"put": {
|
"put": {
|
||||||
@ -78330,14 +78340,14 @@
|
|||||||
"*/*"
|
"*/*"
|
||||||
],
|
],
|
||||||
"description": "replace the specified EndpointSlice",
|
"description": "replace the specified EndpointSlice",
|
||||||
"operationId": "replaceDiscoveryV1alpha1NamespacedEndpointSlice",
|
"operationId": "replaceDiscoveryV1beta1NamespacedEndpointSlice",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"name": "body",
|
"name": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/io.k8s.api.discovery.v1alpha1.EndpointSlice"
|
"$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointSlice"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -78364,13 +78374,13 @@
|
|||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/io.k8s.api.discovery.v1alpha1.EndpointSlice"
|
"$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointSlice"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"201": {
|
"201": {
|
||||||
"description": "Created",
|
"description": "Created",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/io.k8s.api.discovery.v1alpha1.EndpointSlice"
|
"$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointSlice"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"401": {
|
"401": {
|
||||||
@ -78381,23 +78391,23 @@
|
|||||||
"https"
|
"https"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"discovery_v1alpha1"
|
"discovery_v1beta1"
|
||||||
],
|
],
|
||||||
"x-kubernetes-action": "put",
|
"x-kubernetes-action": "put",
|
||||||
"x-kubernetes-group-version-kind": {
|
"x-kubernetes-group-version-kind": {
|
||||||
"group": "discovery.k8s.io",
|
"group": "discovery.k8s.io",
|
||||||
"kind": "EndpointSlice",
|
"kind": "EndpointSlice",
|
||||||
"version": "v1alpha1"
|
"version": "v1beta1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/apis/discovery.k8s.io/v1alpha1/watch/endpointslices": {
|
"/apis/discovery.k8s.io/v1beta1/watch/endpointslices": {
|
||||||
"get": {
|
"get": {
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"*/*"
|
"*/*"
|
||||||
],
|
],
|
||||||
"description": "watch individual changes to a list of EndpointSlice. deprecated: use the 'watch' parameter with a list operation instead.",
|
"description": "watch individual changes to a list of EndpointSlice. deprecated: use the 'watch' parameter with a list operation instead.",
|
||||||
"operationId": "watchDiscoveryV1alpha1EndpointSliceListForAllNamespaces",
|
"operationId": "watchDiscoveryV1beta1EndpointSliceListForAllNamespaces",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json",
|
"application/json",
|
||||||
"application/yaml",
|
"application/yaml",
|
||||||
@ -78420,13 +78430,13 @@
|
|||||||
"https"
|
"https"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"discovery_v1alpha1"
|
"discovery_v1beta1"
|
||||||
],
|
],
|
||||||
"x-kubernetes-action": "watchlist",
|
"x-kubernetes-action": "watchlist",
|
||||||
"x-kubernetes-group-version-kind": {
|
"x-kubernetes-group-version-kind": {
|
||||||
"group": "discovery.k8s.io",
|
"group": "discovery.k8s.io",
|
||||||
"kind": "EndpointSlice",
|
"kind": "EndpointSlice",
|
||||||
"version": "v1alpha1"
|
"version": "v1beta1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@ -78495,13 +78505,13 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"/apis/discovery.k8s.io/v1alpha1/watch/namespaces/{namespace}/endpointslices": {
|
"/apis/discovery.k8s.io/v1beta1/watch/namespaces/{namespace}/endpointslices": {
|
||||||
"get": {
|
"get": {
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"*/*"
|
"*/*"
|
||||||
],
|
],
|
||||||
"description": "watch individual changes to a list of EndpointSlice. deprecated: use the 'watch' parameter with a list operation instead.",
|
"description": "watch individual changes to a list of EndpointSlice. deprecated: use the 'watch' parameter with a list operation instead.",
|
||||||
"operationId": "watchDiscoveryV1alpha1NamespacedEndpointSliceList",
|
"operationId": "watchDiscoveryV1beta1NamespacedEndpointSliceList",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json",
|
"application/json",
|
||||||
"application/yaml",
|
"application/yaml",
|
||||||
@ -78524,13 +78534,13 @@
|
|||||||
"https"
|
"https"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"discovery_v1alpha1"
|
"discovery_v1beta1"
|
||||||
],
|
],
|
||||||
"x-kubernetes-action": "watchlist",
|
"x-kubernetes-action": "watchlist",
|
||||||
"x-kubernetes-group-version-kind": {
|
"x-kubernetes-group-version-kind": {
|
||||||
"group": "discovery.k8s.io",
|
"group": "discovery.k8s.io",
|
||||||
"kind": "EndpointSlice",
|
"kind": "EndpointSlice",
|
||||||
"version": "v1alpha1"
|
"version": "v1beta1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"parameters": [
|
"parameters": [
|
||||||
@ -78607,13 +78617,13 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"/apis/discovery.k8s.io/v1alpha1/watch/namespaces/{namespace}/endpointslices/{name}": {
|
"/apis/discovery.k8s.io/v1beta1/watch/namespaces/{namespace}/endpointslices/{name}": {
|
||||||
"get": {
|
"get": {
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"*/*"
|
"*/*"
|
||||||
],
|
],
|
||||||
"description": "watch changes to an object of kind EndpointSlice. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.",
|
"description": "watch changes to an object of kind EndpointSlice. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.",
|
||||||
"operationId": "watchDiscoveryV1alpha1NamespacedEndpointSlice",
|
"operationId": "watchDiscoveryV1beta1NamespacedEndpointSlice",
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json",
|
"application/json",
|
||||||
"application/yaml",
|
"application/yaml",
|
||||||
@ -78636,13 +78646,13 @@
|
|||||||
"https"
|
"https"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"discovery_v1alpha1"
|
"discovery_v1beta1"
|
||||||
],
|
],
|
||||||
"x-kubernetes-action": "watch",
|
"x-kubernetes-action": "watch",
|
||||||
"x-kubernetes-group-version-kind": {
|
"x-kubernetes-group-version-kind": {
|
||||||
"group": "discovery.k8s.io",
|
"group": "discovery.k8s.io",
|
||||||
"kind": "EndpointSlice",
|
"kind": "EndpointSlice",
|
||||||
"version": "v1alpha1"
|
"version": "v1beta1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
@ -60,6 +60,7 @@ tags_values_pkgs = {"openapi-gen": {
|
|||||||
"staging/src/k8s.io/api/coordination/v1beta1",
|
"staging/src/k8s.io/api/coordination/v1beta1",
|
||||||
"staging/src/k8s.io/api/core/v1",
|
"staging/src/k8s.io/api/core/v1",
|
||||||
"staging/src/k8s.io/api/discovery/v1alpha1",
|
"staging/src/k8s.io/api/discovery/v1alpha1",
|
||||||
|
"staging/src/k8s.io/api/discovery/v1beta1",
|
||||||
"staging/src/k8s.io/api/events/v1beta1",
|
"staging/src/k8s.io/api/events/v1beta1",
|
||||||
"staging/src/k8s.io/api/extensions/v1beta1",
|
"staging/src/k8s.io/api/extensions/v1beta1",
|
||||||
"staging/src/k8s.io/api/flowcontrol/v1alpha1",
|
"staging/src/k8s.io/api/flowcontrol/v1alpha1",
|
||||||
@ -143,6 +144,7 @@ tags_pkgs_values = {"openapi-gen": {
|
|||||||
"true",
|
"true",
|
||||||
],
|
],
|
||||||
"staging/src/k8s.io/api/discovery/v1alpha1": ["true"],
|
"staging/src/k8s.io/api/discovery/v1alpha1": ["true"],
|
||||||
|
"staging/src/k8s.io/api/discovery/v1beta1": ["true"],
|
||||||
"staging/src/k8s.io/api/events/v1beta1": ["true"],
|
"staging/src/k8s.io/api/events/v1beta1": ["true"],
|
||||||
"staging/src/k8s.io/api/extensions/v1beta1": ["true"],
|
"staging/src/k8s.io/api/extensions/v1beta1": ["true"],
|
||||||
"staging/src/k8s.io/api/flowcontrol/v1alpha1": ["true"],
|
"staging/src/k8s.io/api/flowcontrol/v1alpha1": ["true"],
|
||||||
|
@ -285,6 +285,7 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{
|
|||||||
{Group: "auditregistration.k8s.io", Version: "v1alpha1"}: {group: 16400, version: 1},
|
{Group: "auditregistration.k8s.io", Version: "v1alpha1"}: {group: 16400, version: 1},
|
||||||
{Group: "node.k8s.io", Version: "v1alpha1"}: {group: 16300, version: 1},
|
{Group: "node.k8s.io", Version: "v1alpha1"}: {group: 16300, version: 1},
|
||||||
{Group: "node.k8s.io", Version: "v1beta1"}: {group: 16300, version: 9},
|
{Group: "node.k8s.io", Version: "v1beta1"}: {group: 16300, version: 9},
|
||||||
|
{Group: "discovery.k8s.io", Version: "v1beta1"}: {group: 16200, version: 12},
|
||||||
{Group: "discovery.k8s.io", Version: "v1alpha1"}: {group: 16200, version: 9},
|
{Group: "discovery.k8s.io", Version: "v1alpha1"}: {group: 16200, version: 9},
|
||||||
// Append a new group to the end of the list if unsure.
|
// Append a new group to the end of the list if unsure.
|
||||||
// You can use min(existing group)-100 as the initial value for a group.
|
// You can use min(existing group)-100 as the initial value for a group.
|
||||||
|
@ -109,7 +109,6 @@ go_library(
|
|||||||
"//pkg/volume/util:go_default_library",
|
"//pkg/volume/util:go_default_library",
|
||||||
"//pkg/volume/vsphere_volume:go_default_library",
|
"//pkg/volume/vsphere_volume:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||||
|
@ -360,7 +360,6 @@ func KnownControllers() []string {
|
|||||||
// ControllersDisabledByDefault is the set of controllers which is disabled by default
|
// ControllersDisabledByDefault is the set of controllers which is disabled by default
|
||||||
var ControllersDisabledByDefault = sets.NewString(
|
var ControllersDisabledByDefault = sets.NewString(
|
||||||
"bootstrapsigner",
|
"bootstrapsigner",
|
||||||
"endpointslice",
|
|
||||||
"tokencleaner",
|
"tokencleaner",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -23,22 +23,15 @@ package app
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1"
|
|
||||||
"k8s.io/klog"
|
|
||||||
endpointslicecontroller "k8s.io/kubernetes/pkg/controller/endpointslice"
|
endpointslicecontroller "k8s.io/kubernetes/pkg/controller/endpointslice"
|
||||||
)
|
)
|
||||||
|
|
||||||
func startEndpointSliceController(ctx ControllerContext) (http.Handler, bool, error) {
|
func startEndpointSliceController(ctx ControllerContext) (http.Handler, bool, error) {
|
||||||
if !ctx.AvailableResources[discoveryv1alpha1.SchemeGroupVersion.WithResource("endpointslices")] {
|
|
||||||
klog.Warningf("Not starting endpointslice-controller, discovery.k8s.io/v1alpha1 resources are not available")
|
|
||||||
return nil, false, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
go endpointslicecontroller.NewController(
|
go endpointslicecontroller.NewController(
|
||||||
ctx.InformerFactory.Core().V1().Pods(),
|
ctx.InformerFactory.Core().V1().Pods(),
|
||||||
ctx.InformerFactory.Core().V1().Services(),
|
ctx.InformerFactory.Core().V1().Services(),
|
||||||
ctx.InformerFactory.Core().V1().Nodes(),
|
ctx.InformerFactory.Core().V1().Nodes(),
|
||||||
ctx.InformerFactory.Discovery().V1alpha1().EndpointSlices(),
|
ctx.InformerFactory.Discovery().V1beta1().EndpointSlices(),
|
||||||
ctx.ComponentConfig.EndpointSliceController.MaxEndpointsPerSlice,
|
ctx.ComponentConfig.EndpointSliceController.MaxEndpointsPerSlice,
|
||||||
ctx.ClientBuilder.ClientOrDie("endpointslice-controller"),
|
ctx.ClientBuilder.ClientOrDie("endpointslice-controller"),
|
||||||
).Run(int(ctx.ComponentConfig.EndpointSliceController.ConcurrentServiceEndpointSyncs), ctx.Stop)
|
).Run(int(ctx.ComponentConfig.EndpointSliceController.ConcurrentServiceEndpointSyncs), ctx.Stop)
|
||||||
|
@ -677,7 +677,7 @@ func (s *ProxyServer) Run() error {
|
|||||||
go serviceConfig.Run(wait.NeverStop)
|
go serviceConfig.Run(wait.NeverStop)
|
||||||
|
|
||||||
if utilfeature.DefaultFeatureGate.Enabled(features.EndpointSlice) {
|
if utilfeature.DefaultFeatureGate.Enabled(features.EndpointSlice) {
|
||||||
endpointSliceConfig := config.NewEndpointSliceConfig(informerFactory.Discovery().V1alpha1().EndpointSlices(), s.ConfigSyncPeriod)
|
endpointSliceConfig := config.NewEndpointSliceConfig(informerFactory.Discovery().V1beta1().EndpointSlices(), s.ConfigSyncPeriod)
|
||||||
endpointSliceConfig.RegisterEventHandler(s.Proxier)
|
endpointSliceConfig.RegisterEventHandler(s.Proxier)
|
||||||
go endpointSliceConfig.Run(wait.NeverStop)
|
go endpointSliceConfig.Run(wait.NeverStop)
|
||||||
} else {
|
} else {
|
||||||
|
@ -31,6 +31,7 @@ pkg/apis/core/v1/helper/qos
|
|||||||
pkg/apis/core/v1/validation
|
pkg/apis/core/v1/validation
|
||||||
pkg/apis/core/validation
|
pkg/apis/core/validation
|
||||||
pkg/apis/discovery/v1alpha1
|
pkg/apis/discovery/v1alpha1
|
||||||
|
pkg/apis/discovery/v1beta1
|
||||||
pkg/apis/events/v1beta1
|
pkg/apis/events/v1beta1
|
||||||
pkg/apis/extensions
|
pkg/apis/extensions
|
||||||
pkg/apis/extensions/v1beta1
|
pkg/apis/extensions/v1beta1
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
"k8s.io/api/coordination/v1beta1": "coordinationv1beta1",
|
"k8s.io/api/coordination/v1beta1": "coordinationv1beta1",
|
||||||
"k8s.io/api/core/v1": "v1",
|
"k8s.io/api/core/v1": "v1",
|
||||||
"k8s.io/api/discovery/v1alpha1": "discoveryv1alpha1",
|
"k8s.io/api/discovery/v1alpha1": "discoveryv1alpha1",
|
||||||
|
"k8s.io/api/discovery/v1beta1": "discoveryv1beta1",
|
||||||
"k8s.io/api/events/v1beta1": "eventsv1beta1",
|
"k8s.io/api/events/v1beta1": "eventsv1beta1",
|
||||||
"k8s.io/api/extensions/v1beta1": "extensionsv1beta1",
|
"k8s.io/api/extensions/v1beta1": "extensionsv1beta1",
|
||||||
"k8s.io/api/imagepolicy/v1alpha1": "imagepolicyv1alpha1",
|
"k8s.io/api/imagepolicy/v1alpha1": "imagepolicyv1alpha1",
|
||||||
|
@ -85,6 +85,7 @@ certificates.k8s.io/v1beta1 \
|
|||||||
coordination.k8s.io/v1beta1 \
|
coordination.k8s.io/v1beta1 \
|
||||||
coordination.k8s.io/v1 \
|
coordination.k8s.io/v1 \
|
||||||
discovery.k8s.io/v1alpha1 \
|
discovery.k8s.io/v1alpha1 \
|
||||||
|
discovery.k8s.io/v1beta1 \
|
||||||
extensions/v1beta1 \
|
extensions/v1beta1 \
|
||||||
events.k8s.io/v1beta1 \
|
events.k8s.io/v1beta1 \
|
||||||
imagepolicy.k8s.io/v1alpha1 \
|
imagepolicy.k8s.io/v1alpha1 \
|
||||||
|
@ -91,6 +91,8 @@ func TestDefaulting(t *testing.T) {
|
|||||||
{Group: "certificates.k8s.io", Version: "v1beta1", Kind: "CertificateSigningRequestList"}: {},
|
{Group: "certificates.k8s.io", Version: "v1beta1", Kind: "CertificateSigningRequestList"}: {},
|
||||||
{Group: "discovery.k8s.io", Version: "v1alpha1", Kind: "EndpointSlice"}: {},
|
{Group: "discovery.k8s.io", Version: "v1alpha1", Kind: "EndpointSlice"}: {},
|
||||||
{Group: "discovery.k8s.io", Version: "v1alpha1", Kind: "EndpointSliceList"}: {},
|
{Group: "discovery.k8s.io", Version: "v1alpha1", Kind: "EndpointSliceList"}: {},
|
||||||
|
{Group: "discovery.k8s.io", Version: "v1beta1", Kind: "EndpointSlice"}: {},
|
||||||
|
{Group: "discovery.k8s.io", Version: "v1beta1", Kind: "EndpointSliceList"}: {},
|
||||||
{Group: "kubeadm.k8s.io", Version: "v1alpha1", Kind: "MasterConfiguration"}: {},
|
{Group: "kubeadm.k8s.io", Version: "v1alpha1", Kind: "MasterConfiguration"}: {},
|
||||||
// This object contains only int fields which currently breaks the defaulting test because
|
// This object contains only int fields which currently breaks the defaulting test because
|
||||||
// it's pretty stupid. Once we add non integer fields, we should uncomment this.
|
// it's pretty stupid. Once we add non integer fields, we should uncomment this.
|
||||||
|
@ -32,6 +32,7 @@ filegroup(
|
|||||||
"//pkg/apis/discovery/fuzzer:all-srcs",
|
"//pkg/apis/discovery/fuzzer:all-srcs",
|
||||||
"//pkg/apis/discovery/install:all-srcs",
|
"//pkg/apis/discovery/install:all-srcs",
|
||||||
"//pkg/apis/discovery/v1alpha1:all-srcs",
|
"//pkg/apis/discovery/v1alpha1:all-srcs",
|
||||||
|
"//pkg/apis/discovery/v1beta1:all-srcs",
|
||||||
"//pkg/apis/discovery/validation:all-srcs",
|
"//pkg/apis/discovery/validation:all-srcs",
|
||||||
],
|
],
|
||||||
tags = ["automanaged"],
|
tags = ["automanaged"],
|
||||||
|
@ -9,6 +9,7 @@ go_library(
|
|||||||
"//pkg/api/legacyscheme:go_default_library",
|
"//pkg/api/legacyscheme:go_default_library",
|
||||||
"//pkg/apis/discovery:go_default_library",
|
"//pkg/apis/discovery:go_default_library",
|
||||||
"//pkg/apis/discovery/v1alpha1:go_default_library",
|
"//pkg/apis/discovery/v1alpha1:go_default_library",
|
||||||
|
"//pkg/apis/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
||||||
],
|
],
|
||||||
|
@ -24,6 +24,7 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/api/legacyscheme"
|
"k8s.io/kubernetes/pkg/api/legacyscheme"
|
||||||
"k8s.io/kubernetes/pkg/apis/discovery"
|
"k8s.io/kubernetes/pkg/apis/discovery"
|
||||||
"k8s.io/kubernetes/pkg/apis/discovery/v1alpha1"
|
"k8s.io/kubernetes/pkg/apis/discovery/v1alpha1"
|
||||||
|
"k8s.io/kubernetes/pkg/apis/discovery/v1beta1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -34,5 +35,6 @@ func init() {
|
|||||||
func Install(scheme *runtime.Scheme) {
|
func Install(scheme *runtime.Scheme) {
|
||||||
utilruntime.Must(discovery.AddToScheme(scheme))
|
utilruntime.Must(discovery.AddToScheme(scheme))
|
||||||
utilruntime.Must(v1alpha1.AddToScheme(scheme))
|
utilruntime.Must(v1alpha1.AddToScheme(scheme))
|
||||||
utilruntime.Must(scheme.SetVersionPriority(v1alpha1.SchemeGroupVersion))
|
utilruntime.Must(v1beta1.AddToScheme(scheme))
|
||||||
|
utilruntime.Must(scheme.SetVersionPriority(v1beta1.SchemeGroupVersion, v1alpha1.SchemeGroupVersion))
|
||||||
}
|
}
|
||||||
|
52
pkg/apis/discovery/v1beta1/BUILD
Normal file
52
pkg/apis/discovery/v1beta1/BUILD
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"defaults.go",
|
||||||
|
"doc.go",
|
||||||
|
"register.go",
|
||||||
|
"zz_generated.conversion.go",
|
||||||
|
"zz_generated.defaults.go",
|
||||||
|
],
|
||||||
|
importpath = "k8s.io/kubernetes/pkg/apis/discovery/v1beta1",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
"//pkg/apis/core:go_default_library",
|
||||||
|
"//pkg/apis/discovery:go_default_library",
|
||||||
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
go_test(
|
||||||
|
name = "go_default_test",
|
||||||
|
srcs = ["defaults_test.go"],
|
||||||
|
embed = [":go_default_library"],
|
||||||
|
deps = [
|
||||||
|
"//pkg/api/legacyscheme:go_default_library",
|
||||||
|
"//pkg/apis/discovery/install:go_default_library",
|
||||||
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
||||||
|
"//vendor/github.com/google/go-cmp/cmp:go_default_library",
|
||||||
|
"//vendor/k8s.io/utils/pointer:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "package-srcs",
|
||||||
|
srcs = glob(["**"]),
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all-srcs",
|
||||||
|
srcs = [":package-srcs"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
42
pkg/apis/discovery/v1beta1/defaults.go
Normal file
42
pkg/apis/discovery/v1beta1/defaults.go
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/core/v1"
|
||||||
|
discoveryv1beta1 "k8s.io/api/discovery/v1beta1"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
defaultPortName = ""
|
||||||
|
defaultProtocol = v1.ProtocolTCP
|
||||||
|
)
|
||||||
|
|
||||||
|
func addDefaultingFuncs(scheme *runtime.Scheme) error {
|
||||||
|
return RegisterDefaults(scheme)
|
||||||
|
}
|
||||||
|
|
||||||
|
func SetDefaults_EndpointPort(obj *discoveryv1beta1.EndpointPort) {
|
||||||
|
if obj.Name == nil {
|
||||||
|
obj.Name = &defaultPortName
|
||||||
|
}
|
||||||
|
|
||||||
|
if obj.Protocol == nil {
|
||||||
|
obj.Protocol = &defaultProtocol
|
||||||
|
}
|
||||||
|
}
|
77
pkg/apis/discovery/v1beta1/defaults_test.go
Normal file
77
pkg/apis/discovery/v1beta1/defaults_test.go
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1beta1_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/google/go-cmp/cmp"
|
||||||
|
v1 "k8s.io/api/core/v1"
|
||||||
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
|
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
||||||
|
"k8s.io/kubernetes/pkg/api/legacyscheme"
|
||||||
|
_ "k8s.io/kubernetes/pkg/apis/discovery/install"
|
||||||
|
utilpointer "k8s.io/utils/pointer"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestSetDefaultEndpointPort(t *testing.T) {
|
||||||
|
emptyStr := ""
|
||||||
|
fooStr := "foo"
|
||||||
|
protoTCP := v1.ProtocolTCP
|
||||||
|
protoUDP := v1.ProtocolUDP
|
||||||
|
|
||||||
|
tests := map[string]struct {
|
||||||
|
original *discovery.EndpointSlice
|
||||||
|
expected *discovery.EndpointSlice
|
||||||
|
}{
|
||||||
|
"should set appropriate defaults": {
|
||||||
|
original: &discovery.EndpointSlice{Ports: []discovery.EndpointPort{{
|
||||||
|
Port: utilpointer.Int32Ptr(80),
|
||||||
|
}}},
|
||||||
|
expected: &discovery.EndpointSlice{
|
||||||
|
Ports: []discovery.EndpointPort{{
|
||||||
|
Name: &emptyStr,
|
||||||
|
Protocol: &protoTCP,
|
||||||
|
Port: utilpointer.Int32Ptr(80),
|
||||||
|
}},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"should not overwrite values with defaults when set": {
|
||||||
|
original: &discovery.EndpointSlice{
|
||||||
|
Ports: []discovery.EndpointPort{{
|
||||||
|
Name: &fooStr,
|
||||||
|
Protocol: &protoUDP,
|
||||||
|
}},
|
||||||
|
},
|
||||||
|
expected: &discovery.EndpointSlice{
|
||||||
|
Ports: []discovery.EndpointPort{{
|
||||||
|
Name: &fooStr,
|
||||||
|
Protocol: &protoUDP,
|
||||||
|
}},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, test := range tests {
|
||||||
|
actual := test.original
|
||||||
|
expected := test.expected
|
||||||
|
legacyscheme.Scheme.Default(actual)
|
||||||
|
if !apiequality.Semantic.DeepEqual(actual, expected) {
|
||||||
|
t.Error(cmp.Diff(expected, actual))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
22
pkg/apis/discovery/v1beta1/doc.go
Normal file
22
pkg/apis/discovery/v1beta1/doc.go
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/discovery
|
||||||
|
// +k8s:conversion-gen-external-types=k8s.io/api/discovery/v1beta1
|
||||||
|
// +k8s:defaulter-gen=TypeMeta
|
||||||
|
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/discovery/v1beta1
|
||||||
|
|
||||||
|
package v1beta1 // import "k8s.io/kubernetes/pkg/apis/discovery/v1beta1"
|
45
pkg/apis/discovery/v1beta1/register.go
Normal file
45
pkg/apis/discovery/v1beta1/register.go
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
discoveryv1beta1 "k8s.io/api/discovery/v1beta1"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GroupName is the group name used in this package
|
||||||
|
const GroupName = "discovery.k8s.io"
|
||||||
|
|
||||||
|
// SchemeGroupVersion is group version used to register these objects
|
||||||
|
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
|
||||||
|
|
||||||
|
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||||
|
func Resource(resource string) schema.GroupResource {
|
||||||
|
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
localSchemeBuilder = &discoveryv1beta1.SchemeBuilder
|
||||||
|
AddToScheme = localSchemeBuilder.AddToScheme
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
// We only register manually written functions here. The registration of the
|
||||||
|
// generated functions takes place in the generated files. The separation
|
||||||
|
// makes the code compile even when the generated files are missing.
|
||||||
|
localSchemeBuilder.Register(addDefaultingFuncs)
|
||||||
|
}
|
218
pkg/apis/discovery/v1beta1/zz_generated.conversion.go
generated
Normal file
218
pkg/apis/discovery/v1beta1/zz_generated.conversion.go
generated
Normal file
@ -0,0 +1,218 @@
|
|||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by conversion-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
unsafe "unsafe"
|
||||||
|
|
||||||
|
v1 "k8s.io/api/core/v1"
|
||||||
|
v1beta1 "k8s.io/api/discovery/v1beta1"
|
||||||
|
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
core "k8s.io/kubernetes/pkg/apis/core"
|
||||||
|
discovery "k8s.io/kubernetes/pkg/apis/discovery"
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
localSchemeBuilder.Register(RegisterConversions)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterConversions adds conversion functions to the given scheme.
|
||||||
|
// Public to allow building arbitrary schemes.
|
||||||
|
func RegisterConversions(s *runtime.Scheme) error {
|
||||||
|
if err := s.AddGeneratedConversionFunc((*v1beta1.Endpoint)(nil), (*discovery.Endpoint)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_v1beta1_Endpoint_To_discovery_Endpoint(a.(*v1beta1.Endpoint), b.(*discovery.Endpoint), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := s.AddGeneratedConversionFunc((*discovery.Endpoint)(nil), (*v1beta1.Endpoint)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_discovery_Endpoint_To_v1beta1_Endpoint(a.(*discovery.Endpoint), b.(*v1beta1.Endpoint), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := s.AddGeneratedConversionFunc((*v1beta1.EndpointConditions)(nil), (*discovery.EndpointConditions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_v1beta1_EndpointConditions_To_discovery_EndpointConditions(a.(*v1beta1.EndpointConditions), b.(*discovery.EndpointConditions), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := s.AddGeneratedConversionFunc((*discovery.EndpointConditions)(nil), (*v1beta1.EndpointConditions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_discovery_EndpointConditions_To_v1beta1_EndpointConditions(a.(*discovery.EndpointConditions), b.(*v1beta1.EndpointConditions), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := s.AddGeneratedConversionFunc((*v1beta1.EndpointPort)(nil), (*discovery.EndpointPort)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_v1beta1_EndpointPort_To_discovery_EndpointPort(a.(*v1beta1.EndpointPort), b.(*discovery.EndpointPort), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := s.AddGeneratedConversionFunc((*discovery.EndpointPort)(nil), (*v1beta1.EndpointPort)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_discovery_EndpointPort_To_v1beta1_EndpointPort(a.(*discovery.EndpointPort), b.(*v1beta1.EndpointPort), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := s.AddGeneratedConversionFunc((*v1beta1.EndpointSlice)(nil), (*discovery.EndpointSlice)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_v1beta1_EndpointSlice_To_discovery_EndpointSlice(a.(*v1beta1.EndpointSlice), b.(*discovery.EndpointSlice), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := s.AddGeneratedConversionFunc((*discovery.EndpointSlice)(nil), (*v1beta1.EndpointSlice)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_discovery_EndpointSlice_To_v1beta1_EndpointSlice(a.(*discovery.EndpointSlice), b.(*v1beta1.EndpointSlice), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := s.AddGeneratedConversionFunc((*v1beta1.EndpointSliceList)(nil), (*discovery.EndpointSliceList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_v1beta1_EndpointSliceList_To_discovery_EndpointSliceList(a.(*v1beta1.EndpointSliceList), b.(*discovery.EndpointSliceList), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := s.AddGeneratedConversionFunc((*discovery.EndpointSliceList)(nil), (*v1beta1.EndpointSliceList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_discovery_EndpointSliceList_To_v1beta1_EndpointSliceList(a.(*discovery.EndpointSliceList), b.(*v1beta1.EndpointSliceList), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1beta1_Endpoint_To_discovery_Endpoint(in *v1beta1.Endpoint, out *discovery.Endpoint, s conversion.Scope) error {
|
||||||
|
out.Addresses = *(*[]string)(unsafe.Pointer(&in.Addresses))
|
||||||
|
if err := Convert_v1beta1_EndpointConditions_To_discovery_EndpointConditions(&in.Conditions, &out.Conditions, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
out.Hostname = (*string)(unsafe.Pointer(in.Hostname))
|
||||||
|
out.TargetRef = (*core.ObjectReference)(unsafe.Pointer(in.TargetRef))
|
||||||
|
out.Topology = *(*map[string]string)(unsafe.Pointer(&in.Topology))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1beta1_Endpoint_To_discovery_Endpoint is an autogenerated conversion function.
|
||||||
|
func Convert_v1beta1_Endpoint_To_discovery_Endpoint(in *v1beta1.Endpoint, out *discovery.Endpoint, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1beta1_Endpoint_To_discovery_Endpoint(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_discovery_Endpoint_To_v1beta1_Endpoint(in *discovery.Endpoint, out *v1beta1.Endpoint, s conversion.Scope) error {
|
||||||
|
out.Addresses = *(*[]string)(unsafe.Pointer(&in.Addresses))
|
||||||
|
if err := Convert_discovery_EndpointConditions_To_v1beta1_EndpointConditions(&in.Conditions, &out.Conditions, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
out.Hostname = (*string)(unsafe.Pointer(in.Hostname))
|
||||||
|
out.TargetRef = (*v1.ObjectReference)(unsafe.Pointer(in.TargetRef))
|
||||||
|
out.Topology = *(*map[string]string)(unsafe.Pointer(&in.Topology))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_discovery_Endpoint_To_v1beta1_Endpoint is an autogenerated conversion function.
|
||||||
|
func Convert_discovery_Endpoint_To_v1beta1_Endpoint(in *discovery.Endpoint, out *v1beta1.Endpoint, s conversion.Scope) error {
|
||||||
|
return autoConvert_discovery_Endpoint_To_v1beta1_Endpoint(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1beta1_EndpointConditions_To_discovery_EndpointConditions(in *v1beta1.EndpointConditions, out *discovery.EndpointConditions, s conversion.Scope) error {
|
||||||
|
out.Ready = (*bool)(unsafe.Pointer(in.Ready))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1beta1_EndpointConditions_To_discovery_EndpointConditions is an autogenerated conversion function.
|
||||||
|
func Convert_v1beta1_EndpointConditions_To_discovery_EndpointConditions(in *v1beta1.EndpointConditions, out *discovery.EndpointConditions, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1beta1_EndpointConditions_To_discovery_EndpointConditions(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_discovery_EndpointConditions_To_v1beta1_EndpointConditions(in *discovery.EndpointConditions, out *v1beta1.EndpointConditions, s conversion.Scope) error {
|
||||||
|
out.Ready = (*bool)(unsafe.Pointer(in.Ready))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_discovery_EndpointConditions_To_v1beta1_EndpointConditions is an autogenerated conversion function.
|
||||||
|
func Convert_discovery_EndpointConditions_To_v1beta1_EndpointConditions(in *discovery.EndpointConditions, out *v1beta1.EndpointConditions, s conversion.Scope) error {
|
||||||
|
return autoConvert_discovery_EndpointConditions_To_v1beta1_EndpointConditions(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1beta1_EndpointPort_To_discovery_EndpointPort(in *v1beta1.EndpointPort, out *discovery.EndpointPort, s conversion.Scope) error {
|
||||||
|
out.Name = (*string)(unsafe.Pointer(in.Name))
|
||||||
|
out.Protocol = (*core.Protocol)(unsafe.Pointer(in.Protocol))
|
||||||
|
out.Port = (*int32)(unsafe.Pointer(in.Port))
|
||||||
|
out.AppProtocol = (*string)(unsafe.Pointer(in.AppProtocol))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1beta1_EndpointPort_To_discovery_EndpointPort is an autogenerated conversion function.
|
||||||
|
func Convert_v1beta1_EndpointPort_To_discovery_EndpointPort(in *v1beta1.EndpointPort, out *discovery.EndpointPort, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1beta1_EndpointPort_To_discovery_EndpointPort(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_discovery_EndpointPort_To_v1beta1_EndpointPort(in *discovery.EndpointPort, out *v1beta1.EndpointPort, s conversion.Scope) error {
|
||||||
|
out.Name = (*string)(unsafe.Pointer(in.Name))
|
||||||
|
out.Protocol = (*v1.Protocol)(unsafe.Pointer(in.Protocol))
|
||||||
|
out.Port = (*int32)(unsafe.Pointer(in.Port))
|
||||||
|
out.AppProtocol = (*string)(unsafe.Pointer(in.AppProtocol))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_discovery_EndpointPort_To_v1beta1_EndpointPort is an autogenerated conversion function.
|
||||||
|
func Convert_discovery_EndpointPort_To_v1beta1_EndpointPort(in *discovery.EndpointPort, out *v1beta1.EndpointPort, s conversion.Scope) error {
|
||||||
|
return autoConvert_discovery_EndpointPort_To_v1beta1_EndpointPort(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1beta1_EndpointSlice_To_discovery_EndpointSlice(in *v1beta1.EndpointSlice, out *discovery.EndpointSlice, s conversion.Scope) error {
|
||||||
|
out.ObjectMeta = in.ObjectMeta
|
||||||
|
out.AddressType = discovery.AddressType(in.AddressType)
|
||||||
|
out.Endpoints = *(*[]discovery.Endpoint)(unsafe.Pointer(&in.Endpoints))
|
||||||
|
out.Ports = *(*[]discovery.EndpointPort)(unsafe.Pointer(&in.Ports))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1beta1_EndpointSlice_To_discovery_EndpointSlice is an autogenerated conversion function.
|
||||||
|
func Convert_v1beta1_EndpointSlice_To_discovery_EndpointSlice(in *v1beta1.EndpointSlice, out *discovery.EndpointSlice, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1beta1_EndpointSlice_To_discovery_EndpointSlice(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_discovery_EndpointSlice_To_v1beta1_EndpointSlice(in *discovery.EndpointSlice, out *v1beta1.EndpointSlice, s conversion.Scope) error {
|
||||||
|
out.ObjectMeta = in.ObjectMeta
|
||||||
|
out.AddressType = v1beta1.AddressType(in.AddressType)
|
||||||
|
out.Endpoints = *(*[]v1beta1.Endpoint)(unsafe.Pointer(&in.Endpoints))
|
||||||
|
out.Ports = *(*[]v1beta1.EndpointPort)(unsafe.Pointer(&in.Ports))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_discovery_EndpointSlice_To_v1beta1_EndpointSlice is an autogenerated conversion function.
|
||||||
|
func Convert_discovery_EndpointSlice_To_v1beta1_EndpointSlice(in *discovery.EndpointSlice, out *v1beta1.EndpointSlice, s conversion.Scope) error {
|
||||||
|
return autoConvert_discovery_EndpointSlice_To_v1beta1_EndpointSlice(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1beta1_EndpointSliceList_To_discovery_EndpointSliceList(in *v1beta1.EndpointSliceList, out *discovery.EndpointSliceList, s conversion.Scope) error {
|
||||||
|
out.ListMeta = in.ListMeta
|
||||||
|
out.Items = *(*[]discovery.EndpointSlice)(unsafe.Pointer(&in.Items))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1beta1_EndpointSliceList_To_discovery_EndpointSliceList is an autogenerated conversion function.
|
||||||
|
func Convert_v1beta1_EndpointSliceList_To_discovery_EndpointSliceList(in *v1beta1.EndpointSliceList, out *discovery.EndpointSliceList, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1beta1_EndpointSliceList_To_discovery_EndpointSliceList(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_discovery_EndpointSliceList_To_v1beta1_EndpointSliceList(in *discovery.EndpointSliceList, out *v1beta1.EndpointSliceList, s conversion.Scope) error {
|
||||||
|
out.ListMeta = in.ListMeta
|
||||||
|
out.Items = *(*[]v1beta1.EndpointSlice)(unsafe.Pointer(&in.Items))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_discovery_EndpointSliceList_To_v1beta1_EndpointSliceList is an autogenerated conversion function.
|
||||||
|
func Convert_discovery_EndpointSliceList_To_v1beta1_EndpointSliceList(in *discovery.EndpointSliceList, out *v1beta1.EndpointSliceList, s conversion.Scope) error {
|
||||||
|
return autoConvert_discovery_EndpointSliceList_To_v1beta1_EndpointSliceList(in, out, s)
|
||||||
|
}
|
49
pkg/apis/discovery/v1beta1/zz_generated.defaults.go
generated
Normal file
49
pkg/apis/discovery/v1beta1/zz_generated.defaults.go
generated
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by defaulter-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1beta1 "k8s.io/api/discovery/v1beta1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
// RegisterDefaults adds defaulters functions to the given scheme.
|
||||||
|
// Public to allow building arbitrary schemes.
|
||||||
|
// All generated defaulters are covering - they call all nested defaulters.
|
||||||
|
func RegisterDefaults(scheme *runtime.Scheme) error {
|
||||||
|
scheme.AddTypeDefaultingFunc(&v1beta1.EndpointSlice{}, func(obj interface{}) { SetObjectDefaults_EndpointSlice(obj.(*v1beta1.EndpointSlice)) })
|
||||||
|
scheme.AddTypeDefaultingFunc(&v1beta1.EndpointSliceList{}, func(obj interface{}) { SetObjectDefaults_EndpointSliceList(obj.(*v1beta1.EndpointSliceList)) })
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func SetObjectDefaults_EndpointSlice(in *v1beta1.EndpointSlice) {
|
||||||
|
for i := range in.Ports {
|
||||||
|
a := &in.Ports[i]
|
||||||
|
SetDefaults_EndpointPort(a)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func SetObjectDefaults_EndpointSliceList(in *v1beta1.EndpointSliceList) {
|
||||||
|
for i := range in.Items {
|
||||||
|
a := &in.Items[i]
|
||||||
|
SetObjectDefaults_EndpointSlice(a)
|
||||||
|
}
|
||||||
|
}
|
@ -27,7 +27,7 @@
|
|||||||
"k8s.io/api/certificates/v1beta1",
|
"k8s.io/api/certificates/v1beta1",
|
||||||
"k8s.io/api/core/v1",
|
"k8s.io/api/core/v1",
|
||||||
"k8s.io/api/coordination/v1",
|
"k8s.io/api/coordination/v1",
|
||||||
"k8s.io/api/discovery/v1alpha1",
|
"k8s.io/api/discovery/v1beta1",
|
||||||
"k8s.io/api/extensions/v1beta1",
|
"k8s.io/api/extensions/v1beta1",
|
||||||
"k8s.io/api/policy/v1beta1",
|
"k8s.io/api/policy/v1beta1",
|
||||||
"k8s.io/api/rbac/v1",
|
"k8s.io/api/rbac/v1",
|
||||||
@ -150,6 +150,8 @@
|
|||||||
"k8s.io/client-go/listers/coordination/v1",
|
"k8s.io/client-go/listers/coordination/v1",
|
||||||
"k8s.io/client-go/listers/core/v1",
|
"k8s.io/client-go/listers/core/v1",
|
||||||
"k8s.io/client-go/listers/discovery/v1alpha1",
|
"k8s.io/client-go/listers/discovery/v1alpha1",
|
||||||
|
"k8s.io/client-go/listers/discovery/v1beta1",
|
||||||
|
"k8s.io/client-go/listers/coordination/v1",
|
||||||
"k8s.io/client-go/listers/extensions/v1beta1",
|
"k8s.io/client-go/listers/extensions/v1beta1",
|
||||||
"k8s.io/client-go/listers/policy/v1beta1",
|
"k8s.io/client-go/listers/policy/v1beta1",
|
||||||
"k8s.io/client-go/listers/rbac/v1",
|
"k8s.io/client-go/listers/rbac/v1",
|
||||||
|
@ -18,7 +18,7 @@ go_library(
|
|||||||
"//pkg/controller/endpointslice/metrics:go_default_library",
|
"//pkg/controller/endpointslice/metrics:go_default_library",
|
||||||
"//pkg/controller/util/endpoint:go_default_library",
|
"//pkg/controller/util/endpoint:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
@ -30,12 +30,12 @@ go_library(
|
|||||||
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/informers/core/v1:go_default_library",
|
"//staging/src/k8s.io/client-go/informers/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/informers/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/client-go/informers/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/listers/core/v1:go_default_library",
|
"//staging/src/k8s.io/client-go/listers/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/listers/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/client-go/listers/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/tools/cache:go_default_library",
|
"//staging/src/k8s.io/client-go/tools/cache:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/tools/record:go_default_library",
|
"//staging/src/k8s.io/client-go/tools/record:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/util/workqueue:go_default_library",
|
"//staging/src/k8s.io/client-go/util/workqueue:go_default_library",
|
||||||
@ -58,7 +58,7 @@ go_test(
|
|||||||
"//pkg/controller/endpointslice/metrics:go_default_library",
|
"//pkg/controller/endpointslice/metrics:go_default_library",
|
||||||
"//pkg/controller/util/endpoint:go_default_library",
|
"//pkg/controller/util/endpoint:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
@ -19,7 +19,7 @@ package endpointslice
|
|||||||
import (
|
import (
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
endpointutil "k8s.io/kubernetes/pkg/controller/util/endpoint"
|
endpointutil "k8s.io/kubernetes/pkg/controller/util/endpoint"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -21,18 +21,18 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||||
"k8s.io/apimachinery/pkg/util/wait"
|
"k8s.io/apimachinery/pkg/util/wait"
|
||||||
coreinformers "k8s.io/client-go/informers/core/v1"
|
coreinformers "k8s.io/client-go/informers/core/v1"
|
||||||
discoveryinformers "k8s.io/client-go/informers/discovery/v1alpha1"
|
discoveryinformers "k8s.io/client-go/informers/discovery/v1beta1"
|
||||||
clientset "k8s.io/client-go/kubernetes"
|
clientset "k8s.io/client-go/kubernetes"
|
||||||
"k8s.io/client-go/kubernetes/scheme"
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
v1core "k8s.io/client-go/kubernetes/typed/core/v1"
|
v1core "k8s.io/client-go/kubernetes/typed/core/v1"
|
||||||
corelisters "k8s.io/client-go/listers/core/v1"
|
corelisters "k8s.io/client-go/listers/core/v1"
|
||||||
discoverylisters "k8s.io/client-go/listers/discovery/v1alpha1"
|
discoverylisters "k8s.io/client-go/listers/discovery/v1beta1"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
"k8s.io/client-go/tools/record"
|
"k8s.io/client-go/tools/record"
|
||||||
"k8s.io/client-go/util/workqueue"
|
"k8s.io/client-go/util/workqueue"
|
||||||
@ -84,7 +84,7 @@ func NewController(podInformer coreinformers.PodInformer,
|
|||||||
recorder := broadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "endpoint-slice-controller"})
|
recorder := broadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "endpoint-slice-controller"})
|
||||||
|
|
||||||
if client != nil && client.CoreV1().RESTClient().GetRateLimiter() != nil {
|
if client != nil && client.CoreV1().RESTClient().GetRateLimiter() != nil {
|
||||||
ratelimiter.RegisterMetricAndTrackRateLimiterUsage("endpoint_slice_controller", client.DiscoveryV1alpha1().RESTClient().GetRateLimiter())
|
ratelimiter.RegisterMetricAndTrackRateLimiterUsage("endpoint_slice_controller", client.DiscoveryV1beta1().RESTClient().GetRateLimiter())
|
||||||
}
|
}
|
||||||
|
|
||||||
endpointslicemetrics.RegisterMetrics()
|
endpointslicemetrics.RegisterMetrics()
|
||||||
@ -399,7 +399,7 @@ func (c *Controller) ensureSetupManagedByAnnotation(service *v1.Service) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
endpointSlice.Labels[discovery.LabelManagedBy] = controllerName
|
endpointSlice.Labels[discovery.LabelManagedBy] = controllerName
|
||||||
_, err = c.client.DiscoveryV1alpha1().EndpointSlices(endpointSlice.Namespace).Update(endpointSlice)
|
_, err = c.client.DiscoveryV1beta1().EndpointSlices(endpointSlice.Namespace).Update(endpointSlice)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/util/intstr"
|
"k8s.io/apimachinery/pkg/util/intstr"
|
||||||
"k8s.io/client-go/informers"
|
"k8s.io/client-go/informers"
|
||||||
@ -62,7 +62,7 @@ func newController(nodeNames []string) (*fake.Clientset, *endpointSliceControlle
|
|||||||
informerFactory.Core().V1().Pods(),
|
informerFactory.Core().V1().Pods(),
|
||||||
informerFactory.Core().V1().Services(),
|
informerFactory.Core().V1().Services(),
|
||||||
nodeInformer,
|
nodeInformer,
|
||||||
informerFactory.Discovery().V1alpha1().EndpointSlices(),
|
informerFactory.Discovery().V1beta1().EndpointSlices(),
|
||||||
int32(100),
|
int32(100),
|
||||||
client)
|
client)
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ func newController(nodeNames []string) (*fake.Clientset, *endpointSliceControlle
|
|||||||
|
|
||||||
return client, &endpointSliceController{
|
return client, &endpointSliceController{
|
||||||
esController,
|
esController,
|
||||||
informerFactory.Discovery().V1alpha1().EndpointSlices().Informer().GetStore(),
|
informerFactory.Discovery().V1beta1().EndpointSlices().Informer().GetStore(),
|
||||||
informerFactory.Core().V1().Nodes().Informer().GetStore(),
|
informerFactory.Core().V1().Nodes().Informer().GetStore(),
|
||||||
informerFactory.Core().V1().Pods().Informer().GetStore(),
|
informerFactory.Core().V1().Pods().Informer().GetStore(),
|
||||||
informerFactory.Core().V1().Services().Informer().GetStore(),
|
informerFactory.Core().V1().Services().Informer().GetStore(),
|
||||||
@ -105,7 +105,7 @@ func TestSyncServiceWithSelector(t *testing.T) {
|
|||||||
standardSyncService(t, esController, ns, serviceName, "true")
|
standardSyncService(t, esController, ns, serviceName, "true")
|
||||||
expectActions(t, client.Actions(), 1, "create", "endpointslices")
|
expectActions(t, client.Actions(), 1, "create", "endpointslices")
|
||||||
|
|
||||||
sliceList, err := client.DiscoveryV1alpha1().EndpointSlices(ns).List(metav1.ListOptions{})
|
sliceList, err := client.DiscoveryV1beta1().EndpointSlices(ns).List(metav1.ListOptions{})
|
||||||
assert.Nil(t, err, "Expected no error fetching endpoint slices")
|
assert.Nil(t, err, "Expected no error fetching endpoint slices")
|
||||||
assert.Len(t, sliceList.Items, 1, "Expected 1 endpoint slices")
|
assert.Len(t, sliceList.Items, 1, "Expected 1 endpoint slices")
|
||||||
slice := sliceList.Items[0]
|
slice := sliceList.Items[0]
|
||||||
@ -172,7 +172,7 @@ func TestSyncServicePodSelection(t *testing.T) {
|
|||||||
expectActions(t, client.Actions(), 1, "create", "endpointslices")
|
expectActions(t, client.Actions(), 1, "create", "endpointslices")
|
||||||
|
|
||||||
// an endpoint slice should be created, it should only reference pod1 (not pod2)
|
// an endpoint slice should be created, it should only reference pod1 (not pod2)
|
||||||
slices, err := client.DiscoveryV1alpha1().EndpointSlices(ns).List(metav1.ListOptions{})
|
slices, err := client.DiscoveryV1beta1().EndpointSlices(ns).List(metav1.ListOptions{})
|
||||||
assert.Nil(t, err, "Expected no error fetching endpoint slices")
|
assert.Nil(t, err, "Expected no error fetching endpoint slices")
|
||||||
assert.Len(t, slices.Items, 1, "Expected 1 endpoint slices")
|
assert.Len(t, slices.Items, 1, "Expected 1 endpoint slices")
|
||||||
slice := slices.Items[0]
|
slice := slices.Items[0]
|
||||||
@ -246,7 +246,7 @@ func TestSyncServiceEndpointSliceLabelSelection(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Expected no error adding EndpointSlice: %v", err)
|
t.Fatalf("Expected no error adding EndpointSlice: %v", err)
|
||||||
}
|
}
|
||||||
_, err = client.DiscoveryV1alpha1().EndpointSlices(ns).Create(endpointSlice)
|
_, err = client.DiscoveryV1beta1().EndpointSlices(ns).Create(endpointSlice)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Expected no error creating EndpointSlice: %v", err)
|
t.Fatalf("Expected no error creating EndpointSlice: %v", err)
|
||||||
}
|
}
|
||||||
@ -315,7 +315,7 @@ func TestSyncServiceFull(t *testing.T) {
|
|||||||
|
|
||||||
// last action should be to create endpoint slice
|
// last action should be to create endpoint slice
|
||||||
expectActions(t, client.Actions(), 1, "create", "endpointslices")
|
expectActions(t, client.Actions(), 1, "create", "endpointslices")
|
||||||
sliceList, err := client.DiscoveryV1alpha1().EndpointSlices(namespace).List(metav1.ListOptions{})
|
sliceList, err := client.DiscoveryV1beta1().EndpointSlices(namespace).List(metav1.ListOptions{})
|
||||||
assert.Nil(t, err, "Expected no error fetching endpoint slices")
|
assert.Nil(t, err, "Expected no error fetching endpoint slices")
|
||||||
assert.Len(t, sliceList.Items, 1, "Expected 1 endpoint slices")
|
assert.Len(t, sliceList.Items, 1, "Expected 1 endpoint slices")
|
||||||
|
|
||||||
@ -323,18 +323,18 @@ func TestSyncServiceFull(t *testing.T) {
|
|||||||
slice := sliceList.Items[0]
|
slice := sliceList.Items[0]
|
||||||
assert.Len(t, slice.Endpoints, 1, "Expected 1 endpoints in first slice")
|
assert.Len(t, slice.Endpoints, 1, "Expected 1 endpoints in first slice")
|
||||||
assert.Equal(t, slice.Annotations["endpoints.kubernetes.io/last-change-trigger-time"], serviceCreateTime.Format(time.RFC3339Nano))
|
assert.Equal(t, slice.Annotations["endpoints.kubernetes.io/last-change-trigger-time"], serviceCreateTime.Format(time.RFC3339Nano))
|
||||||
assert.ElementsMatch(t, []discovery.EndpointPort{{
|
assert.EqualValues(t, []discovery.EndpointPort{{
|
||||||
Name: strPtr("tcp-example"),
|
Name: strPtr("sctp-example"),
|
||||||
Protocol: protoPtr(v1.ProtocolTCP),
|
Protocol: protoPtr(v1.ProtocolSCTP),
|
||||||
Port: int32Ptr(int32(80)),
|
Port: int32Ptr(int32(3456)),
|
||||||
}, {
|
}, {
|
||||||
Name: strPtr("udp-example"),
|
Name: strPtr("udp-example"),
|
||||||
Protocol: protoPtr(v1.ProtocolUDP),
|
Protocol: protoPtr(v1.ProtocolUDP),
|
||||||
Port: int32Ptr(int32(161)),
|
Port: int32Ptr(int32(161)),
|
||||||
}, {
|
}, {
|
||||||
Name: strPtr("sctp-example"),
|
Name: strPtr("tcp-example"),
|
||||||
Protocol: protoPtr(v1.ProtocolSCTP),
|
Protocol: protoPtr(v1.ProtocolTCP),
|
||||||
Port: int32Ptr(int32(3456)),
|
Port: int32Ptr(int32(80)),
|
||||||
}}, slice.Ports)
|
}}, slice.Ports)
|
||||||
|
|
||||||
assert.ElementsMatch(t, []discovery.Endpoint{{
|
assert.ElementsMatch(t, []discovery.Endpoint{{
|
||||||
@ -417,7 +417,7 @@ func TestEnsureSetupManagedByAnnotation(t *testing.T) {
|
|||||||
t.Fatalf("Expected no error adding EndpointSlice: %v", err)
|
t.Fatalf("Expected no error adding EndpointSlice: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = client.DiscoveryV1alpha1().EndpointSlices(ns).Create(endpointSlice)
|
_, err = client.DiscoveryV1beta1().EndpointSlices(ns).Create(endpointSlice)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Expected no error creating EndpointSlice: %v", err)
|
t.Fatalf("Expected no error creating EndpointSlice: %v", err)
|
||||||
}
|
}
|
||||||
@ -433,7 +433,7 @@ func TestEnsureSetupManagedByAnnotation(t *testing.T) {
|
|||||||
t.Errorf("Expected managedBySetupAnnotation: %+v, got: %+v", managedBySetupCompleteValue, updatedService.Annotations[managedBySetupAnnotation])
|
t.Errorf("Expected managedBySetupAnnotation: %+v, got: %+v", managedBySetupCompleteValue, updatedService.Annotations[managedBySetupAnnotation])
|
||||||
}
|
}
|
||||||
|
|
||||||
updatedSlice, err := client.DiscoveryV1alpha1().EndpointSlices(ns).Get(endpointSlice.Name, metav1.GetOptions{})
|
updatedSlice, err := client.DiscoveryV1beta1().EndpointSlices(ns).Get(endpointSlice.Name, metav1.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Expected no error getting EndpointSlice: %v", err)
|
t.Fatalf("Expected no error getting EndpointSlice: %v", err)
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ go_test(
|
|||||||
embed = [":go_default_library"],
|
embed = [":go_default_library"],
|
||||||
deps = [
|
deps = [
|
||||||
"//pkg/controller/util/endpoint:go_default_library",
|
"//pkg/controller/util/endpoint:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
@ -19,7 +19,7 @@ package metrics
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
endpointutil "k8s.io/kubernetes/pkg/controller/util/endpoint"
|
endpointutil "k8s.io/kubernetes/pkg/controller/util/endpoint"
|
||||||
)
|
)
|
||||||
|
@ -22,7 +22,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
@ -56,7 +56,8 @@ type endpointMeta struct {
|
|||||||
// to ensure the desired set of pods are represented by endpoint slices.
|
// to ensure the desired set of pods are represented by endpoint slices.
|
||||||
func (r *reconciler) reconcile(service *corev1.Service, pods []*corev1.Pod, existingSlices []*discovery.EndpointSlice, triggerTime time.Time) error {
|
func (r *reconciler) reconcile(service *corev1.Service, pods []*corev1.Pod, existingSlices []*discovery.EndpointSlice, triggerTime time.Time) error {
|
||||||
addressType := discovery.AddressTypeIPv4
|
addressType := discovery.AddressTypeIPv4
|
||||||
if service.Spec.IPFamily != nil && *service.Spec.IPFamily == corev1.IPv6Protocol {
|
|
||||||
|
if isIPv6Service(service) {
|
||||||
addressType = discovery.AddressTypeIPv6
|
addressType = discovery.AddressTypeIPv6
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,7 +204,7 @@ func (r *reconciler) finalize(
|
|||||||
|
|
||||||
for _, endpointSlice := range slicesToCreate {
|
for _, endpointSlice := range slicesToCreate {
|
||||||
addTriggerTimeAnnotation(endpointSlice, triggerTime)
|
addTriggerTimeAnnotation(endpointSlice, triggerTime)
|
||||||
_, err := r.client.DiscoveryV1alpha1().EndpointSlices(service.Namespace).Create(endpointSlice)
|
_, err := r.client.DiscoveryV1beta1().EndpointSlices(service.Namespace).Create(endpointSlice)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// If the namespace is terminating, creates will continue to fail. Simply drop the item.
|
// If the namespace is terminating, creates will continue to fail. Simply drop the item.
|
||||||
if errors.HasStatusCause(err, corev1.NamespaceTerminatingCause) {
|
if errors.HasStatusCause(err, corev1.NamespaceTerminatingCause) {
|
||||||
@ -217,7 +218,7 @@ func (r *reconciler) finalize(
|
|||||||
|
|
||||||
for _, endpointSlice := range slicesToUpdate {
|
for _, endpointSlice := range slicesToUpdate {
|
||||||
addTriggerTimeAnnotation(endpointSlice, triggerTime)
|
addTriggerTimeAnnotation(endpointSlice, triggerTime)
|
||||||
_, err := r.client.DiscoveryV1alpha1().EndpointSlices(service.Namespace).Update(endpointSlice)
|
_, err := r.client.DiscoveryV1beta1().EndpointSlices(service.Namespace).Update(endpointSlice)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errs = append(errs, fmt.Errorf("Error updating %s EndpointSlice for Service %s/%s: %v", endpointSlice.Name, service.Namespace, service.Name, err))
|
errs = append(errs, fmt.Errorf("Error updating %s EndpointSlice for Service %s/%s: %v", endpointSlice.Name, service.Namespace, service.Name, err))
|
||||||
} else {
|
} else {
|
||||||
@ -226,7 +227,7 @@ func (r *reconciler) finalize(
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, endpointSlice := range slicesToDelete {
|
for _, endpointSlice := range slicesToDelete {
|
||||||
err := r.client.DiscoveryV1alpha1().EndpointSlices(service.Namespace).Delete(endpointSlice.Name, &metav1.DeleteOptions{})
|
err := r.client.DiscoveryV1beta1().EndpointSlices(service.Namespace).Delete(endpointSlice.Name, &metav1.DeleteOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errs = append(errs, fmt.Errorf("Error deleting %s EndpointSlice for Service %s/%s: %v", endpointSlice.Name, service.Namespace, service.Name, err))
|
errs = append(errs, fmt.Errorf("Error deleting %s EndpointSlice for Service %s/%s: %v", endpointSlice.Name, service.Namespace, service.Name, err))
|
||||||
} else {
|
} else {
|
||||||
|
@ -27,7 +27,7 @@ import (
|
|||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/util/intstr"
|
"k8s.io/apimachinery/pkg/util/intstr"
|
||||||
@ -72,6 +72,8 @@ func TestReconcile1Pod(t *testing.T) {
|
|||||||
svcv4, _ := newServiceAndEndpointMeta("foo", namespace)
|
svcv4, _ := newServiceAndEndpointMeta("foo", namespace)
|
||||||
svcv6, _ := newServiceAndEndpointMeta("foo", namespace)
|
svcv6, _ := newServiceAndEndpointMeta("foo", namespace)
|
||||||
svcv6.Spec.IPFamily = &ipv6Family
|
svcv6.Spec.IPFamily = &ipv6Family
|
||||||
|
svcv6ClusterIP, _ := newServiceAndEndpointMeta("foo", namespace)
|
||||||
|
svcv6ClusterIP.Spec.ClusterIP = "1234::5678:0000:0000:9abc:def1"
|
||||||
|
|
||||||
pod1 := newPod(1, namespace, true, 1)
|
pod1 := newPod(1, namespace, true, 1)
|
||||||
pod1.Status.PodIPs = []corev1.PodIP{{IP: "1.2.3.4"}, {IP: "1234::5678:0000:0000:9abc:def0"}}
|
pod1.Status.PodIPs = []corev1.PodIP{{IP: "1.2.3.4"}, {IP: "1234::5678:0000:0000:9abc:def0"}}
|
||||||
@ -127,6 +129,24 @@ func TestReconcile1Pod(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"ipv6-clusterip": {
|
||||||
|
service: svcv6ClusterIP,
|
||||||
|
expectedAddressType: discovery.AddressTypeIPv6,
|
||||||
|
expectedEndpoint: discovery.Endpoint{
|
||||||
|
Addresses: []string{"1234::5678:0000:0000:9abc:def0"},
|
||||||
|
Conditions: discovery.EndpointConditions{Ready: utilpointer.BoolPtr(true)},
|
||||||
|
Topology: map[string]string{
|
||||||
|
"kubernetes.io/hostname": "node-1",
|
||||||
|
"topology.kubernetes.io/zone": "us-central1-a",
|
||||||
|
"topology.kubernetes.io/region": "us-central1",
|
||||||
|
},
|
||||||
|
TargetRef: &corev1.ObjectReference{
|
||||||
|
Kind: "Pod",
|
||||||
|
Namespace: namespace,
|
||||||
|
Name: "pod1",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for name, testCase := range testCases {
|
for name, testCase := range testCases {
|
||||||
@ -183,7 +203,7 @@ func TestReconcile1EndpointSlice(t *testing.T) {
|
|||||||
svc, endpointMeta := newServiceAndEndpointMeta("foo", namespace)
|
svc, endpointMeta := newServiceAndEndpointMeta("foo", namespace)
|
||||||
endpointSlice1 := newEmptyEndpointSlice(1, namespace, endpointMeta, svc)
|
endpointSlice1 := newEmptyEndpointSlice(1, namespace, endpointMeta, svc)
|
||||||
|
|
||||||
_, createErr := client.DiscoveryV1alpha1().EndpointSlices(namespace).Create(endpointSlice1)
|
_, createErr := client.DiscoveryV1beta1().EndpointSlices(namespace).Create(endpointSlice1)
|
||||||
assert.Nil(t, createErr, "Expected no error creating endpoint slice")
|
assert.Nil(t, createErr, "Expected no error creating endpoint slice")
|
||||||
|
|
||||||
numActionsBefore := len(client.Actions())
|
numActionsBefore := len(client.Actions())
|
||||||
@ -786,7 +806,7 @@ func portsAndAddressTypeEqual(slice1, slice2 discovery.EndpointSlice) bool {
|
|||||||
func createEndpointSlices(t *testing.T, client *fake.Clientset, namespace string, endpointSlices []*discovery.EndpointSlice) {
|
func createEndpointSlices(t *testing.T, client *fake.Clientset, namespace string, endpointSlices []*discovery.EndpointSlice) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
for _, endpointSlice := range endpointSlices {
|
for _, endpointSlice := range endpointSlices {
|
||||||
_, err := client.DiscoveryV1alpha1().EndpointSlices(namespace).Create(endpointSlice)
|
_, err := client.DiscoveryV1beta1().EndpointSlices(namespace).Create(endpointSlice)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Expected no error creating Endpoint Slice, got: %v", err)
|
t.Fatalf("Expected no error creating Endpoint Slice, got: %v", err)
|
||||||
}
|
}
|
||||||
@ -795,7 +815,7 @@ func createEndpointSlices(t *testing.T, client *fake.Clientset, namespace string
|
|||||||
|
|
||||||
func fetchEndpointSlices(t *testing.T, client *fake.Clientset, namespace string) []discovery.EndpointSlice {
|
func fetchEndpointSlices(t *testing.T, client *fake.Clientset, namespace string) []discovery.EndpointSlice {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
fetchedSlices, err := client.DiscoveryV1alpha1().EndpointSlices(namespace).List(metav1.ListOptions{})
|
fetchedSlices, err := client.DiscoveryV1beta1().EndpointSlices(namespace).List(metav1.ListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Expected no error fetching Endpoint Slices, got: %v", err)
|
t.Fatalf("Expected no error fetching Endpoint Slices, got: %v", err)
|
||||||
return []discovery.EndpointSlice{}
|
return []discovery.EndpointSlice{}
|
||||||
|
@ -22,7 +22,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
@ -71,7 +71,7 @@ func podToEndpoint(pod *corev1.Pod, node *corev1.Node, service *corev1.Service)
|
|||||||
|
|
||||||
ready := service.Spec.PublishNotReadyAddresses || podutil.IsPodReady(pod)
|
ready := service.Spec.PublishNotReadyAddresses || podutil.IsPodReady(pod)
|
||||||
ep := discovery.Endpoint{
|
ep := discovery.Endpoint{
|
||||||
Addresses: getEndpointAddresses(pod.Status, service.Spec.IPFamily),
|
Addresses: getEndpointAddresses(pod.Status, service),
|
||||||
Conditions: discovery.EndpointConditions{
|
Conditions: discovery.EndpointConditions{
|
||||||
Ready: &ready,
|
Ready: &ready,
|
||||||
},
|
},
|
||||||
@ -125,13 +125,12 @@ func getEndpointPorts(service *corev1.Service, pod *corev1.Pod) []discovery.Endp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// getEndpointAddresses returns a list of addresses generated from a pod status.
|
// getEndpointAddresses returns a list of addresses generated from a pod status.
|
||||||
func getEndpointAddresses(podStatus corev1.PodStatus, ipFamily *corev1.IPFamily) []string {
|
func getEndpointAddresses(podStatus corev1.PodStatus, service *corev1.Service) []string {
|
||||||
isIPv6Family := ipFamily != nil && *ipFamily == corev1.IPv6Protocol
|
|
||||||
addresses := []string{}
|
addresses := []string{}
|
||||||
|
|
||||||
for _, podIP := range podStatus.PodIPs {
|
for _, podIP := range podStatus.PodIPs {
|
||||||
isIPv6PodIP := utilnet.IsIPv6String(podIP.IP)
|
isIPv6PodIP := utilnet.IsIPv6String(podIP.IP)
|
||||||
if isIPv6Family == isIPv6PodIP {
|
if isIPv6PodIP == isIPv6Service(service) {
|
||||||
addresses = append(addresses, podIP.IP)
|
addresses = append(addresses, podIP.IP)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -139,6 +138,12 @@ func getEndpointAddresses(podStatus corev1.PodStatus, ipFamily *corev1.IPFamily)
|
|||||||
return addresses
|
return addresses
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// isIPv6Service returns true if the Service uses IPv6 addresses.
|
||||||
|
func isIPv6Service(service *corev1.Service) bool {
|
||||||
|
// IPFamily is not guaranteed to be set, even in an IPv6 only cluster.
|
||||||
|
return (service.Spec.IPFamily != nil && *service.Spec.IPFamily == corev1.IPv6Protocol) || utilnet.IsIPv6String(service.Spec.ClusterIP)
|
||||||
|
}
|
||||||
|
|
||||||
// endpointsEqualBeyondHash returns true if endpoints have equal attributes
|
// endpointsEqualBeyondHash returns true if endpoints have equal attributes
|
||||||
// but excludes equality checks that would have already been covered with
|
// but excludes equality checks that would have already been covered with
|
||||||
// endpoint hashing (see hashEndpoint func for more info).
|
// endpoint hashing (see hashEndpoint func for more info).
|
||||||
|
@ -24,7 +24,7 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
@ -13,7 +13,7 @@ go_library(
|
|||||||
"//pkg/controller:go_default_library",
|
"//pkg/controller:go_default_library",
|
||||||
"//pkg/util/hash:go_default_library",
|
"//pkg/util/hash:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||||
|
@ -25,7 +25,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
|
@ -576,7 +576,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
|
|||||||
VolumePVCDataSource: {Default: true, PreRelease: featuregate.Beta},
|
VolumePVCDataSource: {Default: true, PreRelease: featuregate.Beta},
|
||||||
PodOverhead: {Default: false, PreRelease: featuregate.Alpha},
|
PodOverhead: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
IPv6DualStack: {Default: false, PreRelease: featuregate.Alpha},
|
IPv6DualStack: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
EndpointSlice: {Default: false, PreRelease: featuregate.Alpha},
|
EndpointSlice: {Default: true, PreRelease: featuregate.Beta},
|
||||||
EvenPodsSpread: {Default: false, PreRelease: featuregate.Alpha},
|
EvenPodsSpread: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
StartupProbe: {Default: false, PreRelease: featuregate.Alpha},
|
StartupProbe: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
AllowInsecureBackendProxy: {Default: true, PreRelease: featuregate.Beta},
|
AllowInsecureBackendProxy: {Default: true, PreRelease: featuregate.Beta},
|
||||||
|
@ -91,7 +91,7 @@ go_library(
|
|||||||
"//staging/src/k8s.io/api/coordination/v1:go_default_library",
|
"//staging/src/k8s.io/api/coordination/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/coordination/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/coordination/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/events/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/events/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/extensions/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/extensions/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/flowcontrol/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/flowcontrol/v1alpha1:go_default_library",
|
||||||
@ -127,7 +127,7 @@ go_library(
|
|||||||
"//staging/src/k8s.io/client-go/informers:go_default_library",
|
"//staging/src/k8s.io/client-go/informers:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/rest:go_default_library",
|
"//staging/src/k8s.io/client-go/rest:go_default_library",
|
||||||
"//vendor/github.com/prometheus/client_golang/prometheus:go_default_library",
|
"//vendor/github.com/prometheus/client_golang/prometheus:go_default_library",
|
||||||
"//vendor/k8s.io/klog:go_default_library",
|
"//vendor/k8s.io/klog:go_default_library",
|
||||||
|
@ -44,7 +44,7 @@ import (
|
|||||||
coordinationapiv1 "k8s.io/api/coordination/v1"
|
coordinationapiv1 "k8s.io/api/coordination/v1"
|
||||||
coordinationapiv1beta1 "k8s.io/api/coordination/v1beta1"
|
coordinationapiv1beta1 "k8s.io/api/coordination/v1beta1"
|
||||||
apiv1 "k8s.io/api/core/v1"
|
apiv1 "k8s.io/api/core/v1"
|
||||||
discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1"
|
discoveryv1beta1 "k8s.io/api/discovery/v1beta1"
|
||||||
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
||||||
extensionsapiv1beta1 "k8s.io/api/extensions/v1beta1"
|
extensionsapiv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||||
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
||||||
@ -77,7 +77,7 @@ import (
|
|||||||
"k8s.io/client-go/informers"
|
"k8s.io/client-go/informers"
|
||||||
"k8s.io/client-go/kubernetes"
|
"k8s.io/client-go/kubernetes"
|
||||||
corev1client "k8s.io/client-go/kubernetes/typed/core/v1"
|
corev1client "k8s.io/client-go/kubernetes/typed/core/v1"
|
||||||
discoveryclient "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1"
|
discoveryclient "k8s.io/client-go/kubernetes/typed/discovery/v1beta1"
|
||||||
api "k8s.io/kubernetes/pkg/apis/core"
|
api "k8s.io/kubernetes/pkg/apis/core"
|
||||||
"k8s.io/kubernetes/pkg/features"
|
"k8s.io/kubernetes/pkg/features"
|
||||||
kubeoptions "k8s.io/kubernetes/pkg/kubeapiserver/options"
|
kubeoptions "k8s.io/kubernetes/pkg/kubeapiserver/options"
|
||||||
@ -579,6 +579,7 @@ func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig {
|
|||||||
certificatesapiv1beta1.SchemeGroupVersion,
|
certificatesapiv1beta1.SchemeGroupVersion,
|
||||||
coordinationapiv1.SchemeGroupVersion,
|
coordinationapiv1.SchemeGroupVersion,
|
||||||
coordinationapiv1beta1.SchemeGroupVersion,
|
coordinationapiv1beta1.SchemeGroupVersion,
|
||||||
|
discoveryv1beta1.SchemeGroupVersion,
|
||||||
eventsv1beta1.SchemeGroupVersion,
|
eventsv1beta1.SchemeGroupVersion,
|
||||||
extensionsapiv1beta1.SchemeGroupVersion,
|
extensionsapiv1beta1.SchemeGroupVersion,
|
||||||
networkingapiv1.SchemeGroupVersion,
|
networkingapiv1.SchemeGroupVersion,
|
||||||
@ -614,7 +615,6 @@ func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig {
|
|||||||
ret.DisableVersions(
|
ret.DisableVersions(
|
||||||
auditregistrationv1alpha1.SchemeGroupVersion,
|
auditregistrationv1alpha1.SchemeGroupVersion,
|
||||||
batchapiv2alpha1.SchemeGroupVersion,
|
batchapiv2alpha1.SchemeGroupVersion,
|
||||||
discoveryv1alpha1.SchemeGroupVersion,
|
|
||||||
nodev1alpha1.SchemeGroupVersion,
|
nodev1alpha1.SchemeGroupVersion,
|
||||||
rbacv1alpha1.SchemeGroupVersion,
|
rbacv1alpha1.SchemeGroupVersion,
|
||||||
schedulingv1alpha1.SchemeGroupVersion,
|
schedulingv1alpha1.SchemeGroupVersion,
|
||||||
|
@ -15,7 +15,7 @@ go_library(
|
|||||||
deps = [
|
deps = [
|
||||||
"//pkg/api/v1/endpoints:go_default_library",
|
"//pkg/api/v1/endpoints:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
@ -24,7 +24,7 @@ go_library(
|
|||||||
"//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/storage:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/storage:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/util/retry:go_default_library",
|
"//staging/src/k8s.io/client-go/util/retry:go_default_library",
|
||||||
"//vendor/k8s.io/klog:go_default_library",
|
"//vendor/k8s.io/klog:go_default_library",
|
||||||
"//vendor/k8s.io/utils/net:go_default_library",
|
"//vendor/k8s.io/utils/net:go_default_library",
|
||||||
@ -40,7 +40,7 @@ go_test(
|
|||||||
embed = [":go_default_library"],
|
embed = [":go_default_library"],
|
||||||
deps = [
|
deps = [
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
@ -18,12 +18,12 @@ package reconcilers
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
corev1client "k8s.io/client-go/kubernetes/typed/core/v1"
|
corev1client "k8s.io/client-go/kubernetes/typed/core/v1"
|
||||||
discoveryclient "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1"
|
discoveryclient "k8s.io/client-go/kubernetes/typed/discovery/v1beta1"
|
||||||
utilnet "k8s.io/utils/net"
|
utilnet "k8s.io/utils/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ func endpointSliceFromEndpoints(endpoints *corev1.Endpoints) *discovery.Endpoint
|
|||||||
endpointSlice.Name = endpoints.Name
|
endpointSlice.Name = endpoints.Name
|
||||||
endpointSlice.Labels = map[string]string{discovery.LabelServiceName: endpoints.Name}
|
endpointSlice.Labels = map[string]string{discovery.LabelServiceName: endpoints.Name}
|
||||||
|
|
||||||
// TODO: Add support for IPv6 addresses here (and in the rest of
|
// TODO: Add support for dual stack here (and in the rest of
|
||||||
// EndpointsAdapter).
|
// EndpointsAdapter).
|
||||||
endpointSlice.AddressType = discovery.AddressTypeIPv4
|
endpointSlice.AddressType = discovery.AddressTypeIPv4
|
||||||
|
|
||||||
@ -136,6 +136,11 @@ func endpointSliceFromEndpoints(endpoints *corev1.Endpoints) *discovery.Endpoint
|
|||||||
Protocol: &subset.Ports[i].Protocol,
|
Protocol: &subset.Ports[i].Protocol,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if allAddressesIPv6(append(subset.Addresses, subset.NotReadyAddresses...)) {
|
||||||
|
endpointSlice.AddressType = discovery.AddressTypeIPv6
|
||||||
|
}
|
||||||
|
|
||||||
endpointSlice.Endpoints = append(endpointSlice.Endpoints, getEndpointsFromAddresses(subset.Addresses, endpointSlice.AddressType, true)...)
|
endpointSlice.Endpoints = append(endpointSlice.Endpoints, getEndpointsFromAddresses(subset.Addresses, endpointSlice.AddressType, true)...)
|
||||||
endpointSlice.Endpoints = append(endpointSlice.Endpoints, getEndpointsFromAddresses(subset.NotReadyAddresses, endpointSlice.AddressType, false)...)
|
endpointSlice.Endpoints = append(endpointSlice.Endpoints, getEndpointsFromAddresses(subset.NotReadyAddresses, endpointSlice.AddressType, false)...)
|
||||||
}
|
}
|
||||||
@ -172,3 +177,18 @@ func endpointFromAddress(address corev1.EndpointAddress, ready bool) discovery.E
|
|||||||
Topology: topology,
|
Topology: topology,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// allAddressesIPv6 returns true if all provided addresses are IPv6.
|
||||||
|
func allAddressesIPv6(addresses []corev1.EndpointAddress) bool {
|
||||||
|
if len(addresses) == 0 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, address := range addresses {
|
||||||
|
if !utilnet.IsIPv6String(address.IP) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
@ -21,7 +21,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@ -79,7 +79,7 @@ func TestEndpointsAdapterGet(t *testing.T) {
|
|||||||
client := fake.NewSimpleClientset()
|
client := fake.NewSimpleClientset()
|
||||||
epAdapter := EndpointsAdapter{endpointClient: client.CoreV1()}
|
epAdapter := EndpointsAdapter{endpointClient: client.CoreV1()}
|
||||||
if testCase.endpointSlicesEnabled {
|
if testCase.endpointSlicesEnabled {
|
||||||
epAdapter.endpointSliceClient = client.DiscoveryV1alpha1()
|
epAdapter.endpointSliceClient = client.DiscoveryV1beta1()
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, endpoints := range testCase.endpoints {
|
for _, endpoints := range testCase.endpoints {
|
||||||
@ -110,6 +110,11 @@ func TestEndpointsAdapterCreate(t *testing.T) {
|
|||||||
endpoints2, _ := generateEndpointsAndSlice("foo", "testing", []int{80}, []string{"10.1.2.5", "10.1.2.6", "1234::5678:0000:0000:9abc:def0"})
|
endpoints2, _ := generateEndpointsAndSlice("foo", "testing", []int{80}, []string{"10.1.2.5", "10.1.2.6", "1234::5678:0000:0000:9abc:def0"})
|
||||||
_, epSlice2 := generateEndpointsAndSlice("foo", "testing", []int{80}, []string{"10.1.2.5", "10.1.2.6"})
|
_, epSlice2 := generateEndpointsAndSlice("foo", "testing", []int{80}, []string{"10.1.2.5", "10.1.2.6"})
|
||||||
|
|
||||||
|
// ensure that Endpoints with only IPv6 addresses result in EndpointSlice
|
||||||
|
// with an IPv6 address type.
|
||||||
|
endpoints3, epSlice3 := generateEndpointsAndSlice("foo", "testing", []int{80}, []string{"1234::5678:0000:0000:9abc:def0"})
|
||||||
|
epSlice3.AddressType = discovery.AddressTypeIPv6
|
||||||
|
|
||||||
testCases := map[string]struct {
|
testCases := map[string]struct {
|
||||||
endpointSlicesEnabled bool
|
endpointSlicesEnabled bool
|
||||||
expectedError error
|
expectedError error
|
||||||
@ -129,7 +134,7 @@ func TestEndpointsAdapterCreate(t *testing.T) {
|
|||||||
namespaceParam: endpoints1.Namespace,
|
namespaceParam: endpoints1.Namespace,
|
||||||
endpointsParam: endpoints1,
|
endpointsParam: endpoints1,
|
||||||
},
|
},
|
||||||
"single-endpoint-with-ipv6": {
|
"single-endpoint-partial-ipv6": {
|
||||||
endpointSlicesEnabled: true,
|
endpointSlicesEnabled: true,
|
||||||
expectedError: nil,
|
expectedError: nil,
|
||||||
expectedEndpoints: endpoints2,
|
expectedEndpoints: endpoints2,
|
||||||
@ -138,6 +143,15 @@ func TestEndpointsAdapterCreate(t *testing.T) {
|
|||||||
namespaceParam: endpoints2.Namespace,
|
namespaceParam: endpoints2.Namespace,
|
||||||
endpointsParam: endpoints2,
|
endpointsParam: endpoints2,
|
||||||
},
|
},
|
||||||
|
"single-endpoint-full-ipv6": {
|
||||||
|
endpointSlicesEnabled: true,
|
||||||
|
expectedError: nil,
|
||||||
|
expectedEndpoints: endpoints3,
|
||||||
|
expectedEndpointSlice: epSlice3,
|
||||||
|
endpoints: []*corev1.Endpoints{},
|
||||||
|
namespaceParam: endpoints3.Namespace,
|
||||||
|
endpointsParam: endpoints3,
|
||||||
|
},
|
||||||
"single-endpoint-no-slices": {
|
"single-endpoint-no-slices": {
|
||||||
endpointSlicesEnabled: false,
|
endpointSlicesEnabled: false,
|
||||||
expectedError: nil,
|
expectedError: nil,
|
||||||
@ -163,7 +177,7 @@ func TestEndpointsAdapterCreate(t *testing.T) {
|
|||||||
client := fake.NewSimpleClientset()
|
client := fake.NewSimpleClientset()
|
||||||
epAdapter := EndpointsAdapter{endpointClient: client.CoreV1()}
|
epAdapter := EndpointsAdapter{endpointClient: client.CoreV1()}
|
||||||
if testCase.endpointSlicesEnabled {
|
if testCase.endpointSlicesEnabled {
|
||||||
epAdapter.endpointSliceClient = client.DiscoveryV1alpha1()
|
epAdapter.endpointSliceClient = client.DiscoveryV1beta1()
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, endpoints := range testCase.endpoints {
|
for _, endpoints := range testCase.endpoints {
|
||||||
@ -183,7 +197,7 @@ func TestEndpointsAdapterCreate(t *testing.T) {
|
|||||||
t.Errorf("Expected endpoints: %v, got: %v", testCase.expectedEndpoints, endpoints)
|
t.Errorf("Expected endpoints: %v, got: %v", testCase.expectedEndpoints, endpoints)
|
||||||
}
|
}
|
||||||
|
|
||||||
epSliceList, err := client.DiscoveryV1alpha1().EndpointSlices(testCase.namespaceParam).List(metav1.ListOptions{})
|
epSliceList, err := client.DiscoveryV1beta1().EndpointSlices(testCase.namespaceParam).List(metav1.ListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Error listing Endpoint Slices: %v", err)
|
t.Fatalf("Error listing Endpoint Slices: %v", err)
|
||||||
}
|
}
|
||||||
@ -274,7 +288,7 @@ func TestEndpointsAdapterUpdate(t *testing.T) {
|
|||||||
client := fake.NewSimpleClientset()
|
client := fake.NewSimpleClientset()
|
||||||
epAdapter := EndpointsAdapter{endpointClient: client.CoreV1()}
|
epAdapter := EndpointsAdapter{endpointClient: client.CoreV1()}
|
||||||
if testCase.endpointSlicesEnabled {
|
if testCase.endpointSlicesEnabled {
|
||||||
epAdapter.endpointSliceClient = client.DiscoveryV1alpha1()
|
epAdapter.endpointSliceClient = client.DiscoveryV1beta1()
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, endpoints := range testCase.endpoints {
|
for _, endpoints := range testCase.endpoints {
|
||||||
@ -294,7 +308,7 @@ func TestEndpointsAdapterUpdate(t *testing.T) {
|
|||||||
t.Errorf("Expected endpoints: %v, got: %v", testCase.expectedEndpoints, endpoints)
|
t.Errorf("Expected endpoints: %v, got: %v", testCase.expectedEndpoints, endpoints)
|
||||||
}
|
}
|
||||||
|
|
||||||
epSliceList, err := client.DiscoveryV1alpha1().EndpointSlices(testCase.namespaceParam).List(metav1.ListOptions{})
|
epSliceList, err := client.DiscoveryV1beta1().EndpointSlices(testCase.namespaceParam).List(metav1.ListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Error listing Endpoint Slices: %v", err)
|
t.Fatalf("Error listing Endpoint Slices: %v", err)
|
||||||
}
|
}
|
||||||
@ -416,11 +430,11 @@ func TestEndpointsAdapterEnsureEndpointSliceFromEndpoints(t *testing.T) {
|
|||||||
client := fake.NewSimpleClientset()
|
client := fake.NewSimpleClientset()
|
||||||
epAdapter := EndpointsAdapter{endpointClient: client.CoreV1()}
|
epAdapter := EndpointsAdapter{endpointClient: client.CoreV1()}
|
||||||
if testCase.endpointSlicesEnabled {
|
if testCase.endpointSlicesEnabled {
|
||||||
epAdapter.endpointSliceClient = client.DiscoveryV1alpha1()
|
epAdapter.endpointSliceClient = client.DiscoveryV1beta1()
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, endpointSlice := range testCase.endpointSlices {
|
for _, endpointSlice := range testCase.endpointSlices {
|
||||||
_, err := client.DiscoveryV1alpha1().EndpointSlices(endpointSlice.Namespace).Create(endpointSlice)
|
_, err := client.DiscoveryV1beta1().EndpointSlices(endpointSlice.Namespace).Create(endpointSlice)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Error creating EndpointSlice: %v", err)
|
t.Fatalf("Error creating EndpointSlice: %v", err)
|
||||||
}
|
}
|
||||||
@ -431,7 +445,7 @@ func TestEndpointsAdapterEnsureEndpointSliceFromEndpoints(t *testing.T) {
|
|||||||
t.Errorf("Expected error: %v, got: %v", testCase.expectedError, err)
|
t.Errorf("Expected error: %v, got: %v", testCase.expectedError, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
endpointSlice, err := client.DiscoveryV1alpha1().EndpointSlices(testCase.namespaceParam).Get(testCase.endpointsParam.Name, metav1.GetOptions{})
|
endpointSlice, err := client.DiscoveryV1beta1().EndpointSlices(testCase.namespaceParam).Get(testCase.endpointsParam.Name, metav1.GetOptions{})
|
||||||
if err != nil && !errors.IsNotFound(err) {
|
if err != nil && !errors.IsNotFound(err) {
|
||||||
t.Fatalf("Error getting Endpoint Slice: %v", err)
|
t.Fatalf("Error getting Endpoint Slice: %v", err)
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,7 @@ var GVRToStorageVersionHash = map[string]string{
|
|||||||
"certificates.k8s.io/v1beta1/certificatesigningrequests": "UQh3YTCDIf0=",
|
"certificates.k8s.io/v1beta1/certificatesigningrequests": "UQh3YTCDIf0=",
|
||||||
"coordination.k8s.io/v1beta1/leases": "/sY7hl8ol1U=",
|
"coordination.k8s.io/v1beta1/leases": "/sY7hl8ol1U=",
|
||||||
"coordination.k8s.io/v1/leases": "/sY7hl8ol1U=",
|
"coordination.k8s.io/v1/leases": "/sY7hl8ol1U=",
|
||||||
|
"discovery.k8s.io/v1beta1/endpointslices": "Nx3SIv6I0mE=",
|
||||||
"extensions/v1beta1/ingresses": "ZOAfGflaKd0=",
|
"extensions/v1beta1/ingresses": "ZOAfGflaKd0=",
|
||||||
"networking.k8s.io/v1/networkpolicies": "YpfwF18m1G8=",
|
"networking.k8s.io/v1/networkpolicies": "YpfwF18m1G8=",
|
||||||
"networking.k8s.io/v1beta1/ingresses": "ZOAfGflaKd0=",
|
"networking.k8s.io/v1beta1/ingresses": "ZOAfGflaKd0=",
|
||||||
|
@ -92,7 +92,7 @@ go_library(
|
|||||||
"//staging/src/k8s.io/api/certificates/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/certificates/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/coordination/v1:go_default_library",
|
"//staging/src/k8s.io/api/coordination/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/extensions/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/extensions/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/policy/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/policy/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/rbac/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/rbac/v1beta1:go_default_library",
|
||||||
|
@ -32,7 +32,7 @@ import (
|
|||||||
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
||||||
coordinationv1 "k8s.io/api/coordination/v1"
|
coordinationv1 "k8s.io/api/coordination/v1"
|
||||||
apiv1 "k8s.io/api/core/v1"
|
apiv1 "k8s.io/api/core/v1"
|
||||||
discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1"
|
discoveryv1beta1 "k8s.io/api/discovery/v1beta1"
|
||||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||||
policyv1beta1 "k8s.io/api/policy/v1beta1"
|
policyv1beta1 "k8s.io/api/policy/v1beta1"
|
||||||
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
|
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
|
||||||
@ -475,9 +475,9 @@ func AddHandlers(h printers.PrintHandler) {
|
|||||||
|
|
||||||
endpointSliceColumnDefinitions := []metav1beta1.TableColumnDefinition{
|
endpointSliceColumnDefinitions := []metav1beta1.TableColumnDefinition{
|
||||||
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
|
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
|
||||||
{Name: "AddressType", Type: "string", Description: discoveryv1alpha1.EndpointSlice{}.SwaggerDoc()["addressType"]},
|
{Name: "AddressType", Type: "string", Description: discoveryv1beta1.EndpointSlice{}.SwaggerDoc()["addressType"]},
|
||||||
{Name: "Ports", Type: "string", Description: discoveryv1alpha1.EndpointSlice{}.SwaggerDoc()["ports"]},
|
{Name: "Ports", Type: "string", Description: discoveryv1beta1.EndpointSlice{}.SwaggerDoc()["ports"]},
|
||||||
{Name: "Endpoints", Type: "string", Description: discoveryv1alpha1.EndpointSlice{}.SwaggerDoc()["endpoints"]},
|
{Name: "Endpoints", Type: "string", Description: discoveryv1beta1.EndpointSlice{}.SwaggerDoc()["endpoints"]},
|
||||||
{Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]},
|
{Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]},
|
||||||
}
|
}
|
||||||
h.TableHandler(endpointSliceColumnDefinitions, printEndpointSlice)
|
h.TableHandler(endpointSliceColumnDefinitions, printEndpointSlice)
|
||||||
|
@ -22,7 +22,7 @@ go_library(
|
|||||||
"//pkg/proxy/metrics:go_default_library",
|
"//pkg/proxy/metrics:go_default_library",
|
||||||
"//pkg/proxy/util:go_default_library",
|
"//pkg/proxy/util:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/tools/record:go_default_library",
|
"//staging/src/k8s.io/client-go/tools/record:go_default_library",
|
||||||
@ -66,7 +66,7 @@ go_test(
|
|||||||
embed = [":go_default_library"],
|
embed = [":go_default_library"],
|
||||||
deps = [
|
deps = [
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||||
|
@ -15,10 +15,10 @@ go_library(
|
|||||||
importpath = "k8s.io/kubernetes/pkg/proxy/config",
|
importpath = "k8s.io/kubernetes/pkg/proxy/config",
|
||||||
deps = [
|
deps = [
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/informers/core/v1:go_default_library",
|
"//staging/src/k8s.io/client-go/informers/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/informers/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/client-go/informers/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/tools/cache:go_default_library",
|
"//staging/src/k8s.io/client-go/tools/cache:go_default_library",
|
||||||
"//vendor/k8s.io/klog:go_default_library",
|
"//vendor/k8s.io/klog:go_default_library",
|
||||||
],
|
],
|
||||||
|
@ -21,10 +21,10 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
"k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||||
coreinformers "k8s.io/client-go/informers/core/v1"
|
coreinformers "k8s.io/client-go/informers/core/v1"
|
||||||
discoveryinformers "k8s.io/client-go/informers/discovery/v1alpha1"
|
discoveryinformers "k8s.io/client-go/informers/discovery/v1beta1"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
)
|
)
|
||||||
|
@ -26,7 +26,7 @@ import (
|
|||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
"k8s.io/client-go/tools/record"
|
"k8s.io/client-go/tools/record"
|
||||||
|
@ -24,7 +24,7 @@ import (
|
|||||||
"github.com/davecgh/go-spew/spew"
|
"github.com/davecgh/go-spew/spew"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
"k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
|
@ -24,7 +24,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
"k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/client-go/tools/record"
|
"k8s.io/client-go/tools/record"
|
||||||
"k8s.io/klog"
|
"k8s.io/klog"
|
||||||
|
@ -22,7 +22,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
"k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
utilpointer "k8s.io/utils/pointer"
|
utilpointer "k8s.io/utils/pointer"
|
||||||
|
@ -21,7 +21,7 @@ go_library(
|
|||||||
"//pkg/util/iptables:go_default_library",
|
"//pkg/util/iptables:go_default_library",
|
||||||
"//pkg/util/sysctl:go_default_library",
|
"//pkg/util/sysctl:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library",
|
||||||
@ -46,7 +46,7 @@ go_test(
|
|||||||
"//pkg/util/iptables:go_default_library",
|
"//pkg/util/iptables:go_default_library",
|
||||||
"//pkg/util/iptables/testing:go_default_library",
|
"//pkg/util/iptables/testing:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||||
|
@ -32,8 +32,8 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
"k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/apimachinery/pkg/util/wait"
|
"k8s.io/apimachinery/pkg/util/wait"
|
||||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||||
|
@ -30,7 +30,7 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/apimachinery/pkg/util/intstr"
|
"k8s.io/apimachinery/pkg/util/intstr"
|
||||||
|
@ -28,7 +28,7 @@ go_test(
|
|||||||
"//pkg/util/ipvs:go_default_library",
|
"//pkg/util/ipvs:go_default_library",
|
||||||
"//pkg/util/ipvs/testing:go_default_library",
|
"//pkg/util/ipvs/testing:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
|
||||||
@ -66,7 +66,7 @@ go_library(
|
|||||||
"//pkg/util/ipvs:go_default_library",
|
"//pkg/util/ipvs:go_default_library",
|
||||||
"//pkg/util/sysctl:go_default_library",
|
"//pkg/util/sysctl:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/version:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/version:go_default_library",
|
||||||
|
@ -24,7 +24,7 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/proxy"
|
"k8s.io/kubernetes/pkg/proxy"
|
||||||
utilnet "k8s.io/utils/net"
|
utilnet "k8s.io/utils/net"
|
||||||
|
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
)
|
)
|
||||||
|
|
||||||
type metaProxier struct {
|
type metaProxier struct {
|
||||||
|
@ -31,7 +31,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
"k8s.io/apimachinery/pkg/util/version"
|
"k8s.io/apimachinery/pkg/util/version"
|
||||||
|
@ -28,7 +28,7 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/apimachinery/pkg/util/intstr"
|
"k8s.io/apimachinery/pkg/util/intstr"
|
||||||
|
@ -86,7 +86,7 @@ go_test(
|
|||||||
"//pkg/proxy:go_default_library",
|
"//pkg/proxy:go_default_library",
|
||||||
"//pkg/util/iptables/testing:go_default_library",
|
"//pkg/util/iptables/testing:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library",
|
||||||
|
@ -31,7 +31,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
"k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/apimachinery/pkg/util/runtime"
|
"k8s.io/apimachinery/pkg/util/runtime"
|
||||||
|
@ -64,7 +64,7 @@ go_test(
|
|||||||
"//pkg/proxy:go_default_library",
|
"//pkg/proxy:go_default_library",
|
||||||
"//pkg/proxy/healthcheck:go_default_library",
|
"//pkg/proxy/healthcheck:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
"//vendor/github.com/Microsoft/hcsshim/hcn:go_default_library",
|
"//vendor/github.com/Microsoft/hcsshim/hcn:go_default_library",
|
||||||
|
@ -20,7 +20,7 @@ package winkernel
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/api/core/v1"
|
"k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/kubernetes/pkg/proxy"
|
"k8s.io/kubernetes/pkg/proxy"
|
||||||
"k8s.io/kubernetes/pkg/proxy/healthcheck"
|
"k8s.io/kubernetes/pkg/proxy/healthcheck"
|
||||||
|
@ -45,7 +45,7 @@ go_test(
|
|||||||
"//pkg/proxy:go_default_library",
|
"//pkg/proxy:go_default_library",
|
||||||
"//pkg/util/netsh/testing:go_default_library",
|
"//pkg/util/netsh/testing:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
||||||
|
@ -30,7 +30,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
"k8s.io/api/core/v1"
|
||||||
discovery "k8s.io/api/discovery/v1alpha1"
|
discovery "k8s.io/api/discovery/v1beta1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/apimachinery/pkg/util/runtime"
|
"k8s.io/apimachinery/pkg/util/runtime"
|
||||||
|
@ -10,6 +10,7 @@ go_library(
|
|||||||
"//pkg/apis/discovery:go_default_library",
|
"//pkg/apis/discovery:go_default_library",
|
||||||
"//pkg/registry/discovery/endpointslice/storage:go_default_library",
|
"//pkg/registry/discovery/endpointslice/storage:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/server:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/server:go_default_library",
|
||||||
|
@ -18,6 +18,7 @@ package rest
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1"
|
discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1"
|
||||||
|
discoveryv1beta1 "k8s.io/api/discovery/v1beta1"
|
||||||
"k8s.io/apiserver/pkg/registry/generic"
|
"k8s.io/apiserver/pkg/registry/generic"
|
||||||
"k8s.io/apiserver/pkg/registry/rest"
|
"k8s.io/apiserver/pkg/registry/rest"
|
||||||
genericapiserver "k8s.io/apiserver/pkg/server"
|
genericapiserver "k8s.io/apiserver/pkg/server"
|
||||||
@ -44,6 +45,14 @@ func (p StorageProvider) NewRESTStorage(apiResourceConfigSource serverstorage.AP
|
|||||||
apiGroupInfo.VersionedResourcesStorageMap[discoveryv1alpha1.SchemeGroupVersion.Version] = storageMap
|
apiGroupInfo.VersionedResourcesStorageMap[discoveryv1alpha1.SchemeGroupVersion.Version] = storageMap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if apiResourceConfigSource.VersionEnabled(discoveryv1beta1.SchemeGroupVersion) {
|
||||||
|
storageMap, err := p.v1beta1Storage(apiResourceConfigSource, restOptionsGetter)
|
||||||
|
if err != nil {
|
||||||
|
return genericapiserver.APIGroupInfo{}, false, err
|
||||||
|
}
|
||||||
|
apiGroupInfo.VersionedResourcesStorageMap[discoveryv1beta1.SchemeGroupVersion.Version] = storageMap
|
||||||
|
}
|
||||||
|
|
||||||
return apiGroupInfo, true, nil
|
return apiGroupInfo, true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +68,19 @@ func (p StorageProvider) v1alpha1Storage(apiResourceConfigSource serverstorage.A
|
|||||||
return storage, err
|
return storage, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p StorageProvider) v1beta1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (map[string]rest.Storage, error) {
|
||||||
|
storage := map[string]rest.Storage{}
|
||||||
|
|
||||||
|
endpointSliceStorage, err := endpointslicestorage.NewREST(restOptionsGetter)
|
||||||
|
if err != nil {
|
||||||
|
return storage, err
|
||||||
|
}
|
||||||
|
|
||||||
|
storage["endpointslices"] = endpointSliceStorage
|
||||||
|
return storage, err
|
||||||
|
}
|
||||||
|
|
||||||
// GroupName is the group name for the storage provider.
|
// GroupName is the group name for the storage provider.
|
||||||
func (p StorageProvider) GroupName() string {
|
func (p StorageProvider) GroupName() string {
|
||||||
return discoveryv1alpha1.GroupName
|
return discovery.GroupName
|
||||||
}
|
}
|
||||||
|
@ -1049,6 +1049,13 @@ items:
|
|||||||
- create
|
- create
|
||||||
- patch
|
- patch
|
||||||
- update
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- discovery.k8s.io
|
||||||
|
resources:
|
||||||
|
- endpointslices
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
- apiVersion: rbac.authorization.k8s.io/v1
|
- apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -136,6 +136,23 @@ items:
|
|||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: endpoint-controller
|
name: endpoint-controller
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
|
- apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
rbac.authorization.kubernetes.io/autoupdate: "true"
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
kubernetes.io/bootstrapping: rbac-defaults
|
||||||
|
name: system:controller:endpointslice-controller
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: system:controller:endpointslice-controller
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: endpointslice-controller
|
||||||
|
namespace: kube-system
|
||||||
- apiVersion: rbac.authorization.k8s.io/v1
|
- apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -447,6 +447,45 @@ items:
|
|||||||
- create
|
- create
|
||||||
- patch
|
- patch
|
||||||
- update
|
- update
|
||||||
|
- apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
rbac.authorization.kubernetes.io/autoupdate: "true"
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
kubernetes.io/bootstrapping: rbac-defaults
|
||||||
|
name: system:controller:endpointslice-controller
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- nodes
|
||||||
|
- pods
|
||||||
|
- services
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- discovery.k8s.io
|
||||||
|
resources:
|
||||||
|
- endpointslices
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
- events.k8s.io
|
||||||
|
resources:
|
||||||
|
- events
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
- apiVersion: rbac.authorization.k8s.io/v1
|
- apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -87,6 +87,7 @@ filegroup(
|
|||||||
"//staging/src/k8s.io/api/coordination/v1beta1:all-srcs",
|
"//staging/src/k8s.io/api/coordination/v1beta1:all-srcs",
|
||||||
"//staging/src/k8s.io/api/core/v1:all-srcs",
|
"//staging/src/k8s.io/api/core/v1:all-srcs",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:all-srcs",
|
"//staging/src/k8s.io/api/discovery/v1alpha1:all-srcs",
|
||||||
|
"//staging/src/k8s.io/api/discovery/v1beta1:all-srcs",
|
||||||
"//staging/src/k8s.io/api/events/v1beta1:all-srcs",
|
"//staging/src/k8s.io/api/events/v1beta1:all-srcs",
|
||||||
"//staging/src/k8s.io/api/extensions/v1beta1:all-srcs",
|
"//staging/src/k8s.io/api/extensions/v1beta1:all-srcs",
|
||||||
"//staging/src/k8s.io/api/flowcontrol/v1alpha1:all-srcs",
|
"//staging/src/k8s.io/api/flowcontrol/v1alpha1:all-srcs",
|
||||||
|
39
staging/src/k8s.io/api/discovery/v1beta1/BUILD
Normal file
39
staging/src/k8s.io/api/discovery/v1beta1/BUILD
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"doc.go",
|
||||||
|
"generated.pb.go",
|
||||||
|
"register.go",
|
||||||
|
"types.go",
|
||||||
|
"types_swagger_doc_generated.go",
|
||||||
|
"well_known_labels.go",
|
||||||
|
"zz_generated.deepcopy.go",
|
||||||
|
],
|
||||||
|
importmap = "k8s.io/kubernetes/vendor/k8s.io/api/discovery/v1beta1",
|
||||||
|
importpath = "k8s.io/api/discovery/v1beta1",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
|
||||||
|
"//vendor/github.com/gogo/protobuf/sortkeys:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "package-srcs",
|
||||||
|
srcs = glob(["**"]),
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all-srcs",
|
||||||
|
srcs = [":package-srcs"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
22
staging/src/k8s.io/api/discovery/v1beta1/doc.go
Normal file
22
staging/src/k8s.io/api/discovery/v1beta1/doc.go
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// +k8s:deepcopy-gen=package
|
||||||
|
// +k8s:protobuf-gen=package
|
||||||
|
// +k8s:openapi-gen=true
|
||||||
|
// +groupName=discovery.k8s.io
|
||||||
|
|
||||||
|
package v1beta1 // import "k8s.io/api/discovery/v1beta1"
|
1730
staging/src/k8s.io/api/discovery/v1beta1/generated.pb.go
generated
Normal file
1730
staging/src/k8s.io/api/discovery/v1beta1/generated.pb.go
generated
Normal file
File diff suppressed because it is too large
Load Diff
157
staging/src/k8s.io/api/discovery/v1beta1/generated.proto
Normal file
157
staging/src/k8s.io/api/discovery/v1beta1/generated.proto
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
|
||||||
|
|
||||||
|
syntax = 'proto2';
|
||||||
|
|
||||||
|
package k8s.io.api.discovery.v1beta1;
|
||||||
|
|
||||||
|
import "k8s.io/api/core/v1/generated.proto";
|
||||||
|
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
|
||||||
|
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
|
||||||
|
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
|
||||||
|
|
||||||
|
// Package-wide variables from generator "generated".
|
||||||
|
option go_package = "v1beta1";
|
||||||
|
|
||||||
|
// Endpoint represents a single logical "backend" implementing a service.
|
||||||
|
message Endpoint {
|
||||||
|
// addresses of this endpoint. The contents of this field are interpreted
|
||||||
|
// according to the corresponding EndpointSlice addressType field. Consumers
|
||||||
|
// must handle different types of addresses in the context of their own
|
||||||
|
// capabilities. This must contain at least one address but no more than
|
||||||
|
// 100.
|
||||||
|
// +listType=set
|
||||||
|
repeated string addresses = 1;
|
||||||
|
|
||||||
|
// conditions contains information about the current status of the endpoint.
|
||||||
|
optional EndpointConditions conditions = 2;
|
||||||
|
|
||||||
|
// hostname of this endpoint. This field may be used by consumers of
|
||||||
|
// endpoints to distinguish endpoints from each other (e.g. in DNS names).
|
||||||
|
// Multiple endpoints which use the same hostname should be considered
|
||||||
|
// fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123)
|
||||||
|
// validation.
|
||||||
|
// +optional
|
||||||
|
optional string hostname = 3;
|
||||||
|
|
||||||
|
// targetRef is a reference to a Kubernetes object that represents this
|
||||||
|
// endpoint.
|
||||||
|
// +optional
|
||||||
|
optional k8s.io.api.core.v1.ObjectReference targetRef = 4;
|
||||||
|
|
||||||
|
// topology contains arbitrary topology information associated with the
|
||||||
|
// endpoint. These key/value pairs must conform with the label format.
|
||||||
|
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
|
||||||
|
// Topology may include a maximum of 16 key/value pairs. This includes, but
|
||||||
|
// is not limited to the following well known keys:
|
||||||
|
// * kubernetes.io/hostname: the value indicates the hostname of the node
|
||||||
|
// where the endpoint is located. This should match the corresponding
|
||||||
|
// node label.
|
||||||
|
// * topology.kubernetes.io/zone: the value indicates the zone where the
|
||||||
|
// endpoint is located. This should match the corresponding node label.
|
||||||
|
// * topology.kubernetes.io/region: the value indicates the region where the
|
||||||
|
// endpoint is located. This should match the corresponding node label.
|
||||||
|
// +optional
|
||||||
|
map<string, string> topology = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// EndpointConditions represents the current condition of an endpoint.
|
||||||
|
message EndpointConditions {
|
||||||
|
// ready indicates that this endpoint is prepared to receive traffic,
|
||||||
|
// according to whatever system is managing the endpoint. A nil value
|
||||||
|
// indicates an unknown state. In most cases consumers should interpret this
|
||||||
|
// unknown state as ready.
|
||||||
|
// +optional
|
||||||
|
optional bool ready = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// EndpointPort represents a Port used by an EndpointSlice
|
||||||
|
message EndpointPort {
|
||||||
|
// The name of this port. All ports in an EndpointSlice must have a unique
|
||||||
|
// name. If the EndpointSlice is dervied from a Kubernetes service, this
|
||||||
|
// corresponds to the Service.ports[].name.
|
||||||
|
// Name must either be an empty string or pass DNS_LABEL validation:
|
||||||
|
// * must be no more than 63 characters long.
|
||||||
|
// * must consist of lower case alphanumeric characters or '-'.
|
||||||
|
// * must start and end with an alphanumeric character.
|
||||||
|
// Default is empty string.
|
||||||
|
optional string name = 1;
|
||||||
|
|
||||||
|
// The IP protocol for this port.
|
||||||
|
// Must be UDP, TCP, or SCTP.
|
||||||
|
// Default is TCP.
|
||||||
|
optional string protocol = 2;
|
||||||
|
|
||||||
|
// The port number of the endpoint.
|
||||||
|
// If this is not specified, ports are not restricted and must be
|
||||||
|
// interpreted in the context of the specific consumer.
|
||||||
|
optional int32 port = 3;
|
||||||
|
|
||||||
|
// The application protocol for this port.
|
||||||
|
// This field follows standard Kubernetes label syntax.
|
||||||
|
// Un-prefixed names are reserved for IANA standard service names (as per
|
||||||
|
// RFC-6335 and http://www.iana.org/assignments/service-names).
|
||||||
|
// Non-standard protocols should use prefixed names.
|
||||||
|
// Default is empty string.
|
||||||
|
optional string appProtocol = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// EndpointSlice represents a subset of the endpoints that implement a service.
|
||||||
|
// For a given service there may be multiple EndpointSlice objects, selected by
|
||||||
|
// labels, which must be joined to produce the full set of endpoints.
|
||||||
|
message EndpointSlice {
|
||||||
|
// Standard object's metadata.
|
||||||
|
// +optional
|
||||||
|
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||||
|
|
||||||
|
// addressType specifies the type of address carried by this EndpointSlice.
|
||||||
|
// All addresses in this slice must be the same type. This field is
|
||||||
|
// immutable after creation. The following address types are currently
|
||||||
|
// supported:
|
||||||
|
// * IPv4: Represents an IPv4 Address.
|
||||||
|
// * IPv6: Represents an IPv6 Address.
|
||||||
|
// * FQDN: Represents a Fully Qualified Domain Name.
|
||||||
|
optional string addressType = 4;
|
||||||
|
|
||||||
|
// endpoints is a list of unique endpoints in this slice. Each slice may
|
||||||
|
// include a maximum of 1000 endpoints.
|
||||||
|
// +listType=atomic
|
||||||
|
repeated Endpoint endpoints = 2;
|
||||||
|
|
||||||
|
// ports specifies the list of network ports exposed by each endpoint in
|
||||||
|
// this slice. Each port must have a unique name. When ports is empty, it
|
||||||
|
// indicates that there are no defined ports. When a port is defined with a
|
||||||
|
// nil port value, it indicates "all ports". Each slice may include a
|
||||||
|
// maximum of 100 ports.
|
||||||
|
// +optional
|
||||||
|
// +listType=atomic
|
||||||
|
repeated EndpointPort ports = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// EndpointSliceList represents a list of endpoint slices
|
||||||
|
message EndpointSliceList {
|
||||||
|
// Standard list metadata.
|
||||||
|
// +optional
|
||||||
|
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||||
|
|
||||||
|
// List of endpoint slices
|
||||||
|
// +listType=set
|
||||||
|
repeated EndpointSlice items = 2;
|
||||||
|
}
|
||||||
|
|
56
staging/src/k8s.io/api/discovery/v1beta1/register.go
Normal file
56
staging/src/k8s.io/api/discovery/v1beta1/register.go
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GroupName is the group name used in this package
|
||||||
|
const GroupName = "discovery.k8s.io"
|
||||||
|
|
||||||
|
// SchemeGroupVersion is group version used to register these objects
|
||||||
|
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
|
||||||
|
|
||||||
|
// Kind takes an unqualified kind and returns a Group qualified GroupKind
|
||||||
|
func Kind(kind string) schema.GroupKind {
|
||||||
|
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||||
|
func Resource(resource string) schema.GroupResource {
|
||||||
|
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
// SchemeBuilder is the scheme builder with scheme init functions to run for this API package
|
||||||
|
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||||
|
// AddToScheme is a common registration function for mapping packaged scoped group & version keys to a scheme
|
||||||
|
AddToScheme = SchemeBuilder.AddToScheme
|
||||||
|
)
|
||||||
|
|
||||||
|
// Adds the list of known types to the given scheme.
|
||||||
|
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||||
|
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||||
|
&EndpointSlice{},
|
||||||
|
&EndpointSliceList{},
|
||||||
|
)
|
||||||
|
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||||
|
return nil
|
||||||
|
}
|
162
staging/src/k8s.io/api/discovery/v1beta1/types.go
Normal file
162
staging/src/k8s.io/api/discovery/v1beta1/types.go
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/core/v1"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// +genclient
|
||||||
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|
||||||
|
// EndpointSlice represents a subset of the endpoints that implement a service.
|
||||||
|
// For a given service there may be multiple EndpointSlice objects, selected by
|
||||||
|
// labels, which must be joined to produce the full set of endpoints.
|
||||||
|
type EndpointSlice struct {
|
||||||
|
metav1.TypeMeta `json:",inline"`
|
||||||
|
// Standard object's metadata.
|
||||||
|
// +optional
|
||||||
|
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
// addressType specifies the type of address carried by this EndpointSlice.
|
||||||
|
// All addresses in this slice must be the same type. This field is
|
||||||
|
// immutable after creation. The following address types are currently
|
||||||
|
// supported:
|
||||||
|
// * IPv4: Represents an IPv4 Address.
|
||||||
|
// * IPv6: Represents an IPv6 Address.
|
||||||
|
// * FQDN: Represents a Fully Qualified Domain Name.
|
||||||
|
AddressType AddressType `json:"addressType" protobuf:"bytes,4,rep,name=addressType"`
|
||||||
|
// endpoints is a list of unique endpoints in this slice. Each slice may
|
||||||
|
// include a maximum of 1000 endpoints.
|
||||||
|
// +listType=atomic
|
||||||
|
Endpoints []Endpoint `json:"endpoints" protobuf:"bytes,2,rep,name=endpoints"`
|
||||||
|
// ports specifies the list of network ports exposed by each endpoint in
|
||||||
|
// this slice. Each port must have a unique name. When ports is empty, it
|
||||||
|
// indicates that there are no defined ports. When a port is defined with a
|
||||||
|
// nil port value, it indicates "all ports". Each slice may include a
|
||||||
|
// maximum of 100 ports.
|
||||||
|
// +optional
|
||||||
|
// +listType=atomic
|
||||||
|
Ports []EndpointPort `json:"ports" protobuf:"bytes,3,rep,name=ports"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddressType represents the type of address referred to by an endpoint.
|
||||||
|
type AddressType string
|
||||||
|
|
||||||
|
const (
|
||||||
|
// AddressTypeIP represents an IP Address.
|
||||||
|
// This address type has been deprecated and has been replaced by the IPv4
|
||||||
|
// and IPv6 adddress types. New resources with this address type will be
|
||||||
|
// considered invalid. This will be fully removed in 1.18.
|
||||||
|
// +deprecated
|
||||||
|
AddressTypeIP = AddressType("IP")
|
||||||
|
// AddressTypeIPv4 represents an IPv4 Address.
|
||||||
|
AddressTypeIPv4 = AddressType(v1.IPv4Protocol)
|
||||||
|
// AddressTypeIPv6 represents an IPv6 Address.
|
||||||
|
AddressTypeIPv6 = AddressType(v1.IPv6Protocol)
|
||||||
|
// AddressTypeFQDN represents a FQDN.
|
||||||
|
AddressTypeFQDN = AddressType("FQDN")
|
||||||
|
)
|
||||||
|
|
||||||
|
// Endpoint represents a single logical "backend" implementing a service.
|
||||||
|
type Endpoint struct {
|
||||||
|
// addresses of this endpoint. The contents of this field are interpreted
|
||||||
|
// according to the corresponding EndpointSlice addressType field. Consumers
|
||||||
|
// must handle different types of addresses in the context of their own
|
||||||
|
// capabilities. This must contain at least one address but no more than
|
||||||
|
// 100.
|
||||||
|
// +listType=set
|
||||||
|
Addresses []string `json:"addresses" protobuf:"bytes,1,rep,name=addresses"`
|
||||||
|
// conditions contains information about the current status of the endpoint.
|
||||||
|
Conditions EndpointConditions `json:"conditions,omitempty" protobuf:"bytes,2,opt,name=conditions"`
|
||||||
|
// hostname of this endpoint. This field may be used by consumers of
|
||||||
|
// endpoints to distinguish endpoints from each other (e.g. in DNS names).
|
||||||
|
// Multiple endpoints which use the same hostname should be considered
|
||||||
|
// fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123)
|
||||||
|
// validation.
|
||||||
|
// +optional
|
||||||
|
Hostname *string `json:"hostname,omitempty" protobuf:"bytes,3,opt,name=hostname"`
|
||||||
|
// targetRef is a reference to a Kubernetes object that represents this
|
||||||
|
// endpoint.
|
||||||
|
// +optional
|
||||||
|
TargetRef *v1.ObjectReference `json:"targetRef,omitempty" protobuf:"bytes,4,opt,name=targetRef"`
|
||||||
|
// topology contains arbitrary topology information associated with the
|
||||||
|
// endpoint. These key/value pairs must conform with the label format.
|
||||||
|
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
|
||||||
|
// Topology may include a maximum of 16 key/value pairs. This includes, but
|
||||||
|
// is not limited to the following well known keys:
|
||||||
|
// * kubernetes.io/hostname: the value indicates the hostname of the node
|
||||||
|
// where the endpoint is located. This should match the corresponding
|
||||||
|
// node label.
|
||||||
|
// * topology.kubernetes.io/zone: the value indicates the zone where the
|
||||||
|
// endpoint is located. This should match the corresponding node label.
|
||||||
|
// * topology.kubernetes.io/region: the value indicates the region where the
|
||||||
|
// endpoint is located. This should match the corresponding node label.
|
||||||
|
// +optional
|
||||||
|
Topology map[string]string `json:"topology,omitempty" protobuf:"bytes,5,opt,name=topology"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// EndpointConditions represents the current condition of an endpoint.
|
||||||
|
type EndpointConditions struct {
|
||||||
|
// ready indicates that this endpoint is prepared to receive traffic,
|
||||||
|
// according to whatever system is managing the endpoint. A nil value
|
||||||
|
// indicates an unknown state. In most cases consumers should interpret this
|
||||||
|
// unknown state as ready.
|
||||||
|
// +optional
|
||||||
|
Ready *bool `json:"ready,omitempty" protobuf:"bytes,1,name=ready"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// EndpointPort represents a Port used by an EndpointSlice
|
||||||
|
type EndpointPort struct {
|
||||||
|
// The name of this port. All ports in an EndpointSlice must have a unique
|
||||||
|
// name. If the EndpointSlice is dervied from a Kubernetes service, this
|
||||||
|
// corresponds to the Service.ports[].name.
|
||||||
|
// Name must either be an empty string or pass DNS_LABEL validation:
|
||||||
|
// * must be no more than 63 characters long.
|
||||||
|
// * must consist of lower case alphanumeric characters or '-'.
|
||||||
|
// * must start and end with an alphanumeric character.
|
||||||
|
// Default is empty string.
|
||||||
|
Name *string `json:"name,omitempty" protobuf:"bytes,1,name=name"`
|
||||||
|
// The IP protocol for this port.
|
||||||
|
// Must be UDP, TCP, or SCTP.
|
||||||
|
// Default is TCP.
|
||||||
|
Protocol *v1.Protocol `json:"protocol,omitempty" protobuf:"bytes,2,name=protocol"`
|
||||||
|
// The port number of the endpoint.
|
||||||
|
// If this is not specified, ports are not restricted and must be
|
||||||
|
// interpreted in the context of the specific consumer.
|
||||||
|
Port *int32 `json:"port,omitempty" protobuf:"bytes,3,opt,name=port"`
|
||||||
|
// The application protocol for this port.
|
||||||
|
// This field follows standard Kubernetes label syntax.
|
||||||
|
// Un-prefixed names are reserved for IANA standard service names (as per
|
||||||
|
// RFC-6335 and http://www.iana.org/assignments/service-names).
|
||||||
|
// Non-standard protocols should use prefixed names.
|
||||||
|
// Default is empty string.
|
||||||
|
AppProtocol *string `json:"appProtocol,omitempty" protobuf:"bytes,4,name=appProtocol"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|
||||||
|
// EndpointSliceList represents a list of endpoint slices
|
||||||
|
type EndpointSliceList struct {
|
||||||
|
metav1.TypeMeta `json:",inline"`
|
||||||
|
// Standard list metadata.
|
||||||
|
// +optional
|
||||||
|
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
// List of endpoint slices
|
||||||
|
// +listType=set
|
||||||
|
Items []EndpointSlice `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||||
|
}
|
86
staging/src/k8s.io/api/discovery/v1beta1/types_swagger_doc_generated.go
generated
Normal file
86
staging/src/k8s.io/api/discovery/v1beta1/types_swagger_doc_generated.go
generated
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
// This file contains a collection of methods that can be used from go-restful to
|
||||||
|
// generate Swagger API documentation for its models. Please read this PR for more
|
||||||
|
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||||
|
//
|
||||||
|
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||||
|
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||||
|
// Any context after a --- is ignored.
|
||||||
|
//
|
||||||
|
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||||
|
|
||||||
|
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
|
||||||
|
var map_Endpoint = map[string]string{
|
||||||
|
"": "Endpoint represents a single logical \"backend\" implementing a service.",
|
||||||
|
"addresses": "addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.",
|
||||||
|
"conditions": "conditions contains information about the current status of the endpoint.",
|
||||||
|
"hostname": "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) validation.",
|
||||||
|
"targetRef": "targetRef is a reference to a Kubernetes object that represents this endpoint.",
|
||||||
|
"topology": "topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node\n where the endpoint is located. This should match the corresponding\n node label.\n* topology.kubernetes.io/zone: the value indicates the zone where the\n endpoint is located. This should match the corresponding node label.\n* topology.kubernetes.io/region: the value indicates the region where the\n endpoint is located. This should match the corresponding node label.",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (Endpoint) SwaggerDoc() map[string]string {
|
||||||
|
return map_Endpoint
|
||||||
|
}
|
||||||
|
|
||||||
|
var map_EndpointConditions = map[string]string{
|
||||||
|
"": "EndpointConditions represents the current condition of an endpoint.",
|
||||||
|
"ready": "ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready.",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (EndpointConditions) SwaggerDoc() map[string]string {
|
||||||
|
return map_EndpointConditions
|
||||||
|
}
|
||||||
|
|
||||||
|
var map_EndpointPort = map[string]string{
|
||||||
|
"": "EndpointPort represents a Port used by an EndpointSlice",
|
||||||
|
"name": "The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.",
|
||||||
|
"protocol": "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.",
|
||||||
|
"port": "The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.",
|
||||||
|
"appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names. Default is empty string.",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (EndpointPort) SwaggerDoc() map[string]string {
|
||||||
|
return map_EndpointPort
|
||||||
|
}
|
||||||
|
|
||||||
|
var map_EndpointSlice = map[string]string{
|
||||||
|
"": "EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.",
|
||||||
|
"metadata": "Standard object's metadata.",
|
||||||
|
"addressType": "addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.",
|
||||||
|
"endpoints": "endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.",
|
||||||
|
"ports": "ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates \"all ports\". Each slice may include a maximum of 100 ports.",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (EndpointSlice) SwaggerDoc() map[string]string {
|
||||||
|
return map_EndpointSlice
|
||||||
|
}
|
||||||
|
|
||||||
|
var map_EndpointSliceList = map[string]string{
|
||||||
|
"": "EndpointSliceList represents a list of endpoint slices",
|
||||||
|
"metadata": "Standard list metadata.",
|
||||||
|
"items": "List of endpoint slices",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (EndpointSliceList) SwaggerDoc() map[string]string {
|
||||||
|
return map_EndpointSliceList
|
||||||
|
}
|
||||||
|
|
||||||
|
// AUTO-GENERATED FUNCTIONS END HERE
|
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
const (
|
||||||
|
// LabelServiceName is used to indicate the name of a Kubernetes service.
|
||||||
|
LabelServiceName = "kubernetes.io/service-name"
|
||||||
|
// LabelManagedBy is used to indicate the controller or entity that manages
|
||||||
|
// an EndpointSlice. This label aims to enable different EndpointSlice
|
||||||
|
// objects to be managed by different controllers or entities within the
|
||||||
|
// same cluster. It is highly recommended to configure this label for all
|
||||||
|
// EndpointSlices.
|
||||||
|
LabelManagedBy = "endpointslice.kubernetes.io/managed-by"
|
||||||
|
)
|
195
staging/src/k8s.io/api/discovery/v1beta1/zz_generated.deepcopy.go
generated
Normal file
195
staging/src/k8s.io/api/discovery/v1beta1/zz_generated.deepcopy.go
generated
Normal file
@ -0,0 +1,195 @@
|
|||||||
|
// +build !ignore_autogenerated
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/core/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *Endpoint) DeepCopyInto(out *Endpoint) {
|
||||||
|
*out = *in
|
||||||
|
if in.Addresses != nil {
|
||||||
|
in, out := &in.Addresses, &out.Addresses
|
||||||
|
*out = make([]string, len(*in))
|
||||||
|
copy(*out, *in)
|
||||||
|
}
|
||||||
|
in.Conditions.DeepCopyInto(&out.Conditions)
|
||||||
|
if in.Hostname != nil {
|
||||||
|
in, out := &in.Hostname, &out.Hostname
|
||||||
|
*out = new(string)
|
||||||
|
**out = **in
|
||||||
|
}
|
||||||
|
if in.TargetRef != nil {
|
||||||
|
in, out := &in.TargetRef, &out.TargetRef
|
||||||
|
*out = new(v1.ObjectReference)
|
||||||
|
**out = **in
|
||||||
|
}
|
||||||
|
if in.Topology != nil {
|
||||||
|
in, out := &in.Topology, &out.Topology
|
||||||
|
*out = make(map[string]string, len(*in))
|
||||||
|
for key, val := range *in {
|
||||||
|
(*out)[key] = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint.
|
||||||
|
func (in *Endpoint) DeepCopy() *Endpoint {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(Endpoint)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *EndpointConditions) DeepCopyInto(out *EndpointConditions) {
|
||||||
|
*out = *in
|
||||||
|
if in.Ready != nil {
|
||||||
|
in, out := &in.Ready, &out.Ready
|
||||||
|
*out = new(bool)
|
||||||
|
**out = **in
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointConditions.
|
||||||
|
func (in *EndpointConditions) DeepCopy() *EndpointConditions {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(EndpointConditions)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *EndpointPort) DeepCopyInto(out *EndpointPort) {
|
||||||
|
*out = *in
|
||||||
|
if in.Name != nil {
|
||||||
|
in, out := &in.Name, &out.Name
|
||||||
|
*out = new(string)
|
||||||
|
**out = **in
|
||||||
|
}
|
||||||
|
if in.Protocol != nil {
|
||||||
|
in, out := &in.Protocol, &out.Protocol
|
||||||
|
*out = new(v1.Protocol)
|
||||||
|
**out = **in
|
||||||
|
}
|
||||||
|
if in.Port != nil {
|
||||||
|
in, out := &in.Port, &out.Port
|
||||||
|
*out = new(int32)
|
||||||
|
**out = **in
|
||||||
|
}
|
||||||
|
if in.AppProtocol != nil {
|
||||||
|
in, out := &in.AppProtocol, &out.AppProtocol
|
||||||
|
*out = new(string)
|
||||||
|
**out = **in
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointPort.
|
||||||
|
func (in *EndpointPort) DeepCopy() *EndpointPort {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(EndpointPort)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *EndpointSlice) DeepCopyInto(out *EndpointSlice) {
|
||||||
|
*out = *in
|
||||||
|
out.TypeMeta = in.TypeMeta
|
||||||
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||||
|
if in.Endpoints != nil {
|
||||||
|
in, out := &in.Endpoints, &out.Endpoints
|
||||||
|
*out = make([]Endpoint, len(*in))
|
||||||
|
for i := range *in {
|
||||||
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if in.Ports != nil {
|
||||||
|
in, out := &in.Ports, &out.Ports
|
||||||
|
*out = make([]EndpointPort, len(*in))
|
||||||
|
for i := range *in {
|
||||||
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSlice.
|
||||||
|
func (in *EndpointSlice) DeepCopy() *EndpointSlice {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(EndpointSlice)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||||
|
func (in *EndpointSlice) DeepCopyObject() runtime.Object {
|
||||||
|
if c := in.DeepCopy(); c != nil {
|
||||||
|
return c
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *EndpointSliceList) DeepCopyInto(out *EndpointSliceList) {
|
||||||
|
*out = *in
|
||||||
|
out.TypeMeta = in.TypeMeta
|
||||||
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||||
|
if in.Items != nil {
|
||||||
|
in, out := &in.Items, &out.Items
|
||||||
|
*out = make([]EndpointSlice, len(*in))
|
||||||
|
for i := range *in {
|
||||||
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSliceList.
|
||||||
|
func (in *EndpointSliceList) DeepCopy() *EndpointSliceList {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(EndpointSliceList)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||||
|
func (in *EndpointSliceList) DeepCopyObject() runtime.Object {
|
||||||
|
if c := in.DeepCopy(); c != nil {
|
||||||
|
return c
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
@ -42,6 +42,7 @@ filegroup(
|
|||||||
"//staging/src/k8s.io/client-go/listers/coordination/v1beta1:all-srcs",
|
"//staging/src/k8s.io/client-go/listers/coordination/v1beta1:all-srcs",
|
||||||
"//staging/src/k8s.io/client-go/listers/core/v1:all-srcs",
|
"//staging/src/k8s.io/client-go/listers/core/v1:all-srcs",
|
||||||
"//staging/src/k8s.io/client-go/listers/discovery/v1alpha1:all-srcs",
|
"//staging/src/k8s.io/client-go/listers/discovery/v1alpha1:all-srcs",
|
||||||
|
"//staging/src/k8s.io/client-go/listers/discovery/v1beta1:all-srcs",
|
||||||
"//staging/src/k8s.io/client-go/listers/events/v1beta1:all-srcs",
|
"//staging/src/k8s.io/client-go/listers/events/v1beta1:all-srcs",
|
||||||
"//staging/src/k8s.io/client-go/listers/extensions/v1beta1:all-srcs",
|
"//staging/src/k8s.io/client-go/listers/extensions/v1beta1:all-srcs",
|
||||||
"//staging/src/k8s.io/client-go/listers/flowcontrol/v1alpha1:all-srcs",
|
"//staging/src/k8s.io/client-go/listers/flowcontrol/v1alpha1:all-srcs",
|
||||||
|
@ -27,6 +27,7 @@ go_library(
|
|||||||
"//staging/src/k8s.io/api/coordination/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/coordination/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/events/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/events/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/extensions/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/extensions/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/flowcontrol/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/flowcontrol/v1alpha1:go_default_library",
|
||||||
|
@ -8,6 +8,7 @@ go_library(
|
|||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
"//staging/src/k8s.io/client-go/informers/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/client-go/informers/discovery/v1alpha1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/client-go/informers/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/informers/internalinterfaces:go_default_library",
|
"//staging/src/k8s.io/client-go/informers/internalinterfaces:go_default_library",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@ -24,6 +25,7 @@ filegroup(
|
|||||||
srcs = [
|
srcs = [
|
||||||
":package-srcs",
|
":package-srcs",
|
||||||
"//staging/src/k8s.io/client-go/informers/discovery/v1alpha1:all-srcs",
|
"//staging/src/k8s.io/client-go/informers/discovery/v1alpha1:all-srcs",
|
||||||
|
"//staging/src/k8s.io/client-go/informers/discovery/v1beta1:all-srcs",
|
||||||
],
|
],
|
||||||
tags = ["automanaged"],
|
tags = ["automanaged"],
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
|
@ -20,6 +20,7 @@ package discovery
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
v1alpha1 "k8s.io/client-go/informers/discovery/v1alpha1"
|
v1alpha1 "k8s.io/client-go/informers/discovery/v1alpha1"
|
||||||
|
v1beta1 "k8s.io/client-go/informers/discovery/v1beta1"
|
||||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -27,6 +28,8 @@ import (
|
|||||||
type Interface interface {
|
type Interface interface {
|
||||||
// V1alpha1 provides access to shared informers for resources in V1alpha1.
|
// V1alpha1 provides access to shared informers for resources in V1alpha1.
|
||||||
V1alpha1() v1alpha1.Interface
|
V1alpha1() v1alpha1.Interface
|
||||||
|
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||||
|
V1beta1() v1beta1.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
type group struct {
|
type group struct {
|
||||||
@ -44,3 +47,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
|||||||
func (g *group) V1alpha1() v1alpha1.Interface {
|
func (g *group) V1alpha1() v1alpha1.Interface {
|
||||||
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
|
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// V1beta1 returns a new v1beta1.Interface.
|
||||||
|
func (g *group) V1beta1() v1beta1.Interface {
|
||||||
|
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||||
|
}
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"endpointslice.go",
|
||||||
|
"interface.go",
|
||||||
|
],
|
||||||
|
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/informers/discovery/v1beta1",
|
||||||
|
importpath = "k8s.io/client-go/informers/discovery/v1beta1",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||||
|
"//staging/src/k8s.io/client-go/informers/internalinterfaces:go_default_library",
|
||||||
|
"//staging/src/k8s.io/client-go/kubernetes:go_default_library",
|
||||||
|
"//staging/src/k8s.io/client-go/listers/discovery/v1beta1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/client-go/tools/cache:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "package-srcs",
|
||||||
|
srcs = glob(["**"]),
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all-srcs",
|
||||||
|
srcs = [":package-srcs"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
@ -0,0 +1,89 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
time "time"
|
||||||
|
|
||||||
|
discoveryv1beta1 "k8s.io/api/discovery/v1beta1"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
kubernetes "k8s.io/client-go/kubernetes"
|
||||||
|
v1beta1 "k8s.io/client-go/listers/discovery/v1beta1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
)
|
||||||
|
|
||||||
|
// EndpointSliceInformer provides access to a shared informer and lister for
|
||||||
|
// EndpointSlices.
|
||||||
|
type EndpointSliceInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1beta1.EndpointSliceLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type endpointSliceInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||||
|
namespace string
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewEndpointSliceInformer constructs a new informer for EndpointSlice type.
|
||||||
|
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||||
|
// one. This reduces memory footprint and number of connections to the server.
|
||||||
|
func NewEndpointSliceInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||||
|
return NewFilteredEndpointSliceInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewFilteredEndpointSliceInformer constructs a new informer for EndpointSlice type.
|
||||||
|
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||||
|
// one. This reduces memory footprint and number of connections to the server.
|
||||||
|
func NewFilteredEndpointSliceInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||||
|
return cache.NewSharedIndexInformer(
|
||||||
|
&cache.ListWatch{
|
||||||
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||||
|
if tweakListOptions != nil {
|
||||||
|
tweakListOptions(&options)
|
||||||
|
}
|
||||||
|
return client.DiscoveryV1beta1().EndpointSlices(namespace).List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
if tweakListOptions != nil {
|
||||||
|
tweakListOptions(&options)
|
||||||
|
}
|
||||||
|
return client.DiscoveryV1beta1().EndpointSlices(namespace).Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&discoveryv1beta1.EndpointSlice{},
|
||||||
|
resyncPeriod,
|
||||||
|
indexers,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *endpointSliceInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
return NewFilteredEndpointSliceInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *endpointSliceInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&discoveryv1beta1.EndpointSlice{}, f.defaultInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *endpointSliceInformer) Lister() v1beta1.EndpointSliceLister {
|
||||||
|
return v1beta1.NewEndpointSliceLister(f.Informer().GetIndexer())
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by informer-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Interface provides access to all the informers in this group version.
|
||||||
|
type Interface interface {
|
||||||
|
// EndpointSlices returns a EndpointSliceInformer.
|
||||||
|
EndpointSlices() EndpointSliceInformer
|
||||||
|
}
|
||||||
|
|
||||||
|
type version struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
namespace string
|
||||||
|
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a new Interface.
|
||||||
|
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||||
|
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||||
|
}
|
||||||
|
|
||||||
|
// EndpointSlices returns a EndpointSliceInformer.
|
||||||
|
func (v *version) EndpointSlices() EndpointSliceInformer {
|
||||||
|
return &endpointSliceInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||||
|
}
|
@ -38,6 +38,7 @@ import (
|
|||||||
coordinationv1beta1 "k8s.io/api/coordination/v1beta1"
|
coordinationv1beta1 "k8s.io/api/coordination/v1beta1"
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1"
|
discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1"
|
||||||
|
discoveryv1beta1 "k8s.io/api/discovery/v1beta1"
|
||||||
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
||||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||||
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
||||||
@ -208,6 +209,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
|||||||
case discoveryv1alpha1.SchemeGroupVersion.WithResource("endpointslices"):
|
case discoveryv1alpha1.SchemeGroupVersion.WithResource("endpointslices"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Discovery().V1alpha1().EndpointSlices().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Discovery().V1alpha1().EndpointSlices().Informer()}, nil
|
||||||
|
|
||||||
|
// Group=discovery.k8s.io, Version=v1beta1
|
||||||
|
case discoveryv1beta1.SchemeGroupVersion.WithResource("endpointslices"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Discovery().V1beta1().EndpointSlices().Informer()}, nil
|
||||||
|
|
||||||
// Group=events.k8s.io, Version=v1beta1
|
// Group=events.k8s.io, Version=v1beta1
|
||||||
case eventsv1beta1.SchemeGroupVersion.WithResource("events"):
|
case eventsv1beta1.SchemeGroupVersion.WithResource("events"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Events().V1beta1().Events().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Events().V1beta1().Events().Informer()}, nil
|
||||||
|
@ -33,6 +33,7 @@ go_library(
|
|||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1:go_default_library",
|
||||||
@ -90,6 +91,7 @@ filegroup(
|
|||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1:all-srcs",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1:all-srcs",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:all-srcs",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:all-srcs",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1:all-srcs",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1:all-srcs",
|
||||||
|
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1:all-srcs",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1:all-srcs",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1:all-srcs",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:all-srcs",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:all-srcs",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1:all-srcs",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1:all-srcs",
|
||||||
|
@ -43,6 +43,7 @@ import (
|
|||||||
coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1"
|
coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1"
|
||||||
corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
|
corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
|
||||||
discoveryv1alpha1 "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1"
|
discoveryv1alpha1 "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1"
|
||||||
|
discoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1"
|
||||||
eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
|
eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
|
||||||
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
|
||||||
flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1"
|
flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1"
|
||||||
@ -88,6 +89,7 @@ type Interface interface {
|
|||||||
CoordinationV1() coordinationv1.CoordinationV1Interface
|
CoordinationV1() coordinationv1.CoordinationV1Interface
|
||||||
CoreV1() corev1.CoreV1Interface
|
CoreV1() corev1.CoreV1Interface
|
||||||
DiscoveryV1alpha1() discoveryv1alpha1.DiscoveryV1alpha1Interface
|
DiscoveryV1alpha1() discoveryv1alpha1.DiscoveryV1alpha1Interface
|
||||||
|
DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface
|
||||||
EventsV1beta1() eventsv1beta1.EventsV1beta1Interface
|
EventsV1beta1() eventsv1beta1.EventsV1beta1Interface
|
||||||
ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
|
ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
|
||||||
FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface
|
FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface
|
||||||
@ -133,6 +135,7 @@ type Clientset struct {
|
|||||||
coordinationV1 *coordinationv1.CoordinationV1Client
|
coordinationV1 *coordinationv1.CoordinationV1Client
|
||||||
coreV1 *corev1.CoreV1Client
|
coreV1 *corev1.CoreV1Client
|
||||||
discoveryV1alpha1 *discoveryv1alpha1.DiscoveryV1alpha1Client
|
discoveryV1alpha1 *discoveryv1alpha1.DiscoveryV1alpha1Client
|
||||||
|
discoveryV1beta1 *discoveryv1beta1.DiscoveryV1beta1Client
|
||||||
eventsV1beta1 *eventsv1beta1.EventsV1beta1Client
|
eventsV1beta1 *eventsv1beta1.EventsV1beta1Client
|
||||||
extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client
|
extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client
|
||||||
flowcontrolV1alpha1 *flowcontrolv1alpha1.FlowcontrolV1alpha1Client
|
flowcontrolV1alpha1 *flowcontrolv1alpha1.FlowcontrolV1alpha1Client
|
||||||
@ -258,6 +261,11 @@ func (c *Clientset) DiscoveryV1alpha1() discoveryv1alpha1.DiscoveryV1alpha1Inter
|
|||||||
return c.discoveryV1alpha1
|
return c.discoveryV1alpha1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DiscoveryV1beta1 retrieves the DiscoveryV1beta1Client
|
||||||
|
func (c *Clientset) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface {
|
||||||
|
return c.discoveryV1beta1
|
||||||
|
}
|
||||||
|
|
||||||
// EventsV1beta1 retrieves the EventsV1beta1Client
|
// EventsV1beta1 retrieves the EventsV1beta1Client
|
||||||
func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface {
|
func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface {
|
||||||
return c.eventsV1beta1
|
return c.eventsV1beta1
|
||||||
@ -453,6 +461,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
cs.discoveryV1beta1, err = discoveryv1beta1.NewForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
cs.eventsV1beta1, err = eventsv1beta1.NewForConfig(&configShallowCopy)
|
cs.eventsV1beta1, err = eventsv1beta1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -558,6 +570,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
|||||||
cs.coordinationV1 = coordinationv1.NewForConfigOrDie(c)
|
cs.coordinationV1 = coordinationv1.NewForConfigOrDie(c)
|
||||||
cs.coreV1 = corev1.NewForConfigOrDie(c)
|
cs.coreV1 = corev1.NewForConfigOrDie(c)
|
||||||
cs.discoveryV1alpha1 = discoveryv1alpha1.NewForConfigOrDie(c)
|
cs.discoveryV1alpha1 = discoveryv1alpha1.NewForConfigOrDie(c)
|
||||||
|
cs.discoveryV1beta1 = discoveryv1beta1.NewForConfigOrDie(c)
|
||||||
cs.eventsV1beta1 = eventsv1beta1.NewForConfigOrDie(c)
|
cs.eventsV1beta1 = eventsv1beta1.NewForConfigOrDie(c)
|
||||||
cs.extensionsV1beta1 = extensionsv1beta1.NewForConfigOrDie(c)
|
cs.extensionsV1beta1 = extensionsv1beta1.NewForConfigOrDie(c)
|
||||||
cs.flowcontrolV1alpha1 = flowcontrolv1alpha1.NewForConfigOrDie(c)
|
cs.flowcontrolV1alpha1 = flowcontrolv1alpha1.NewForConfigOrDie(c)
|
||||||
@ -605,6 +618,7 @@ func New(c rest.Interface) *Clientset {
|
|||||||
cs.coordinationV1 = coordinationv1.New(c)
|
cs.coordinationV1 = coordinationv1.New(c)
|
||||||
cs.coreV1 = corev1.New(c)
|
cs.coreV1 = corev1.New(c)
|
||||||
cs.discoveryV1alpha1 = discoveryv1alpha1.New(c)
|
cs.discoveryV1alpha1 = discoveryv1alpha1.New(c)
|
||||||
|
cs.discoveryV1beta1 = discoveryv1beta1.New(c)
|
||||||
cs.eventsV1beta1 = eventsv1beta1.New(c)
|
cs.eventsV1beta1 = eventsv1beta1.New(c)
|
||||||
cs.extensionsV1beta1 = extensionsv1beta1.New(c)
|
cs.extensionsV1beta1 = extensionsv1beta1.New(c)
|
||||||
cs.flowcontrolV1alpha1 = flowcontrolv1alpha1.New(c)
|
cs.flowcontrolV1alpha1 = flowcontrolv1alpha1.New(c)
|
||||||
|
@ -32,6 +32,7 @@ go_library(
|
|||||||
"//staging/src/k8s.io/api/coordination/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/coordination/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/events/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/events/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/extensions/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/extensions/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/flowcontrol/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/flowcontrol/v1alpha1:go_default_library",
|
||||||
@ -101,6 +102,8 @@ go_library(
|
|||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake:go_default_library",
|
||||||
|
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake:go_default_library",
|
||||||
"//staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library",
|
"//staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library",
|
||||||
|
@ -66,6 +66,8 @@ import (
|
|||||||
fakecorev1 "k8s.io/client-go/kubernetes/typed/core/v1/fake"
|
fakecorev1 "k8s.io/client-go/kubernetes/typed/core/v1/fake"
|
||||||
discoveryv1alpha1 "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1"
|
discoveryv1alpha1 "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1"
|
||||||
fakediscoveryv1alpha1 "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake"
|
fakediscoveryv1alpha1 "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake"
|
||||||
|
discoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1"
|
||||||
|
fakediscoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake"
|
||||||
eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
|
eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
|
||||||
fakeeventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1/fake"
|
fakeeventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1/fake"
|
||||||
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
|
||||||
@ -257,6 +259,11 @@ func (c *Clientset) DiscoveryV1alpha1() discoveryv1alpha1.DiscoveryV1alpha1Inter
|
|||||||
return &fakediscoveryv1alpha1.FakeDiscoveryV1alpha1{Fake: &c.Fake}
|
return &fakediscoveryv1alpha1.FakeDiscoveryV1alpha1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DiscoveryV1beta1 retrieves the DiscoveryV1beta1Client
|
||||||
|
func (c *Clientset) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface {
|
||||||
|
return &fakediscoveryv1beta1.FakeDiscoveryV1beta1{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
|
||||||
// EventsV1beta1 retrieves the EventsV1beta1Client
|
// EventsV1beta1 retrieves the EventsV1beta1Client
|
||||||
func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface {
|
func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface {
|
||||||
return &fakeeventsv1beta1.FakeEventsV1beta1{Fake: &c.Fake}
|
return &fakeeventsv1beta1.FakeEventsV1beta1{Fake: &c.Fake}
|
||||||
|
@ -40,6 +40,7 @@ import (
|
|||||||
coordinationv1beta1 "k8s.io/api/coordination/v1beta1"
|
coordinationv1beta1 "k8s.io/api/coordination/v1beta1"
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1"
|
discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1"
|
||||||
|
discoveryv1beta1 "k8s.io/api/discovery/v1beta1"
|
||||||
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
||||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||||
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
||||||
@ -90,6 +91,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
|||||||
coordinationv1.AddToScheme,
|
coordinationv1.AddToScheme,
|
||||||
corev1.AddToScheme,
|
corev1.AddToScheme,
|
||||||
discoveryv1alpha1.AddToScheme,
|
discoveryv1alpha1.AddToScheme,
|
||||||
|
discoveryv1beta1.AddToScheme,
|
||||||
eventsv1beta1.AddToScheme,
|
eventsv1beta1.AddToScheme,
|
||||||
extensionsv1beta1.AddToScheme,
|
extensionsv1beta1.AddToScheme,
|
||||||
flowcontrolv1alpha1.AddToScheme,
|
flowcontrolv1alpha1.AddToScheme,
|
||||||
|
@ -31,6 +31,7 @@ go_library(
|
|||||||
"//staging/src/k8s.io/api/coordination/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/coordination/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
"//staging/src/k8s.io/api/core/v1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/events/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/events/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/extensions/v1beta1:go_default_library",
|
"//staging/src/k8s.io/api/extensions/v1beta1:go_default_library",
|
||||||
"//staging/src/k8s.io/api/flowcontrol/v1alpha1:go_default_library",
|
"//staging/src/k8s.io/api/flowcontrol/v1alpha1:go_default_library",
|
||||||
|
@ -40,6 +40,7 @@ import (
|
|||||||
coordinationv1beta1 "k8s.io/api/coordination/v1beta1"
|
coordinationv1beta1 "k8s.io/api/coordination/v1beta1"
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1"
|
discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1"
|
||||||
|
discoveryv1beta1 "k8s.io/api/discovery/v1beta1"
|
||||||
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
||||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||||
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
||||||
@ -90,6 +91,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
|||||||
coordinationv1.AddToScheme,
|
coordinationv1.AddToScheme,
|
||||||
corev1.AddToScheme,
|
corev1.AddToScheme,
|
||||||
discoveryv1alpha1.AddToScheme,
|
discoveryv1alpha1.AddToScheme,
|
||||||
|
discoveryv1beta1.AddToScheme,
|
||||||
eventsv1beta1.AddToScheme,
|
eventsv1beta1.AddToScheme,
|
||||||
extensionsv1beta1.AddToScheme,
|
extensionsv1beta1.AddToScheme,
|
||||||
flowcontrolv1alpha1.AddToScheme,
|
flowcontrolv1alpha1.AddToScheme,
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"discovery_client.go",
|
||||||
|
"doc.go",
|
||||||
|
"endpointslice.go",
|
||||||
|
"generated_expansion.go",
|
||||||
|
],
|
||||||
|
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1",
|
||||||
|
importpath = "k8s.io/client-go/kubernetes/typed/discovery/v1beta1",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||||
|
"//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library",
|
||||||
|
"//staging/src/k8s.io/client-go/rest:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "package-srcs",
|
||||||
|
srcs = glob(["**"]),
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all-srcs",
|
||||||
|
srcs = [
|
||||||
|
":package-srcs",
|
||||||
|
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake:all-srcs",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
@ -0,0 +1,89 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1beta1 "k8s.io/api/discovery/v1beta1"
|
||||||
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
type DiscoveryV1beta1Interface interface {
|
||||||
|
RESTClient() rest.Interface
|
||||||
|
EndpointSlicesGetter
|
||||||
|
}
|
||||||
|
|
||||||
|
// DiscoveryV1beta1Client is used to interact with features provided by the discovery.k8s.io group.
|
||||||
|
type DiscoveryV1beta1Client struct {
|
||||||
|
restClient rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *DiscoveryV1beta1Client) EndpointSlices(namespace string) EndpointSliceInterface {
|
||||||
|
return newEndpointSlices(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new DiscoveryV1beta1Client for the given config.
|
||||||
|
func NewForConfig(c *rest.Config) (*DiscoveryV1beta1Client, error) {
|
||||||
|
config := *c
|
||||||
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
client, err := rest.RESTClientFor(&config)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &DiscoveryV1beta1Client{client}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new DiscoveryV1beta1Client for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *DiscoveryV1beta1Client {
|
||||||
|
client, err := NewForConfig(c)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return client
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new DiscoveryV1beta1Client for the given RESTClient.
|
||||||
|
func New(c rest.Interface) *DiscoveryV1beta1Client {
|
||||||
|
return &DiscoveryV1beta1Client{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
|
gv := v1beta1.SchemeGroupVersion
|
||||||
|
config.GroupVersion = &gv
|
||||||
|
config.APIPath = "/apis"
|
||||||
|
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||||
|
|
||||||
|
if config.UserAgent == "" {
|
||||||
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *DiscoveryV1beta1Client) RESTClient() rest.Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.restClient
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
// This package has the automatically generated typed clients.
|
||||||
|
package v1beta1
|
@ -0,0 +1,174 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package v1beta1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
v1beta1 "k8s.io/api/discovery/v1beta1"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
// EndpointSlicesGetter has a method to return a EndpointSliceInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type EndpointSlicesGetter interface {
|
||||||
|
EndpointSlices(namespace string) EndpointSliceInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// EndpointSliceInterface has methods to work with EndpointSlice resources.
|
||||||
|
type EndpointSliceInterface interface {
|
||||||
|
Create(*v1beta1.EndpointSlice) (*v1beta1.EndpointSlice, error)
|
||||||
|
Update(*v1beta1.EndpointSlice) (*v1beta1.EndpointSlice, error)
|
||||||
|
Delete(name string, options *v1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||||
|
Get(name string, options v1.GetOptions) (*v1beta1.EndpointSlice, error)
|
||||||
|
List(opts v1.ListOptions) (*v1beta1.EndpointSliceList, error)
|
||||||
|
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.EndpointSlice, err error)
|
||||||
|
EndpointSliceExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// endpointSlices implements EndpointSliceInterface
|
||||||
|
type endpointSlices struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newEndpointSlices returns a EndpointSlices
|
||||||
|
func newEndpointSlices(c *DiscoveryV1beta1Client, namespace string) *endpointSlices {
|
||||||
|
return &endpointSlices{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the endpointSlice, and returns the corresponding endpointSlice object, and an error if there is any.
|
||||||
|
func (c *endpointSlices) Get(name string, options v1.GetOptions) (result *v1beta1.EndpointSlice, err error) {
|
||||||
|
result = &v1beta1.EndpointSlice{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("endpointslices").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of EndpointSlices that match those selectors.
|
||||||
|
func (c *endpointSlices) List(opts v1.ListOptions) (result *v1beta1.EndpointSliceList, err error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
result = &v1beta1.EndpointSliceList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("endpointslices").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested endpointSlices.
|
||||||
|
func (c *endpointSlices) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("endpointslices").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any.
|
||||||
|
func (c *endpointSlices) Create(endpointSlice *v1beta1.EndpointSlice) (result *v1beta1.EndpointSlice, err error) {
|
||||||
|
result = &v1beta1.EndpointSlice{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("endpointslices").
|
||||||
|
Body(endpointSlice).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any.
|
||||||
|
func (c *endpointSlices) Update(endpointSlice *v1beta1.EndpointSlice) (result *v1beta1.EndpointSlice, err error) {
|
||||||
|
result = &v1beta1.EndpointSlice{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("endpointslices").
|
||||||
|
Name(endpointSlice.Name).
|
||||||
|
Body(endpointSlice).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *endpointSlices) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("endpointslices").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *endpointSlices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
var timeout time.Duration
|
||||||
|
if listOptions.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("endpointslices").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Timeout(timeout).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched endpointSlice.
|
||||||
|
func (c *endpointSlices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.EndpointSlice, err error) {
|
||||||
|
result = &v1beta1.EndpointSlice{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("endpointslices").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"doc.go",
|
||||||
|
"fake_discovery_client.go",
|
||||||
|
"fake_endpointslice.go",
|
||||||
|
],
|
||||||
|
importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake",
|
||||||
|
importpath = "k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
"//staging/src/k8s.io/api/discovery/v1beta1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||||
|
"//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library",
|
||||||
|
"//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1:go_default_library",
|
||||||
|
"//staging/src/k8s.io/client-go/rest:go_default_library",
|
||||||
|
"//staging/src/k8s.io/client-go/testing:go_default_library",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "package-srcs",
|
||||||
|
srcs = glob(["**"]),
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all-srcs",
|
||||||
|
srcs = [":package-srcs"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Package fake has the automatically generated clients.
|
||||||
|
package fake
|
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by client-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FakeDiscoveryV1beta1 struct {
|
||||||
|
*testing.Fake
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeDiscoveryV1beta1) EndpointSlices(namespace string) v1beta1.EndpointSliceInterface {
|
||||||
|
return &FakeEndpointSlices{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *FakeDiscoveryV1beta1) RESTClient() rest.Interface {
|
||||||
|
var ret *rest.RESTClient
|
||||||
|
return ret
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user