lint_checks
Creates, updates, deletes, gets or lists a lint_checks
resource.
Overview
Name | lint_checks |
Type | Resource |
Id | digitalocean.kubernetes.lint_checks |
Fields
The following fields are returned by SELECT
queries:
- kubernetes_get_cluster_lint_results
The response is a JSON object which contains the diagnostics on Kubernetes
objects in the cluster. Each diagnostic will contain some metadata information
about the object and feedback for users to act upon.
Name | Datatype | Description |
---|---|---|
run_id | string | Id of the clusterlint run that can be used later to fetch the diagnostics. (example: 50c2f44c-011d-493e-aee5-361a4a0d1844) |
completed_at | string (date-time) | A time value given in ISO8601 combined date and time format that represents when the schedule clusterlint run request was completed. (example: 2019-10-30T05:34:11Z) |
diagnostics | array | An array of diagnostics reporting potential problems for the given cluster. |
requested_at | string (date-time) | A time value given in ISO8601 combined date and time format that represents when the schedule clusterlint run request was made. (example: 2019-10-30T05:34:07Z) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
kubernetes_get_cluster_lint_results | select | cluster_id | run_id | To request clusterlint diagnostics for your cluster, send a GET request to/v2/kubernetes/clusters/$K8S_CLUSTER_ID/clusterlint . If the run_id queryparameter is provided, then the diagnostics for the specific run is fetched. By default, the latest results are shown. To find out how to address clusterlint feedback, please refer to the clusterlint check documentation. |
kubernetes_run_cluster_lint | exec | cluster_id | Clusterlint helps operators conform to Kubernetes best practices around resources, security and reliability to avoid common problems while operating or upgrading the clusters. To request a clusterlint run on your cluster, send a POST request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/clusterlint . This will run allchecks present in the doks group by default, if a request body is notspecified. Optionally specify the below attributes. For information about the available checks, please refer to the clusterlint check documentation. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
cluster_id | string (uuid) | A unique ID that can be used to reference a Kubernetes cluster. (example: bd5f5959-5e1e-4205-a714-a914373942af) |
run_id | string (uuid) | Specifies the clusterlint run whose results will be retrieved. (example: 50c2f44c-011d-493e-aee5-361a4a0d1844) |
SELECT
examples
- kubernetes_get_cluster_lint_results
To request clusterlint diagnostics for your cluster, send a GET request to/v2/kubernetes/clusters/$K8S_CLUSTER_ID/clusterlint
. If the run_id
query
parameter is provided, then the diagnostics for the specific run is fetched.
By default, the latest results are shown.
To find out how to address clusterlint feedback, please refer to
the clusterlint check documentation.
SELECT
run_id,
completed_at,
diagnostics,
requested_at
FROM digitalocean.kubernetes.lint_checks
WHERE cluster_id = '{{ cluster_id }}' -- required
AND run_id = '{{ run_id }}';
Lifecycle Methods
- kubernetes_run_cluster_lint
Clusterlint helps operators conform to Kubernetes best practices around
resources, security and reliability to avoid common problems while operating
or upgrading the clusters.
To request a clusterlint run on your cluster, send a POST request to/v2/kubernetes/clusters/$K8S_CLUSTER_ID/clusterlint
. This will run all
checks present in the doks
group by default, if a request body is not
specified. Optionally specify the below attributes.
For information about the available checks, please refer to
the clusterlint check documentation.
EXEC digitalocean.kubernetes.lint_checks.kubernetes_run_cluster_lint
@cluster_id='{{ cluster_id }}' --required
@@json=
'{
"include_groups": "{{ include_groups }}",
"include_checks": "{{ include_checks }}",
"exclude_groups": "{{ exclude_groups }}",
"exclude_checks": "{{ exclude_checks }}"
}';