Skip to main content

lint_checks

Creates, updates, deletes, gets or lists a lint_checks resource.

Overview

Namelint_checks
TypeResource
Iddigitalocean.kubernetes.lint_checks

Fields

The following fields are returned by SELECT queries:

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.

NameDatatypeDescription
run_idstringId of the clusterlint run that can be used later to fetch the diagnostics. (example: 50c2f44c-011d-493e-aee5-361a4a0d1844)
completed_atstring (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)
diagnosticsarrayAn array of diagnostics reporting potential problems for the given cluster.
requested_atstring (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:

NameAccessible byRequired ParamsOptional ParamsDescription
kubernetes_get_cluster_lint_resultsselectcluster_idrun_idTo 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.
kubernetes_run_cluster_lintexeccluster_idClusterlint 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.

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.

NameDatatypeDescription
cluster_idstring (uuid)A unique ID that can be used to reference a Kubernetes cluster. (example: bd5f5959-5e1e-4205-a714-a914373942af)
run_idstring (uuid)Specifies the clusterlint run whose results will be retrieved. (example: 50c2f44c-011d-493e-aee5-361a4a0d1844)

SELECT examples

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

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 }}"
}';