Register a cluster and issue initial agent key
curl --request POST \
--url https://api.acornops.dev/api/v1/workspaces/{workspaceId}/kubernetes-clusters \
--header 'Content-Type: application/json' \
--cookie acornops_cp_session= \
--data '
{
"name": "payments-prod-eks",
"namespaceInclude": [
"payments",
"shared"
],
"namespaceExclude": [
"sandbox"
],
"agentAccessMode": "read_only",
"rbacAdditionKeys": [
"cnpg"
]
}
'const options = {
method: 'POST',
headers: {cookie: 'acornops_cp_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'payments-prod-eks',
namespaceInclude: ['payments', 'shared'],
namespaceExclude: ['sandbox'],
agentAccessMode: 'read_only',
rbacAdditionKeys: ['cnpg']
})
};
fetch('https://api.acornops.dev/api/v1/workspaces/{workspaceId}/kubernetes-clusters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"cluster": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetType": "kubernetes",
"name": "<string>",
"status": "<string>",
"connectionStatus": "<string>",
"latestSnapshot": {
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clusterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
},
"summary": {},
"permissions": {},
"agentAccessMode": "read_only",
"namespaceInclude": [
"<string>"
],
"namespaceExclude": [
"<string>"
],
"permissionMode": "read_only",
"permissionModeOverride": "read_only",
"permissionModeSource": "cluster_override",
"writeConfirmationPolicy": {}
},
"agentKey": "<string>",
"installInstructions": {
"command": "<string>",
"environment": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Targets and inventory
Register a cluster and issue initial agent key
Register a cluster and issue initial agent key
curl --request POST \
--url https://api.acornops.dev/api/v1/workspaces/{workspaceId}/kubernetes-clusters \
--header 'Content-Type: application/json' \
--cookie acornops_cp_session= \
--data '
{
"name": "payments-prod-eks",
"namespaceInclude": [
"payments",
"shared"
],
"namespaceExclude": [
"sandbox"
],
"agentAccessMode": "read_only",
"rbacAdditionKeys": [
"cnpg"
]
}
'const options = {
method: 'POST',
headers: {cookie: 'acornops_cp_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'payments-prod-eks',
namespaceInclude: ['payments', 'shared'],
namespaceExclude: ['sandbox'],
agentAccessMode: 'read_only',
rbacAdditionKeys: ['cnpg']
})
};
fetch('https://api.acornops.dev/api/v1/workspaces/{workspaceId}/kubernetes-clusters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"cluster": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetType": "kubernetes",
"name": "<string>",
"status": "<string>",
"connectionStatus": "<string>",
"latestSnapshot": {
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clusterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
},
"summary": {},
"permissions": {},
"agentAccessMode": "read_only",
"namespaceInclude": [
"<string>"
],
"namespaceExclude": [
"<string>"
],
"permissionMode": "read_only",
"permissionModeOverride": "read_only",
"permissionModeSource": "cluster_override",
"writeConfirmationPolicy": {}
},
"agentKey": "<string>",
"installInstructions": {
"command": "<string>",
"environment": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Authorizations
Path Parameters
Example:
"4b930d98-add9-4924-ab26-3c16d96ec373"
Body
application/json
Example:
"payments-prod-eks"
Example:
["payments", "shared"]
Example:
["sandbox"]
Controls the generated Helm command RBAC mode. read_write adds rbac.write.enabled=true.
Available options:
read_only, read_write Administrator-defined Kubernetes integration bundle keys to snapshot for this cluster installation.
Maximum array length:
25