{
  "description": "PackageBundle is the Schema for the packagebundle API.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "PackageBundleSpec defines the desired state of PackageBundle.",
      "properties": {
        "minControllerVersion": {
          "description": "Minimum required packages controller version",
          "type": "string"
        },
        "packages": {
          "description": "Packages supported by this bundle.",
          "items": {
            "description": "BundlePackage specifies a package within a bundle.",
            "properties": {
              "name": {
                "description": "Name of the package.",
                "type": "string"
              },
              "source": {
                "description": "Source location for the package (probably a helm chart).",
                "properties": {
                  "registry": {
                    "description": "Registry in which the package is found.",
                    "type": "string"
                  },
                  "repository": {
                    "description": "Repository within the Registry where the package is found.",
                    "type": "string"
                  },
                  "versions": {
                    "description": "Versions of the package supported by this bundle.",
                    "items": {
                      "description": "SourceVersion describes a version of a package within a repository.",
                      "properties": {
                        "dependencies": {
                          "description": "Dependencies to be installed before the package",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "digest": {
                          "description": "Digest is a checksum value identifying the version of the package and its contents.",
                          "type": "string"
                        },
                        "images": {
                          "description": "Images is a list of images used by this version of the package.",
                          "items": {
                            "description": "VersionImages is an image used by a version of a package.",
                            "properties": {
                              "digest": {
                                "description": "Digest is a checksum value identifying the version of the package and its contents.",
                                "type": "string"
                              },
                              "repository": {
                                "description": "Repository within the Registry where the package is found.",
                                "type": "string"
                              }
                            },
                            "required": [
                              "digest",
                              "repository"
                            ],
                            "type": "object",
                            "additionalProperties": false
                          },
                          "type": "array"
                        },
                        "name": {
                          "description": "Name is a human-friendly description of the version, e.g. \"v1.0\".",
                          "type": "string"
                        },
                        "schema": {
                          "description": "Schema is a base64 encoded, gzipped json schema used to validate package configurations.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "digest",
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "repository",
                  "versions"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "workloadonly": {
                "description": "WorkloadOnly specifies if the package should be installed only on the workload cluster",
                "type": "boolean"
              }
            },
            "required": [
              "source"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "required": [
        "packages"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "PackageBundleStatus defines the observed state of PackageBundle.",
      "properties": {
        "spec": {
          "description": "PackageBundleSpec defines the desired state of PackageBundle.",
          "properties": {
            "minControllerVersion": {
              "description": "Minimum required packages controller version",
              "type": "string"
            },
            "packages": {
              "description": "Packages supported by this bundle.",
              "items": {
                "description": "BundlePackage specifies a package within a bundle.",
                "properties": {
                  "name": {
                    "description": "Name of the package.",
                    "type": "string"
                  },
                  "source": {
                    "description": "Source location for the package (probably a helm chart).",
                    "properties": {
                      "registry": {
                        "description": "Registry in which the package is found.",
                        "type": "string"
                      },
                      "repository": {
                        "description": "Repository within the Registry where the package is found.",
                        "type": "string"
                      },
                      "versions": {
                        "description": "Versions of the package supported by this bundle.",
                        "items": {
                          "description": "SourceVersion describes a version of a package within a repository.",
                          "properties": {
                            "dependencies": {
                              "description": "Dependencies to be installed before the package",
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "digest": {
                              "description": "Digest is a checksum value identifying the version of the package and its contents.",
                              "type": "string"
                            },
                            "images": {
                              "description": "Images is a list of images used by this version of the package.",
                              "items": {
                                "description": "VersionImages is an image used by a version of a package.",
                                "properties": {
                                  "digest": {
                                    "description": "Digest is a checksum value identifying the version of the package and its contents.",
                                    "type": "string"
                                  },
                                  "repository": {
                                    "description": "Repository within the Registry where the package is found.",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "digest",
                                  "repository"
                                ],
                                "type": "object",
                                "additionalProperties": false
                              },
                              "type": "array"
                            },
                            "name": {
                              "description": "Name is a human-friendly description of the version, e.g. \"v1.0\".",
                              "type": "string"
                            },
                            "schema": {
                              "description": "Schema is a base64 encoded, gzipped json schema used to validate package configurations.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "digest",
                            "name"
                          ],
                          "type": "object",
                          "additionalProperties": false
                        },
                        "minItems": 1,
                        "type": "array"
                      }
                    },
                    "required": [
                      "repository",
                      "versions"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "workloadonly": {
                    "description": "WorkloadOnly specifies if the package should be installed only on the workload cluster",
                    "type": "boolean"
                  }
                },
                "required": [
                  "source"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            }
          },
          "required": [
            "packages"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "state": {
          "description": "PackageBundleStateEnum defines the observed state of PackageBundle.",
          "enum": [
            "available",
            "ignored",
            "invalid",
            "controller upgrade required"
          ],
          "type": "string"
        }
      },
      "required": [
        "state"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
