{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "HelmUpdateImageConfig",
  "type": "object",
  "required": ["path", "images"],
  "additionalProperties": false,
  "properties": {
    "path": {
      "type": "string",
      "description": "The path at which the Helm values file can be found.",
      "minLength": 1
    },
    "images": {
      "type": "array",
      "description": "A list of images which should receive updates.",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "image": {
            "type": "string",
            "description": "The container image (without tag) at which the update is targeted."
          },
          "fromOrigin": {
            "$ref": "./common.json#/definitions/origin"
          },
          "key": {
            "type": "string",
            "description": "The key in the Helm values file of which the value needs to be updated. For nested values, it takes a YAML dot notation path.",
            "minLength": 1
          },
          "value": {
            "type": "string",
            "description": "Specifies the new value for the specified key in the Helm values file.",
            "minLength": 1,
            "pattern": "^(Digest|ImageAndDigest|ImageAndTag|Tag)$"
          }
        },
        "required": ["image", "key", "value"]
      }
    }
  }
}
