Files
renovate/lib/modules/datasource/aws-eks-addon
Jamie Tanna 128f446e08 docs: ensure that config in documentation is error and warning free (#43727)
* docs: skip validation on JSON files that aren't Renovate config

As part of future changes, we'll enable validation on all JSON code
snippets to run Config Validation.

Before we do that, we should opt-out JSON snippets that aren't anything
related to Renovate config.

* docs: don't validate invalid Renovate config

As it's intentionally referencing a manager that doesn't exist.

* docs: don't validate partial Renovate config

As part of future changes, we'll enable validation on all JSON code
snippets to run Config Validation.

There are several code snippets we have that are part of a Renovate JSON,
but it doesn't make sense to convert these to a fully passing config, as
it'd reduce clarity on what we're trying to explain.

* docs: convert `baseBranchPatterns` snippets to code blocks

So we can validate them.

* docs: make sure that `datasourceTemplate` is set

So this passes validation.

* docs: clarify that `force` is global config

As it may not be clear, so we can make it extra clear with a `.js` file,
and note that it's global self-hosted config.

* docs: make sure `packageRules` is an array

* docs: `matchBaseBranches` needs `baseBranchPatterns` to be set

* docs: correct typo for `prBodyColumns`

* docs: mark global config snippets as such

As part of future changes, we'll use this to detect whether it's global
self-hosted configuration.

* docs: make sure `packageRules` wraps its children

* docs: add `allowedHeaders`

* docs: ignore deprecation warnings

As part of future changes, we'll use this to note that we don't care
about the validation warnings.

* docs: make sure `customManagers` wraps its children

* docs: make sure `fleet` wraps its children

* docs: validate JSON snippets are valid Renovate config

To make sure that we're always presenting valid JSON configuration to
our users, we can validate them as part of `check-fenced-code`.

As well as configuration errors we can warn for warnings, but allow code
blocks to opt-out, for instance when there's a known deprecation
affecting the code block.

We need to make sure to set `allowedEnv` for various code snippets that
reference environment variables.

* docs(development): document fenced code block checks

* docs: wrap `configType` and `ignoreConfigWarnings` in `{ ... }`

As otherwise we see build failures i.e.

    WARNING -  Doc file 'modules/platform/gitlab/index.md' contains a link
       '../../../self-hosted-configuration.md#autodiscoverrepoorder', but the doc
       'self-hosted-configuration.md' does not contain an anchor '#autodiscoverrepoorder'.

This needs to be wrapped alongside all other options like `title`.

* fixup! docs: wrap `configType` and `ignoreConfigWarnings` in `{ ... }`
2026-06-02 13:29:48 +00:00
..

This datasource returns the addon versions available for use on AWS EKS via the AWS API.

AWS API configuration

Since the datasource uses the AWS SDK for JavaScript, you can configure it like other AWS Tools. You can use common AWS configuration options, for example:

  • Set the region via the AWS_REGION environment variable or your ~/.aws/config file
  • Provide credentials via the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables or your ~/.aws/credentials file
  • Select the profile to use via AWS_PROFILE environment variable

Alternatively, you can specify different region and profile for each addon.

Read the AWS Developer Guide - Configuring the SDK for JavaScript for more information on these configuration options.

The minimal IAM privileges required for this datasource are:

{
  "Sid": "AllowDescribeEKSAddonVersions",
  "Effect": "Allow",
  "Action": ["eks:DescribeAddonVersions"],
  "Resource": "*"
}

Read the AWS EKS IAM reference for more information.

Usage

Because Renovate has no manager for the AWS EKS Addon datasource, you need to help Renovate by configuring the custom manager to identify the AWS EKS Addons you want updated.

When configuring the custom manager, you have to pass in the Kubernetes version and addon names as a minified JSON object as the packageName For example:

# Getting the vpc-cni version for Kubernetes 1.30
{
   "kubernetesVersion": "1.30",
   "addonName": "vpc-cni"
}

# In order to use it with this datasource, you have to minify it:
{"kubernetesVersion":"1.30","addonName":"vpc-cni"}

Although it's unlikely that EKS might support different addon versions across regions, you can optionally specify the region and/or profile in the minified JSON object to discover the addon versions specific to this region.

# discover kube-proxy addon versions without specifying a cluster version.
renovate: eksAddonsFilter={"addonName":"kube-proxy"}

# discover kube-proxy default addon versions
renovate: eksAddonsFilter={"addonName":"kube-proxy", "default":true}

# discover vpc-cni addon versions on Kubernetes 1.30 in us-east-1 region using environmental AWS credentials.
renovate: eksAddonsFilter={"kubernetesVersion":"1.30","addonName":"vpc-cni","region":"eu-west-1"}

# discover vpc-cni addon versions on Kubernetes 1.30 in us-east-1 region using AWS credentials from `renovate-east` profile.
renovate: eksAddonsFilter={"kubernetesVersion":"1.30","addonName":"vpc-cni","region":"us-east-1","profile":"renovate-east"}

Here's an example of using the custom manager to configure this datasource:

{
  "packageRules": [
    {
      "matchDatasources": ["aws-eks-addon"],
      "overrideDepName": "{{replace '.*\"addonName\":\"([^\"]+)\".*' '$1' depName}}"
    }
  ],
  "customManagers": [
    {
      "customType": "regex",
      "managerFilePatterns": ["/.*\\.tf/"],
      "matchStrings": [
        ".*# renovate: eksAddonsFilter=(?<packageName>.*?)\n.*?[a-zA-Z0-9-_:]*[ ]*?[:|=][ ]*?[\"|']?(?<currentValue>[a-zA-Z0-9-_.]+)[\"|']?.*"
      ],
      "datasourceTemplate": "aws-eks-addon",
      "versioningTemplate": "aws-eks-addon" // Optional. Default value is 'aws-eks-addon'
    }
  ]
}

The configuration above matches every terraform file, and recognizes these lines:

variable "vpc_cni_version" {
  type        = string
  description = "EKS vpc-cni add-on version"
  # kubernetesVersion and addonName provided
  # renovate: eksAddonsFilter={"kubernetesVersion":"1.30","addonName":"vpc-cni"}
  default     = "v1.18.1-eksbuild.3"
}

or

addons:
  - name: vpc-cni
    # only addon name and the supported default version
    # renovate: eksAddonsFilter={"addonName":"vpc-cni", "default":true}
    version: v1.18.5-eksbuild.1