Lieutenant API
Project Syn Management API
2. Endpoints
2.1. Bootstrapping
2.1.1. installSteward
GET /install/steward.json
Returns the Steward JSON installation manifest
Description
Autogenerated JSON containing all the needed parameters for having Steward up and running. It Iterates through all available Cluster objects to find the object matching the token in the field spec.bootstrapToken.token
. It checks if the token is valid (fields spec.bootstrapToken.valid
and field spec.bootstrapToken.validUntil
). If valid delivers the JSON and sets the field spec.bootstrapToken.valid
to false
.
2.2. Cluster
2.2.1. createCluster
POST /clusters
Creates a new cluster
Description
Create a cluster in the API. The ID is generated by the API (in the form c-<adjective>-<noun>-<digits>
where all the words are lowercase, max 63 characters in total). It checks if the tenant exists before creating the object, otherwise fails. It generates the Cluster
object and its <GitRepoSpec>
and bootstrapToken
values.
Body Parameter
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
Cluster |
Create a new Cluster Cluster |
X |
2.2.2. deleteCluster
DELETE /clusters/{clusterId}
Deletes a cluster
2.2.3. getCluster
GET /clusters/{clusterId}
Returns all values of a cluster
2.2.4. listClusters
GET /clusters
Returns a list of clusters
Return Type
array[Cluster]
Responses
Code | Message | Datatype |
---|---|---|
200 |
Cluster listing. Empty array if no tenants available. |
List[Cluster] |
0 |
A default response with a reason. |
2.2.5. updateCluster
PATCH /clusters/{clusterId}
Updates a cluster
Body Parameter
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
ClusterProperties |
Update cluster with properties to be changed (RFC 7396) ClusterProperties |
X |
2.3. Inventory
2.3.1. queryInventory
GET /inventory
Returns inventory data according to query
2.3.2. updateInventory
POST /inventory
Write inventory data
Body Parameter
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
Inventory |
Inventory data of a cluster Inventory |
X |
2.4. System
2.4.1. docs
GET /docs
API documentation
2.5. Tenant
2.5.1. createTenant
POST /tenants
Creates a new tenant
Description
Create a tenant in the API. The ID is generated by the API (in the form t-<adjective>-<noun>-<digits>
where all the words are lowercase, max 63 characters in total). It generates the Tenant
object in the configured namespace (usually the same namespace where the API runs). The customer config Git repository URL is required.
Body Parameter
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
Tenant |
Create a new tenant Tenant |
X |
2.5.2. deleteTenant
DELETE /tenants/{tenantId}
Deletes a tenant
2.5.3. getTenant
GET /tenants/{tenantId}
Returns all values of a tenant
2.5.4. listTenants
GET /tenants
Returns a list of tenants
Return Type
array[Tenant]
Responses
Code | Message | Datatype |
---|---|---|
200 |
Tenant listing. Empty array if no tenants available. |
List[Tenant] |
0 |
A default response with a reason. |
2.5.5. updateTenant
PATCH /tenants/{tenantId}
Updates a tenant
Body Parameter
Name | Description | Required | Default | Pattern |
---|---|---|---|---|
TenantProperties |
Update tenant with properties to be changed (RFC 7396) TenantProperties |
X |
3. Models
3.1. Cluster
Field Name | Required | Type | Description | Format |
---|---|---|---|---|
id |
X |
String |
A unique object identifier string. Automatically generated by the API on creation (in the form "<letter>-<adjective>-<noun>-<digits>" where all letters are lowercase, max 63 characters in total). |
|
tenant |
X |
String |
Id of the tenant this cluster belongs to |
|
annotations |
Object |
Unstructured key value map containing arbitrary metadata |
||
displayName |
String |
Display Name of the cluster |
||
facts |
Object |
Facts about a cluster object. Statically configured key/value pairs. |
||
gitRepo |
GitRepo |
|||
tenantGitRepoRevision |
String |
Git revision to use with the tenant configruation git repository. This takes precedence over the revision configured on the Tenant. |
||
globalGitRepoRevision |
String |
Git revision to use with the global configruation git repository. This takes precedence over the revision configured on the Tenant. |
||
installURL |
String |
URL to fetch install manifests for Steward cluster agent. This will only be set if the cluster's token is still valid. |
3.2. ClusterId
Field Name | Required | Type | Description | Format |
---|---|---|---|---|
id |
X |
String |
A unique object identifier string. Automatically generated by the API on creation (in the form "<letter>-<adjective>-<noun>-<digits>" where all letters are lowercase, max 63 characters in total). |
3.3. ClusterProperties
A cluster defition object. The Git repository is usually managed by the API and autogenerated. The sshDeployKey will be managed by Steward
Field Name | Required | Type | Description | Format |
---|---|---|---|---|
annotations |
Object |
Unstructured key value map containing arbitrary metadata |
||
displayName |
String |
Display Name of the cluster |
||
facts |
Object |
Facts about a cluster object. Statically configured key/value pairs. |
||
gitRepo |
GitRepo |
|||
tenantGitRepoRevision |
String |
Git revision to use with the tenant configruation git repository. This takes precedence over the revision configured on the Tenant. |
||
globalGitRepoRevision |
String |
Git revision to use with the global configruation git repository. This takes precedence over the revision configured on the Tenant. |
||
installURL |
String |
URL to fetch install manifests for Steward cluster agent. This will only be set if the cluster's token is still valid. |
3.4. ClusterTenant
Field Name | Required | Type | Description | Format |
---|---|---|---|---|
tenant |
X |
String |
Id of the tenant this cluster belongs to |
3.5. CreateCluster
Field Name | Required | Type | Description | Format |
---|---|---|---|---|
tenant |
X |
String |
Id of the tenant this cluster belongs to |
|
annotations |
Object |
Unstructured key value map containing arbitrary metadata |
||
displayName |
String |
Display Name of the cluster |
||
facts |
Object |
Facts about a cluster object. Statically configured key/value pairs. |
||
gitRepo |
GitRepo |
|||
tenantGitRepoRevision |
String |
Git revision to use with the tenant configruation git repository. This takes precedence over the revision configured on the Tenant. |
||
globalGitRepoRevision |
String |
Git revision to use with the global configruation git repository. This takes precedence over the revision configured on the Tenant. |
||
installURL |
String |
URL to fetch install manifests for Steward cluster agent. This will only be set if the cluster's token is still valid. |
3.6. GitRepo
Configuration Git repository, usually generated by the API
Field Name | Required | Type | Description | Format |
---|---|---|---|---|
url |
String |
Full URL of the git repo |
||
type |
String |
Specifies if a repo should be managed by the git controller. A value of 'unmanaged' means it's not manged by the controller |
||
deployKey |
String |
SSH public key / deploy key for clusterconfiguration catalog Git repository. This property is managed by Steward. |
||
hostKeys |
String |
SSH known hosts of the git server (multiline possible for multiple keys) |
3.7. Inventory
Inventory data of a cluster
Field Name | Required | Type | Description | Format |
---|---|---|---|---|
cluster |
X |
String |
||
inventory |
Object |
3.8. Reason
A reason for responses
Field Name | Required | Type | Description | Format |
---|---|---|---|---|
reason |
X |
String |
The reason message |
3.9. Revision
Field Name | Required | Type | Description | Format |
---|---|---|---|---|
revision |
String |
Revision to use with a git repository. |
3.10. RevisionedGitRepo
Field Name | Required | Type | Description | Format |
---|---|---|---|---|
url |
String |
Full URL of the git repo |
||
type |
String |
Specifies if a repo should be managed by the git controller. A value of 'unmanaged' means it's not manged by the controller |
||
deployKey |
String |
SSH public key / deploy key for clusterconfiguration catalog Git repository. This property is managed by Steward. |
||
hostKeys |
String |
SSH known hosts of the git server (multiline possible for multiple keys) |
||
revision |
String |
Revision to use with a git repository. |
3.11. Tenant
Field Name | Required | Type | Description | Format |
---|---|---|---|---|
id |
X |
String |
A unique object identifier string. Automatically generated by the API on creation (in the form "<letter>-<adjective>-<noun>-<digits>" where all letters are lowercase, max 63 characters in total). |
|
annotations |
Object |
Unstructured key value map containing arbitrary metadata |
||
displayName |
String |
Display name of the tenant |
||
gitRepo |
RevisionedGitRepo |
|||
globalGitRepoURL |
String |
Full URL of the global configuration git repo |
||
globalGitRepoRevision |
String |
Git revision to use with the global configruation git repository. |
3.12. TenantId
Field Name | Required | Type | Description | Format |
---|---|---|---|---|
id |
X |
String |
A unique object identifier string. Automatically generated by the API on creation (in the form "<letter>-<adjective>-<noun>-<digits>" where all letters are lowercase, max 63 characters in total). |
3.13. TenantProperties
A tenant definition object. The Git repository is usually managed by the API and autogenerated. All properties except name are optional on creation.
Field Name | Required | Type | Description | Format |
---|---|---|---|---|
annotations |
Object |
Unstructured key value map containing arbitrary metadata |
||
displayName |
String |
Display name of the tenant |
||
gitRepo |
RevisionedGitRepo |
|||
globalGitRepoURL |
String |
Full URL of the global configuration git repo |
||
globalGitRepoRevision |
String |
Git revision to use with the global configruation git repository. |