Skip to content

Latest commit

 

History

History
207 lines (134 loc) · 9.41 KB

File metadata and controls

207 lines (134 loc) · 9.41 KB

IntelliJ plugin for Helm values

Build Version Downloads

Ease configuration of values for Helm charts in your IDE

The plugin provides several actions to generate JSON schemas for values of Helm charts.
These schemas can then be used in your IDE to document, validate and auto-complete Helm values.

Plugin allows to configure Helm chart repositories directly from your IDE.
Plugin also allows to update Helm dependencies for Helm charts directly from your IDE.
This requires installation of Helm on your local workstation.

More information: Helm values documentation

Actions

Refresh JON schemas for current chart

Action Refresh JSON schema for current chart is available from Chart.yaml or values.yaml.

action_refresh_current

Action will trigger the following processing:

  • clear previously extracted JSON schemas
  • download JSON schemas from external JSON schema repositories (unless already downloaded)
    Action only attempts to download JSON schemas for each dependency if a repository mapping is defined for the Helm repository of the dependency.
    Check dedicated section to configure JSON schema repositories.
    A fallback schema is generated if package of chart dependency is missing or invalid.
    The description of the fallback schema provides more information on the extract issue.
  • extract file values.schema.json from chart dependencies (if available)
    A fallback schema is generated if JSON schema can't be extracted from dependency archive (archive not found, corrupted archive ...).
    The description of the fallback schema provides more information on the download issue.
  • generate aggregated JSON schema aggregated-values.schema.json in .idea/helm-values/<chart name>/
    Action only aggregates extracted JSON schemas for each dependency if a repository mapping is not defined for the Helm repository of the dependency.
    Check dedicated section to configure JSON schema repositories.

The JSON schema aggregated-values.schema.json is used by default to validate file values.yaml in the same folder as Chart.yaml.
Additional JSON schema mappings can be configured in IntelliJ settings if required (e.g. for other values files applied after packaging).

Optional file aggregated-values.schema.patch.json can be created in the base folder of the chart (same folder as Chart.yaml) to patch aggregated JSON schema.
Since #55 (0.9.0), optional file aggregated-values.schema.patch.yaml can be created in the base folder of the chart. to patch aggregated JSON schema.
If JSON patch file is present, YAML patch file is ignored.

For more information on patch files, check dedicated section on patch for generated JSON schemas.

Clear JSON schemas for current chart

Action Clear JSON schema for current chart is available from Chart.yaml or values.yaml.

action_clear_current

Action will trigger the following processing:

  • clear previously downloaded JSON schemas for the current chart
  • clear previously extracted JSON schemas for the current chart
  • clear generated JSON schema for the current chart (aggregated-values.schema.json)

Update dependencies for current chart

Action Update dependencies for current chart is available from Chart.yaml or values.yaml.

action_update_dependencies_current

Action will trigger the following processing:

  • update Helm repositories (helm repo update)
  • update dependencies for the current chart (helm dependency update --skip-refresh)

Action requires installation of Helm on local workstation and configuration of Helm repositories.

Refresh JSON schemas for all charts in project

Action Refresh JSON schemas for all charts in project is available from actions search and from "All charts in project" menu.

action_refresh_all

It will trigger the refresh of JSON schemas for each chart in the project (i.e. for each file named Chart.yaml in the project).

Clear JSON schemas for all charts in project

Action Clear JSON schema for all charts in project is available from actions search and from "All charts in project" menu.

action_clear_all

It will clear JSON schemas for each chart in the project (i.e. for each file named Chart.yaml in the project).

Update dependencies for all charts in project

Action Update dependencies for all charts in project is available from actions search and from "All charts in project" menu.

action_update_dependencies_all

It will trigger the update of Helm dependencies for each chart in the project (i.e. for each file named Chart.yaml in the project).
Update of Helm repositories is however only executed once for all charts in project.

Action requires installation of Helm on local workstation and configuration of Helm repositories.

Configure Helm chart repositories

Helm chart repositories can be configured in plugin settings and are automatically pushed to Helm installed on your local workstation when settings are saved.

Chart repository security

Each chart repository can be configured with user and password in plugin settings.

A reference chart repository can be defined for each chart repository in plugin settings.
When selected, credentials are inherited from the reference chart repository.
Inherited configuration is displayed in read-only in editor.

settings

💡 credentials are stored securely in IntelliJ password safe.

JSON schema repository

Each chart repository can be configured with an optional JSON schema repository.
More info on this configuration is provided in next section.

Configure JSON schema repositories

As explained in introduction, plugin can be configured to download JSON schemas from external JSON schema repositories.

JSON schema repository mappings

Repository mappings can be configured in plugin settings to define JSON schema repository for each Helm repository.

Aggregation actions use the repository key in dependencies of Chart.yaml to define the JSON schema repository that must be used to download JSON schemas for each dependency.

Given the following Chart.yaml:

apiVersion: v2
name: my-bundle
version: 0.1.0
dependencies:
  - name: another-bundle
    version: 0.2.0
    repository: "@bundles"
  - name: simple-app
    version: 0.3.0
    repository: "@apps"
  - name: thirdparty-chart
    version: 0.4.0
    repository: "@thirdparty"

The plugin must be configured with following configuration to download JSON schemas for the first 2 dependencies:

settings

Custom JSON schema file names

Default file names for JSON schemas can be overridden for each repository in plugin settings.

settings-custom

Deprecation notice: globalValuesSchemaFile is deprecated and will be removed in 1.0.0.

JSON schema repository security

JSON schema repositories can be secured with basic authentication.

Each schema repository can be configured with user and password in plugin settings.

settings-security

💡 credentials are stored securely in IntelliJ password safe.

Reference repository mapping

A reference repository mapping can be defined for each repository in plugin settings.

When selected, credentials and schema file names are inherited from the reference repository mapping.
Inherited configuration is displayed in read-only in editor.

settings-reference

Screenshots

Get documentation in values.yaml

values-documentation

Get validation and auto-completion in values.yaml

values-validation