mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
feat(secrets): allow creating secrets beyond opaque [EE-2625] (#7709)
This commit is contained in:
parent
3b2f0ff9eb
commit
4e20d70a99
23 changed files with 659 additions and 135 deletions
16
app/kubernetes/rest/serviceAccount.js
Normal file
16
app/kubernetes/rest/serviceAccount.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
import axios, { parseAxiosError } from '@/portainer/services/axios';
|
||||
|
||||
export async function getServiceAccounts(environmentId, namespaceId) {
|
||||
try {
|
||||
const {
|
||||
data: { items },
|
||||
} = await axios.get(urlBuilder(environmentId, namespaceId));
|
||||
return items;
|
||||
} catch (error) {
|
||||
throw parseAxiosError(error);
|
||||
}
|
||||
}
|
||||
|
||||
function urlBuilder(environmentId, namespaceId) {
|
||||
return `endpoints/${environmentId}/kubernetes/api/v1/namespaces/${namespaceId}/serviceaccounts`;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue