mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 23:09:41 +02:00
* feat(cluster): add kubernetes endpoint resource * feat(cluster): add kubernetes endpoint service * feat(node): Show which IP address / port the cluster API is listening on * fix(cluster): support multi-master clusters * fix(cluster): support multi-master clusters * feat(k8s/cluster): minor UI update * refactor(k8s/cluster): rename variable * refactor(k8s/endpoints): refactor KubernetesEndpointsFactory Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
20 lines
621 B
JavaScript
20 lines
621 B
JavaScript
angular.module('portainer.kubernetes').factory('KubernetesEndpoints', function KubernetesEndpointsFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
|
|
'use strict';
|
|
return function (namespace) {
|
|
const url = API_ENDPOINT_ENDPOINTS + '/:endpointId/kubernetes/api/v1' + (namespace ? '/namespaces/:namespace' : '') + '/endpoints/:id';
|
|
return $resource(
|
|
url,
|
|
{
|
|
endpointId: EndpointProvider.endpointID,
|
|
namespace: namespace,
|
|
},
|
|
{
|
|
get: {
|
|
method: 'GET',
|
|
timeout: 15000,
|
|
ignoreLoadingBar: true,
|
|
},
|
|
}
|
|
);
|
|
};
|
|
});
|