You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/kubernetes/rest/kubeconfig.js

21 lines
524 B

import angular from 'angular';
angular.module('portainer.kubernetes').factory('KubernetesConfig', KubernetesConfigFactory);
/* @ngInject */
function KubernetesConfigFactory($http, EndpointProvider, API_ENDPOINT_KUBERNETES) {
return { get };
async function get() {
const endpointID = EndpointProvider.endpointID();
return $http({
method: 'GET',
url: `${API_ENDPOINT_KUBERNETES}/${endpointID}/config`,
responseType: 'blob',
headers: {
Accept: 'text/yaml',
},
});
}
}