{
  "description": "EventTrigger is the Schema for the eventtriggers API",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "EventTriggerSpec defines the desired state of EventTrigger",
      "properties": {
        "cloudEventAction": {
          "default": "Create",
          "description": "CloudEventAction determines the action to take based on the received CloudEvent.\nCloudEvents with the same source and subject are considered related and represent\ndifferent states of the same entity. This field specifies whether to create or\ndelete the associated Kubernetes resources.\nThis can be expressed as a template and instantiated at run time using CloudEvent",
          "type": "string"
        },
        "clusterSetRefs": {
          "description": "SetRefs identifies referenced ClusterSets. Name of the referenced ClusterSets.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "configMapGenerator": {
          "description": "The ConfigMapGenerator field references ConfigMaps containing templates.\nThese referenced ConfigMaps will be dynamically instantiated in the management cluster\nbased on event data.",
          "items": {
            "properties": {
              "name": {
                "description": "Name of the referenced resource.\nName can be expressed as a template and instantiate using\n- .Cluster.metadata.namespace: namespace of the managed cluster\n- .Cluster.metadata.name: name of the managed cluster\n- .Cluster.kind: kind of the managed cluster object",
                "minLength": 1,
                "type": "string"
              },
              "nameFormat": {
                "description": "InstantiatedResourceNameFormat defines a template used to generate the name\nof the resource created in the management cluster. The template can reference:\n- .Cluster.metadata.namespace: namespace of the managed cluster\n- .Cluster.metadata.name: name of the managed cluster\n- .Cluster.kind: kind of the managed cluster object\n- event data",
                "minLength": 1,
                "type": "string"
              },
              "namespace": {
                "description": "Namespace of the referenced resource.\nNamespace can be left empty. In such a case, namespace will\nbe implicit set to cluster's namespace.",
                "type": "string"
              },
              "optional": {
                "default": false,
                "description": "Optional indicates that the referenced resource is not mandatory.\nIf set to true and the resource is not found, the error will be ignored,\nand Sveltos will continue processing other generators.",
                "type": "boolean"
              }
            },
            "required": [
              "name",
              "nameFormat"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "continueOnConflict": {
          "default": false,
          "description": "By default (when ContinueOnConflict is unset or set to false), Sveltos stops deployment after\nencountering the first conflict (e.g., another ClusterProfile already deployed the resource).\nIf set to true, Sveltos will attempt to deploy remaining resources in the ClusterProfile even\nif conflicts are detected for previous resources.\nThis field will be directly transferred to the ClusterProfile Spec\ngenerated in response to events.",
          "type": "boolean"
        },
        "dependsOn": {
          "description": "DependsOn specifies a list of other ClusterProfiles that this instance depends on.\nIn any managed cluster that matches this ClusterProfile, the add-ons and applications\ndefined in this instance will not be deployed until all add-ons and applications in the\nClusterProfiles listed as dependencies are deployed.\nThis field will be directly transferred to the ClusterProfile Spec",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "destinationCluster": {
          "description": "DestinationCluster identifies a specific cluster (by name) to deploy add-ons to.\nThis field is templatable, allowing dynamic values based on the event context.\nCannot be set if DestinationClusterSelector is set.",
          "properties": {
            "apiVersion": {
              "description": "API version of the referent.",
              "type": "string"
            },
            "fieldPath": {
              "description": "If referring to a piece of an object instead of an entire object, this string\nshould contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].\nFor example, if the object reference is to a container within a pod, this would take on a value like:\n\"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered\nthe event) or if no container name is specified \"spec.containers[2]\" (container with\nindex 2 in this pod). This syntax is chosen only to have some well-defined way of\nreferencing a part of an object.",
              "type": "string"
            },
            "kind": {
              "description": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
              "type": "string"
            },
            "name": {
              "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
              "type": "string"
            },
            "namespace": {
              "description": "Namespace of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
              "type": "string"
            },
            "resourceVersion": {
              "description": "Specific resourceVersion to which this reference is made, if any.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency",
              "type": "string"
            },
            "uid": {
              "description": "UID of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids",
              "type": "string"
            }
          },
          "type": "object",
          "x-kubernetes-map-type": "atomic",
          "additionalProperties": false
        },
        "destinationClusterSelector": {
          "description": "DestinationClusterSelector identifies the cluster where add-ons will be deployed.\nBy default, this is nil and add-ons will be deployed in the very same cluster the\nevent happened.\nIf DestinationClusterSelector is set though, when an event happens in any of the\ncluster identified by SourceClusterSelector, add-ons will be deployed in each of\nthe cluster indentified by DestinationClusterSelector.",
          "properties": {
            "matchExpressions": {
              "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
              "items": {
                "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.",
                "properties": {
                  "key": {
                    "description": "key is the label key that the selector applies to.",
                    "type": "string"
                  },
                  "operator": {
                    "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.",
                    "type": "string"
                  },
                  "values": {
                    "description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array",
                    "x-kubernetes-list-type": "atomic"
                  }
                },
                "required": [
                  "key",
                  "operator"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array",
              "x-kubernetes-list-type": "atomic"
            },
            "matchLabels": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
              "type": "object"
            }
          },
          "type": "object",
          "x-kubernetes-map-type": "atomic",
          "additionalProperties": false
        },
        "driftExclusions": {
          "description": "DriftExclusions is a list of configuration drift exclusions to be applied when syncMode is\nset to ContinuousWithDriftDetection. Each exclusion specifies JSON6902 paths to ignore\nwhen evaluating drift, optionally targeting specific resources and features.\nThis field will be directly transferred to the ClusterProfile Spec\ngenerated in response to events.",
          "items": {
            "properties": {
              "paths": {
                "description": "Paths is a slice of JSON6902 paths to exclude from configuration drift evaluation.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "target": {
                "description": "Target points to the resources that the paths refers to.",
                "properties": {
                  "annotationSelector": {
                    "description": "AnnotationSelector is a string that follows the label selection expression\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api\nIt matches with the resource annotations.",
                    "type": "string"
                  },
                  "group": {
                    "description": "Group is the API group to select resources from.\nTogether with Version and Kind it is capable of unambiguously identifying and/or selecting resources.\nhttps://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md",
                    "type": "string"
                  },
                  "kind": {
                    "description": "Kind of the API Group to select resources from.\nTogether with Group and Version it is capable of unambiguously\nidentifying and/or selecting resources.\nhttps://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md",
                    "type": "string"
                  },
                  "labelSelector": {
                    "description": "LabelSelector is a string that follows the label selection expression\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api\nIt matches with the resource labels.",
                    "type": "string"
                  },
                  "name": {
                    "description": "Name to match resources with.",
                    "type": "string"
                  },
                  "namespace": {
                    "description": "Namespace to select resources from.",
                    "type": "string"
                  },
                  "version": {
                    "description": "Version of the API Group to select resources from.\nTogether with Group and Kind it is capable of unambiguously identifying and/or selecting resources.\nhttps://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md",
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            },
            "required": [
              "paths"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-type": "atomic"
        },
        "eventSourceName": {
          "description": "EventSourceName is the name of the referenced EventSource.\nResources contained in the referenced ConfigMaps/Secrets and HelmCharts\nwill be customized using information from resources matching the EventSource\nin the managed cluster.\nName can be expressed as a template and instantiate using:\n- cluster namespace: .Cluster.metadata.namespace\n- cluster name: .Cluster.metadata.name\n- cluster type: .Cluster.kind",
          "minLength": 1,
          "type": "string"
        },
        "extraAnnotations": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "ExtraAnnotations: These annotations will be added by Sveltos to all Kubernetes resources\ndeployed in a managed cluster based on this ClusterProfile/Profile instance.\n**Important:** If a resource deployed by Sveltos already has a annotation with a key present in\nExtraAnnotations, the value from ExtraAnnotations will override the existing value.\n(Deprecated use Patches instead)",
          "type": "object"
        },
        "extraLabels": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "ExtraLabels: These labels will be added by Sveltos to all Kubernetes resources deployed in\na managed cluster based on this ClusterProfile/Profile instance.\n**Important:** If a resource deployed by Sveltos already has a label with a key present in\nExtraLabels, the value from ExtraLabels will override the existing value.\n(Deprecated use Patches instead)",
          "type": "object"
        },
        "helmCharts": {
          "description": "Helm charts to be deployed in the matching clusters based on EventSource.\nThis field will be directly transferred to the ClusterProfile Spec\ngenerated in response to events.",
          "items": {
            "properties": {
              "chartName": {
                "description": "ChartName is the chart name\nThis field is used only when RepositoryURL points to a traditional HTTP or OCI repository.\nMust be defined otherwise.",
                "type": "string"
              },
              "chartVersion": {
                "description": "ChartVersion is the chart version\nThis field is used only when RepositoryURL points to a traditional HTTP or OCI repository.\nIt is ignored if RepositoryURL references a Flux Source.\nMust be defined otherwise.",
                "type": "string"
              },
              "helmChartAction": {
                "default": "Install",
                "description": "HelmChartAction is the action that will be taken on the helm chart",
                "enum": [
                  "Install",
                  "Uninstall"
                ],
                "type": "string"
              },
              "options": {
                "description": "Options allows to set flags which are used during installation.",
                "properties": {
                  "atomic": {
                    "default": false,
                    "description": "if set, the installation process deletes the installation/upgrades on failure.\nThe --wait flag will be set automatically if --atomic is used\nDefault to false",
                    "type": "boolean"
                  },
                  "dependencyUpdate": {
                    "default": false,
                    "description": "update dependencies if they are missing before installing the chart\nDefault to false",
                    "type": "boolean"
                  },
                  "description": {
                    "description": "Description is the description of an helm operation",
                    "type": "string"
                  },
                  "disableHooks": {
                    "default": false,
                    "description": "prevent hooks from running during install/upgrade/uninstall\nDefault to false",
                    "type": "boolean"
                  },
                  "disableOpenAPIValidation": {
                    "default": false,
                    "description": "if set, the installation process will not validate rendered templates against the Kubernetes OpenAPI Schema\nDefault to false",
                    "type": "boolean"
                  },
                  "enableClientCache": {
                    "default": false,
                    "description": "EnableClientCache is a flag to enable Helm client cache. If it is not specified, it will be set to false.",
                    "type": "boolean"
                  },
                  "installOptions": {
                    "description": "HelmInstallOptions are options specific to helm install",
                    "properties": {
                      "createNamespace": {
                        "default": true,
                        "description": "Create the release namespace if not present. Defaults to true",
                        "type": "boolean"
                      },
                      "disableHooks": {
                        "default": false,
                        "description": "prevent hooks from running during install. If set to true, overrides\nDisableHooks in HelmOptions. Use this one when you want to selective\ndisable hooks on install\nDefault to false",
                        "type": "boolean"
                      },
                      "replace": {
                        "default": true,
                        "description": "Replaces if set indicates to replace an older release with this one",
                        "type": "boolean"
                      },
                      "takeOwnership": {
                        "default": false,
                        "description": "if set, install will ignore the check for helm annotations\nand take ownership of the existing resources",
                        "type": "boolean"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "labels": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Labels that would be added to release metadata.",
                    "type": "object"
                  },
                  "passCredentialsAll": {
                    "description": "PassCredentialsAll is the flag to pass credentials to all domains",
                    "type": "boolean"
                  },
                  "runTests": {
                    "default": false,
                    "description": "RunTests if set to true, Sveltos will run helm test after each successful install or upgrade\noperation. The tests are the test hooks defined in the chart (annotated with\n\"helm.sh/hook: test\"). If any test fails the deployment is considered failed and the\nerror is surfaced in the ClusterSummary status, providing operational gating.\nHas no effect in DryRun mode.\nDefault to false",
                    "type": "boolean"
                  },
                  "skipCRDs": {
                    "default": false,
                    "description": "SkipCRDs controls whether CRDs should be installed during install/upgrade operation.\nBy default, CRDs are installed if not already present.",
                    "type": "boolean"
                  },
                  "skipSchemaValidation": {
                    "default": false,
                    "description": "SkipSchemaValidation determines if JSON schema validation is disabled.",
                    "type": "boolean"
                  },
                  "timeout": {
                    "description": "time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s)",
                    "type": "string"
                  },
                  "uninstallOptions": {
                    "description": "HelmUninstallOptions are options specific to helm uninstall",
                    "properties": {
                      "deletionPropagation": {
                        "description": "DeletionPropagation",
                        "enum": [
                          "orphan",
                          "foreground",
                          "background"
                        ],
                        "type": "string"
                      },
                      "disableHooks": {
                        "default": false,
                        "description": "prevent hooks from running during install. If set to true, overrides\nDisableHooks in HelmOptions. Use this one when you want to selective\ndisable hooks on uninstall\nDefault to false",
                        "type": "boolean"
                      },
                      "keepHistory": {
                        "description": "When uninstall a chart with this flag, Helm removes the resources associated with the chart,\nbut it keeps the release information. This allows to see details about the uninstalled release\nusing the helm history command.",
                        "type": "boolean"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "upgradeOptions": {
                    "description": "HelmUpgradeOptions are options specific to helm upgrade",
                    "properties": {
                      "cleanupOnFail": {
                        "default": false,
                        "description": "CleanupOnFail will, if true, cause the upgrade to delete newly-created resources on a failed update.",
                        "type": "boolean"
                      },
                      "disableHooks": {
                        "default": false,
                        "description": "prevent hooks from running during install. If set to true, overrides\nDisableHooks in HelmOptions. Use this one when you want to selective\ndisable hooks on upgrade\nDefault to false",
                        "type": "boolean"
                      },
                      "force": {
                        "default": false,
                        "description": "Force will, if set to true, ignore certain warnings and perform the upgrade anyway.\nThis should be used with caution.",
                        "type": "boolean"
                      },
                      "maxHistory": {
                        "default": 2,
                        "description": "MaxHistory limits the maximum number of revisions saved per release\nDefault to 2",
                        "type": "integer"
                      },
                      "recreate": {
                        "default": false,
                        "description": "Recreate will (if true) recreate pods after a rollback.\n\nDeprecated: This field is no longer supported",
                        "type": "boolean"
                      },
                      "resetThenReuseValues": {
                        "default": false,
                        "description": "ResetThenReuseValues will reset the values to the chart's built-ins then merge with user's last supplied values.",
                        "type": "boolean"
                      },
                      "resetValues": {
                        "default": false,
                        "description": "ResetValues will reset the values to the chart's built-ins rather than merging with existing.",
                        "type": "boolean"
                      },
                      "reuseValues": {
                        "default": false,
                        "description": "ReuseValues copies values from the current release to a new release if the\nnew release does not have any values. If the request already has values,\nor if there are no values in the current release, this does nothing.\nThis is skipped if the ResetValues flag is set, in which case the\nrequest values are not altered.",
                        "type": "boolean"
                      },
                      "subNotes": {
                        "default": false,
                        "description": "SubNotes determines whether sub-notes are rendered in the chart.",
                        "type": "boolean"
                      },
                      "takeOwnership": {
                        "default": false,
                        "description": "if set, upgrade will ignore the check for helm annotations\nand take ownership of the existing resources",
                        "type": "boolean"
                      },
                      "upgradeCRDs": {
                        "default": false,
                        "description": "UpgradeCRDs upgrade CRDs from the Helm Chart's crds directory\nBy default, CRDs are not applied during Helm upgrade action by Helm\nhttps://helm.sh/docs/chart_best_practices/custom_resource_definitions/",
                        "type": "boolean"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "wait": {
                    "default": false,
                    "description": "if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet\nare in a ready state before marking the release as successful. It will wait for as long as --timeout\nDefault to false",
                    "type": "boolean"
                  },
                  "waitForJobs": {
                    "default": false,
                    "description": "if set and --wait enabled, will wait until all Jobs have been completed before marking the release as successful.\nIt will wait for as long as --timeout\nDefault to false",
                    "type": "boolean"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "registryCredentialsConfig": {
                "description": "RegistryCredentialsConfig is an optional configuration for credentials,\nincluding information to connect to private registries.",
                "properties": {
                  "ca": {
                    "description": "CASecretRef references a secret containing the TLS CA certificate\nFor ClusterProfile namespace can be left empty. In such a case, namespace will\nbe implicit set to cluster's namespace.\nkey: ca.crt",
                    "properties": {
                      "name": {
                        "description": "name is unique within a namespace to reference a secret resource.",
                        "type": "string"
                      },
                      "namespace": {
                        "description": "namespace defines the space within which the secret name must be unique.",
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "x-kubernetes-map-type": "atomic",
                    "additionalProperties": false
                  },
                  "credentials": {
                    "description": "CredentialsSecretRef references a secret containing credentials\nFor ClusterProfile namespace can be left empty. In such a case, namespace will\nbe implicit set to cluster's namespace.",
                    "properties": {
                      "name": {
                        "description": "name is unique within a namespace to reference a secret resource.",
                        "type": "string"
                      },
                      "namespace": {
                        "description": "namespace defines the space within which the secret name must be unique.",
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "x-kubernetes-map-type": "atomic",
                    "additionalProperties": false
                  },
                  "insecureSkipTLSVerify": {
                    "description": "InsecureSkipTLSVerify controls server certificate verification.",
                    "type": "boolean"
                  },
                  "key": {
                    "description": "Key specifies the key within the CredentialsSecretRef containing the data\nIf not specified, it defaults to the only key in the secret if there's just one.",
                    "type": "string"
                  },
                  "plainHTTP": {
                    "description": "PlainHTTP indicates to use insecure HTTP connections for the chart download",
                    "type": "boolean"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "releaseName": {
                "description": "ReleaseName is the chart release",
                "minLength": 1,
                "type": "string"
              },
              "releaseNamespace": {
                "description": "ReleaseNamespace is the namespace release will be installed",
                "minLength": 1,
                "type": "string"
              },
              "repositoryName": {
                "description": "RepositoryName is the name helm chart repository\nThis field is used only when RepositoryURL points to a traditional HTTP or OCI repository.\nIt is ignored if RepositoryURL references a Flux Source.\nMust be defined otherwise.",
                "type": "string"
              },
              "repositoryURL": {
                "description": "RepositoryURL is the URL helm chart repository\nIt can point to a traditional HTTP-based repository or an OCI registry.\nExamples:\n  - HTTP Repository: https://charts.example.com/stable\n  - OCI Registry: oci://registry.example.com/namespace/charts\n  - GitHub Pages: https://<username>.github.io/<repository>/\n  - Any other valid URL where Helm charts are hosted.\n\nAlternatively, it can be a Flux source reference:\n  <flux source kind>://<flux source namespace>/<flux source name>/<path>\n\nWhere:\n  - <flux source kind> is the type of Flux source (gitrepository, ocirepository, bucket).\n  - <flux source namespace> and <flux source name> are the namespace and name of the Flux Source in the management cluster.\n  - <path> is the path within the source repository where the Helm charts are located.\n\nFor instance:\n  gitrepository://flux-system/flux-system/charts/projectsveltos\n\nAssuming there is a Flux GitRepository named 'flux-system' in the 'flux-system' namespace\nsyncing 'https://github.com/projectsveltos/helm-charts.git/', and the Helm charts are\nlocated in the 'charts/projectsveltos' directory of that repository.",
                "minLength": 1,
                "type": "string"
              },
              "values": {
                "description": "Values field allows to define configuration for the Helm release.\nThese values can be static or leverage Go templates for dynamic customization.\nWhen expressed as templates, the values are filled in using information from\nresources within the management cluster before deployment (Cluster and TemplateResourceRefs)",
                "type": "string"
              },
              "valuesFrom": {
                "description": "ValuesFrom can reference ConfigMap/Secret instances. Within the ConfigMap or Secret data,\nit is possible to store configuration for the Helm release.\nThese values can be static or leverage Go templates for dynamic customization.\nWhen expressed as templates, the values are filled in using information from\nresources within the management cluster before deployment (Cluster and TemplateResourceRefs)",
                "items": {
                  "properties": {
                    "kind": {
                      "description": "Kind of the resource. Supported kinds are:\n- ConfigMap/Secret",
                      "enum": [
                        "ConfigMap",
                        "Secret"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "Name of the referenced resource.\nName can be expressed as a template and instantiate using any cluster field.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "namespace": {
                      "description": "Namespace of the referenced resource.\nFor ClusterProfile namespace can be left empty. In such a case, namespace will\nbe implicit set to cluster's namespace.\nFor Profile namespace must be left empty. The Profile namespace will be used.\nNamespace can be expressed as a template and instantiate using any cluster field.",
                      "type": "string"
                    },
                    "optional": {
                      "default": false,
                      "description": "Optional indicates that the referenced resource is not mandatory.\nIf set to true and the resource is not found, the error will be ignored,\nand Sveltos will continue processing other ValueFroms.",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "kind",
                    "name"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              }
            },
            "required": [
              "releaseName",
              "releaseNamespace",
              "repositoryURL"
            ],
            "type": "object",
            "x-kubernetes-validations": [
              {
                "message": "ChartName must be defined",
                "rule": "self.repositoryURL.startsWith('http') ? size(self.chartName) >= 1 : true"
              },
              {
                "message": "ChartName must be defined",
                "rule": "self.repositoryURL.startsWith('oci') ? size(self.chartName) >= 1 : true"
              },
              {
                "message": "ChartVersion must be defined",
                "rule": "self.repositoryURL.startsWith('http') ? size(self.chartVersion) >= 1 : true"
              },
              {
                "message": "ChartVersion must be defined",
                "rule": "self.repositoryURL.startsWith('oci') ? size(self.chartVersion) >= 1 : true"
              },
              {
                "message": "RepositoryName must be defined",
                "rule": "self.repositoryURL.startsWith('http') ? size(self.repositoryName) >= 1 : true"
              },
              {
                "message": "RepositoryName must be defined",
                "rule": "self.repositoryURL.startsWith('oci') ? size(self.repositoryName) >= 1 : true"
              }
            ],
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-type": "atomic"
        },
        "kustomizationRefs": {
          "description": "Kustomization refs\nThis field will be directly transferred to the ClusterProfile Spec\ngenerated in response to events.",
          "items": {
            "properties": {
              "components": {
                "description": "Components is a list of paths to Kustomize components. These paths are relative to the\nPath field and are included in the Kustomize build to provide reusable configuration logic.\nThe paths can be static or leverage Go templates for dynamic customization.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "deploymentType": {
                "default": "Remote",
                "description": "DeploymentType indicates whether resources need to be deployed\ninto the management cluster (local) or the managed cluster (remote)\nNOTE: DeploymentType Local cannot be used when the matching cluster is the management cluster itself.",
                "enum": [
                  "Local",
                  "Remote"
                ],
                "type": "string"
              },
              "kind": {
                "description": "Kind of the resource. Supported kinds are:\n- flux GitRepository;OCIRepository;Bucket\n- ConfigMap/Secret",
                "enum": [
                  "GitRepository",
                  "OCIRepository",
                  "Bucket",
                  "ConfigMap",
                  "Secret"
                ],
                "type": "string"
              },
              "name": {
                "description": "Name of the referenced resource.\nName can be expressed as a template and instantiate using any cluster field.",
                "minLength": 1,
                "type": "string"
              },
              "namespace": {
                "description": "Namespace of the referenced resource.\nFor ClusterProfile namespace can be left empty. In such a case, namespace will\nbe implicit set to cluster's namespace.\nFor Profile namespace must be left empty. The Profile namespace will be used.\nNamespace can be expressed as a template and instantiate using any cluster field.",
                "type": "string"
              },
              "optional": {
                "default": false,
                "description": "Optional indicates that the referenced resource is not mandatory.\nIf set to true and the resource is not found, the error will be ignored,\nand Sveltos will continue processing other ValueFroms.",
                "type": "boolean"
              },
              "path": {
                "description": "Path to the directory containing the kustomization.yaml file, or the\nset of plain YAMLs a kustomization.yaml should be generated for.\nDefaults to 'None', which translates to the root path of the SourceRef.\nThese values can be static or leverage Go templates for dynamic customization.\nWhen expressed as templates, the values are filled in using information from\nresources within the management cluster before deployment (Cluster)",
                "type": "string"
              },
              "skipNamespaceCreation": {
                "default": false,
                "description": "SkipNamespaceCreation indicates whether Sveltos should skip creating the namespace\nfor namespaced resources defined in this KustomizationRef.\nThis field is ignored for cluster-scoped resources.\nBy default, Sveltos attempts to get or create the target namespace if it does not exist.\nSetting this to true avoids those calls, which is necessary when Sveltos lacks\npermissions to manage namespaces at the cluster level.",
                "type": "boolean"
              },
              "targetNamespace": {
                "description": "TargetNamespace sets or overrides the namespace in the\nkustomization.yaml file.",
                "maxLength": 63,
                "minLength": 1,
                "type": "string"
              },
              "tier": {
                "default": 100,
                "description": "Tier controls the order of deployment for resources coming from different KustomizationRef\nwithin the same ClusterProfile or Profile.\nWhen two KustomizationRef attempt to deploy the same resource, the KustomizationRef with the lowest\nTier value takes priority and deploys/updates the resource.\nThis priority mechanism is only checked after the parent ClusterProfile has won\nthe primary conflict resolution against other ClusterProfiles.\nHigher Tier values represent lower priority. The default Tier value is 100.",
                "format": "int32",
                "minimum": 1,
                "type": "integer"
              },
              "values": {
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Values is a map[string]string type that allows to define a set of key-value pairs.\nThese key-value pairs can optionally leverage Go templates for further processing.\nWith Sveltos, you can define key-value pairs where the values can be Go templates.\nThese templates have access to management cluster information during deployment. This allows\nto do more than just replace placeholders. Variables can be used to dynamically\nconstruct values based on other resources or variables within the Kustomize output.\nFor example, imagine you have a Region key with a template value like:\n'{{ index .Cluster.metadata.labels \"region\" }}'.\nThis template retrieves the region label from the cluster instance metadata.\nFinally, Sveltos uses these processed values to fill placeholders in the Kustomize output.\nThe output itself can also contain templates, like:\nregion: '{{ default \"west\" .Region }}'.\nThis way, the final output from Kustomize will have the region set dynamically based on\nthe actual region retrieved earlier.",
                "type": "object"
              },
              "valuesFrom": {
                "description": "ValuesFrom can reference ConfigMap/Secret instances. Within the ConfigMap or Secret data,\nit is possible to define key-value pairs. These key-value pairs can optionally leverage\nGo templates for further processing.\nWith Sveltos, you can define key-value pairs where the values can be Go templates.\nThese templates have access to management cluster information during deployment. This allows\nto do more than just replace placeholders. Variables can be used to dynamically\nconstruct values based on other resources or variables within the Kustomize output.\nFor example, imagine you have a Region key with a template value like:\n'{{ index .Cluster.metadata.labels \"region\" }}'.\nThis template retrieves the region label from the cluster instance metadata.\nFinally, Sveltos uses these processed values to fill placeholders in the Kustomize output.\nThe output itself can also contain templates, like:\nregion: '{{ default \"west\" .Region }}'.\nThis way, the final output from Kustomize will have the region set dynamically based on\nthe actual region retrieved earlier.",
                "items": {
                  "properties": {
                    "kind": {
                      "description": "Kind of the resource. Supported kinds are:\n- ConfigMap/Secret",
                      "enum": [
                        "ConfigMap",
                        "Secret"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "Name of the referenced resource.\nName can be expressed as a template and instantiate using any cluster field.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "namespace": {
                      "description": "Namespace of the referenced resource.\nFor ClusterProfile namespace can be left empty. In such a case, namespace will\nbe implicit set to cluster's namespace.\nFor Profile namespace must be left empty. The Profile namespace will be used.\nNamespace can be expressed as a template and instantiate using any cluster field.",
                      "type": "string"
                    },
                    "optional": {
                      "default": false,
                      "description": "Optional indicates that the referenced resource is not mandatory.\nIf set to true and the resource is not found, the error will be ignored,\nand Sveltos will continue processing other ValueFroms.",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "kind",
                    "name"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              }
            },
            "required": [
              "kind",
              "name",
              "namespace"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-type": "atomic"
        },
        "maxUpdate": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "string"
            }
          ],
          "description": "The maximum number of clusters that can be updated concurrently.\nValue can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).\nDefaults to 100%.\nExample: when this is set to 30%, when list of add-ons/applications in ClusterProfile\nchanges, only 30% of matching clusters will be updated in parallel. Only when updates\nin those cluster succeed, other matching clusters are updated.\nThis field will be directly transferred to the ClusterProfile Spec\ngenerated in response to events.",
          "pattern": "^((100|[0-9]{1,2})%|[0-9]+)$",
          "x-kubernetes-int-or-string": true
        },
        "oneForEvent": {
          "description": "Multiple resources in a managed cluster can be a match for referenced\nEventSource. OneForEvent indicates whether a ClusterProfile for all\nresource (OneForEvent = false) or one per resource (OneForEvent = true)\nneeds to be creted.",
          "type": "boolean",
          "x-kubernetes-validations": [
            {
              "message": "Value is immutable",
              "rule": "self == oldSelf"
            }
          ]
        },
        "patches": {
          "description": "Define additional Kustomize inline Patches applied for all resources on this profile\nWithin the Patch Spec you can use templating\nThis field will be directly transferred to the ClusterProfile Spec\ngenerated in response to events.",
          "items": {
            "description": "Patch contains an inline StrategicMerge or JSON6902 patch, and the target the patch should\nbe applied to.",
            "properties": {
              "patch": {
                "description": "Patch contains an inline StrategicMerge patch or an inline JSON6902 patch with\nan array of operation objects.\nThese values can be static or leverage Go templates for dynamic customization.\nWhen expressed as templates, the values are filled in using information from\nresources within the management cluster before deployment (Cluster and TemplateResourceRefs)",
                "type": "string"
              },
              "target": {
                "description": "Target points to the resources that the patch document should be applied to.",
                "properties": {
                  "annotationSelector": {
                    "description": "AnnotationSelector is a string that follows the label selection expression\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api\nIt matches with the resource annotations.",
                    "type": "string"
                  },
                  "group": {
                    "description": "Group is the API group to select resources from.\nTogether with Version and Kind it is capable of unambiguously identifying and/or selecting resources.\nhttps://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md",
                    "type": "string"
                  },
                  "kind": {
                    "description": "Kind of the API Group to select resources from.\nTogether with Group and Version it is capable of unambiguously\nidentifying and/or selecting resources.\nhttps://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md",
                    "type": "string"
                  },
                  "labelSelector": {
                    "description": "LabelSelector is a string that follows the label selection expression\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api\nIt matches with the resource labels.",
                    "type": "string"
                  },
                  "name": {
                    "description": "Name to match resources with.",
                    "type": "string"
                  },
                  "namespace": {
                    "description": "Namespace to select resources from.",
                    "type": "string"
                  },
                  "version": {
                    "description": "Version of the API Group to select resources from.\nTogether with Group and Kind it is capable of unambiguously identifying and/or selecting resources.\nhttps://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md",
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            },
            "required": [
              "patch"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-type": "atomic"
        },
        "patchesFrom": {
          "description": "PatchesFrom can reference ConfigMap/Secret instances. Within the ConfigMap or Secret data,\nit is possible to store additional Kustomize inline Patches applied for all resources on this profile\nThese values can be static or leverage Go templates for dynamic customization.\nWhen expressed as templates, the values are filled in using information from\nresources within the management cluster before deployment (Cluster and TemplateResourceRefs)",
          "items": {
            "properties": {
              "kind": {
                "description": "Kind of the resource. Supported kinds are:\n- ConfigMap/Secret",
                "enum": [
                  "ConfigMap",
                  "Secret"
                ],
                "type": "string"
              },
              "name": {
                "description": "Name of the referenced resource.\nName can be expressed as a template and instantiate using any cluster field.",
                "minLength": 1,
                "type": "string"
              },
              "namespace": {
                "description": "Namespace of the referenced resource.\nFor ClusterProfile namespace can be left empty. In such a case, namespace will\nbe implicit set to cluster's namespace.\nFor Profile namespace must be left empty. The Profile namespace will be used.\nNamespace can be expressed as a template and instantiate using any cluster field.",
                "type": "string"
              },
              "optional": {
                "default": false,
                "description": "Optional indicates that the referenced resource is not mandatory.\nIf set to true and the resource is not found, the error will be ignored,\nand Sveltos will continue processing other ValueFroms.",
                "type": "boolean"
              }
            },
            "required": [
              "kind",
              "name"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-type": "atomic"
        },
        "policyRefs": {
          "description": "PolicyRefs references all the ConfigMaps/Secrets containing kubernetes resources\nthat need to be deployed in the matching clusters based on EventSource.\nThis field will be directly transferred to the ClusterProfile Spec\ngenerated in response to events.",
          "items": {
            "properties": {
              "deploymentType": {
                "default": "Remote",
                "description": "DeploymentType indicates whether resources need to be deployed\ninto the management cluster (local) or the managed cluster (remote)",
                "enum": [
                  "Local",
                  "Remote"
                ],
                "type": "string"
              },
              "kind": {
                "description": "Kind of the resource. Supported kinds are:\n- ConfigMap/Secret\n- flux GitRepository;OCIRepository;Bucket\nRequired when RemoteURL is not set.",
                "enum": [
                  "GitRepository",
                  "OCIRepository",
                  "Bucket",
                  "ConfigMap",
                  "Secret"
                ],
                "type": "string"
              },
              "name": {
                "description": "Name of the referenced resource.\nName can be expressed as a template and instantiate using any cluster field.\nRequired when RemoteURL is not set.",
                "type": "string"
              },
              "namespace": {
                "description": "Namespace of the referenced resource.\nFor ClusterProfile namespace can be left empty. In such a case, namespace will\nbe implicit set to cluster's namespace.\nFor Profile namespace must be left empty. Profile namespace will be used.\nNamespace can be expressed as a template and instantiate using any cluster field.\nNot used when RemoteURL is set.",
                "type": "string"
              },
              "optional": {
                "default": false,
                "description": "Optional indicates that the referenced resource is not mandatory.\nIf set to true and the resource is not found, the error will be ignored,\nand Sveltos will continue processing other PolicyRefs.",
                "type": "boolean"
              },
              "path": {
                "description": "Path to the directory containing the YAML files.\nDefaults to 'None', which translates to the root path of the SourceRef.\nUsed only for GitRepository;OCIRepository;Bucket",
                "type": "string"
              },
              "remoteURL": {
                "description": "RemoteURL configures fetching content from an HTTP/HTTPS endpoint.\nWhen set, Kind/Name/Namespace must be omitted.",
                "properties": {
                  "interval": {
                    "description": "Interval defines how often Sveltos re-fetches the URL to detect changes.\nDefaults to 5 minutes.",
                    "type": "string"
                  },
                  "secretRef": {
                    "description": "SecretRef references a Secret in the management cluster containing optional\ncredentials for fetching the URL. Supported Secret keys:\n  \"token\"              \u2014 Bearer token (Authorization: Bearer <token>)\n  \"username\"+\"password\" \u2014 HTTP Basic Auth\n  \"caFile\"             \u2014 PEM-encoded CA certificate for TLS verification",
                    "properties": {
                      "name": {
                        "default": "",
                        "description": "Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "x-kubernetes-map-type": "atomic",
                    "additionalProperties": false
                  },
                  "template": {
                    "description": "Template indicates that the content served at URL is a Go template that\nmust be instantiated using cluster fields and templateResourceRefs values\nbefore deployment. Equivalent to the projectsveltos.io/template annotation\non a ConfigMap or Secret.",
                    "type": "boolean"
                  },
                  "url": {
                    "description": "URL is an HTTP/HTTPS endpoint serving raw YAML/JSON/KYAML content.\nSveltos fetches the content on every reconciliation and redeploys if the\ncontent hash has changed.",
                    "pattern": "^https?://",
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "skipNamespaceCreation": {
                "default": false,
                "description": "SkipNamespaceCreation indicates whether Sveltos should skip creating the namespace\nfor namespaced resources defined in this PolicyRef.\nThis field is ignored for cluster-scoped resources.\nBy default, Sveltos attempts to get or create the target namespace if it does not exist.\nSetting this to true avoids those calls, which is necessary when Sveltos lacks\npermissions to manage namespaces at the cluster level.",
                "type": "boolean"
              },
              "tier": {
                "default": 100,
                "description": "Tier controls the order of deployment for resources coming from different PolicyRefs\nwithin the same ClusterProfile or Profile.\nWhen two PolicyRefs attempt to deploy the same resource, the PolicyRef with the lowest\nTier value takes priority and deploys/updates the resource.\nThis priority mechanism is only checked after the parent ClusterProfile has won\nthe primary conflict resolution against other ClusterProfiles.\nHigher Tier values represent lower priority. The default Tier value is 100.",
                "format": "int32",
                "minimum": 1,
                "type": "integer"
              }
            },
            "type": "object",
            "x-kubernetes-validations": [
              {
                "message": "either remoteURL or kind must be set, but not both",
                "rule": "has(self.remoteURL) != has(self.kind)"
              }
            ],
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-type": "atomic"
        },
        "postDeleteChecks": {
          "description": "PostDeleteChecks is a slice of Lua functions to run against\nthe managed cluster *after* Sveltos has deleted all resources.\nThis ensures that the environment has reached the desired clean state.",
          "items": {
            "properties": {
              "evaluateCEL": {
                "description": "EvaluateCEL contains a list of named CEL (Common Expression Language) rules.\nEach rule will be evaluated in order against each object selected based on\nthe criteria defined above. Each rule's expression must return a boolean value\nindicating whether the object is a match.\n\nEvaluation stops at the first rule that returns true; subsequent\nrules will not be evaluated.",
                "items": {
                  "description": "CELRule defines a named CEL rule used in EvaluateCEL.",
                  "properties": {
                    "name": {
                      "description": "Name is a human-readable identifier for the rule.",
                      "type": "string"
                    },
                    "rule": {
                      "description": "Rule is the CEL (Common Expression Language) expression to evaluate.\nIt must return a bool",
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "rule"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "featureID": {
                "description": "FeatureID is an indentifier of the feature (Helm/Kustomize/Resources)\nThis field indicates when to run this check.\nFor instance:\n- if set to Helm this check will be run after all helm\ncharts specified in the ClusterProfile are deployed.\n- if set to Resources this check will be run after the content\nof all the ConfigMaps/Secrets referenced by ClusterProfile in the\nPolicyRef sections is deployed",
                "enum": [
                  "Resources",
                  "Helm",
                  "Kustomize"
                ],
                "type": "string"
              },
              "group": {
                "description": "Group of the resource to fetch in the managed Cluster.",
                "type": "string"
              },
              "kind": {
                "description": "Kind of the resource to fetch in the managed Cluster.",
                "minLength": 1,
                "type": "string"
              },
              "labelFilters": {
                "description": "LabelFilters allows to filter resources based on current labels.",
                "items": {
                  "properties": {
                    "key": {
                      "description": "Key is the label key",
                      "type": "string"
                    },
                    "operation": {
                      "description": "Operation is the comparison operation",
                      "enum": [
                        "Equal",
                        "Different",
                        "Has",
                        "DoesNotHave"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "description": "Value is the label value",
                      "type": "string"
                    }
                  },
                  "required": [
                    "key",
                    "operation"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "name": {
                "description": "Name is the name of this check",
                "type": "string"
              },
              "namespace": {
                "description": "Namespace of the resource to fetch in the managed Cluster.\nEmpty for resources scoped at cluster level.",
                "type": "string"
              },
              "script": {
                "description": "Script is a text containing a lua script.\nMust return struct with field \"health\"\nrepresenting whether object is a match (true or false)",
                "type": "string"
              },
              "version": {
                "description": "Version of the resource to fetch in the managed Cluster.",
                "type": "string"
              }
            },
            "required": [
              "featureID",
              "group",
              "kind",
              "name",
              "version"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-type": "atomic"
        },
        "preDeleteChecks": {
          "description": "PreDeleteChecks is a slice of Lua functions to run against\nthe managed cluster *before* Sveltos starts deleting resources.\nIf any of these fail, the deletion process is halted.",
          "items": {
            "properties": {
              "evaluateCEL": {
                "description": "EvaluateCEL contains a list of named CEL (Common Expression Language) rules.\nEach rule will be evaluated in order against each object selected based on\nthe criteria defined above. Each rule's expression must return a boolean value\nindicating whether the object is a match.\n\nEvaluation stops at the first rule that returns true; subsequent\nrules will not be evaluated.",
                "items": {
                  "description": "CELRule defines a named CEL rule used in EvaluateCEL.",
                  "properties": {
                    "name": {
                      "description": "Name is a human-readable identifier for the rule.",
                      "type": "string"
                    },
                    "rule": {
                      "description": "Rule is the CEL (Common Expression Language) expression to evaluate.\nIt must return a bool",
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "rule"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "featureID": {
                "description": "FeatureID is an indentifier of the feature (Helm/Kustomize/Resources)\nThis field indicates when to run this check.\nFor instance:\n- if set to Helm this check will be run after all helm\ncharts specified in the ClusterProfile are deployed.\n- if set to Resources this check will be run after the content\nof all the ConfigMaps/Secrets referenced by ClusterProfile in the\nPolicyRef sections is deployed",
                "enum": [
                  "Resources",
                  "Helm",
                  "Kustomize"
                ],
                "type": "string"
              },
              "group": {
                "description": "Group of the resource to fetch in the managed Cluster.",
                "type": "string"
              },
              "kind": {
                "description": "Kind of the resource to fetch in the managed Cluster.",
                "minLength": 1,
                "type": "string"
              },
              "labelFilters": {
                "description": "LabelFilters allows to filter resources based on current labels.",
                "items": {
                  "properties": {
                    "key": {
                      "description": "Key is the label key",
                      "type": "string"
                    },
                    "operation": {
                      "description": "Operation is the comparison operation",
                      "enum": [
                        "Equal",
                        "Different",
                        "Has",
                        "DoesNotHave"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "description": "Value is the label value",
                      "type": "string"
                    }
                  },
                  "required": [
                    "key",
                    "operation"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "name": {
                "description": "Name is the name of this check",
                "type": "string"
              },
              "namespace": {
                "description": "Namespace of the resource to fetch in the managed Cluster.\nEmpty for resources scoped at cluster level.",
                "type": "string"
              },
              "script": {
                "description": "Script is a text containing a lua script.\nMust return struct with field \"health\"\nrepresenting whether object is a match (true or false)",
                "type": "string"
              },
              "version": {
                "description": "Version of the resource to fetch in the managed Cluster.",
                "type": "string"
              }
            },
            "required": [
              "featureID",
              "group",
              "kind",
              "name",
              "version"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-type": "atomic"
        },
        "preDeployChecks": {
          "description": "PreDeployChecks is a slice of checks to run against the managed cluster\n*before* Sveltos starts deploying resources.\nEach check can use Lua scripts or CEL expressions to validate the cluster state.\nIf any check fails, the deployment of the associated feature is halted.",
          "items": {
            "properties": {
              "evaluateCEL": {
                "description": "EvaluateCEL contains a list of named CEL (Common Expression Language) rules.\nEach rule will be evaluated in order against each object selected based on\nthe criteria defined above. Each rule's expression must return a boolean value\nindicating whether the object is a match.\n\nEvaluation stops at the first rule that returns true; subsequent\nrules will not be evaluated.",
                "items": {
                  "description": "CELRule defines a named CEL rule used in EvaluateCEL.",
                  "properties": {
                    "name": {
                      "description": "Name is a human-readable identifier for the rule.",
                      "type": "string"
                    },
                    "rule": {
                      "description": "Rule is the CEL (Common Expression Language) expression to evaluate.\nIt must return a bool",
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "rule"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "featureID": {
                "description": "FeatureID is an indentifier of the feature (Helm/Kustomize/Resources)\nThis field indicates when to run this check.\nFor instance:\n- if set to Helm this check will be run after all helm\ncharts specified in the ClusterProfile are deployed.\n- if set to Resources this check will be run after the content\nof all the ConfigMaps/Secrets referenced by ClusterProfile in the\nPolicyRef sections is deployed",
                "enum": [
                  "Resources",
                  "Helm",
                  "Kustomize"
                ],
                "type": "string"
              },
              "group": {
                "description": "Group of the resource to fetch in the managed Cluster.",
                "type": "string"
              },
              "kind": {
                "description": "Kind of the resource to fetch in the managed Cluster.",
                "minLength": 1,
                "type": "string"
              },
              "labelFilters": {
                "description": "LabelFilters allows to filter resources based on current labels.",
                "items": {
                  "properties": {
                    "key": {
                      "description": "Key is the label key",
                      "type": "string"
                    },
                    "operation": {
                      "description": "Operation is the comparison operation",
                      "enum": [
                        "Equal",
                        "Different",
                        "Has",
                        "DoesNotHave"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "description": "Value is the label value",
                      "type": "string"
                    }
                  },
                  "required": [
                    "key",
                    "operation"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "name": {
                "description": "Name is the name of this check",
                "type": "string"
              },
              "namespace": {
                "description": "Namespace of the resource to fetch in the managed Cluster.\nEmpty for resources scoped at cluster level.",
                "type": "string"
              },
              "script": {
                "description": "Script is a text containing a lua script.\nMust return struct with field \"health\"\nrepresenting whether object is a match (true or false)",
                "type": "string"
              },
              "version": {
                "description": "Version of the resource to fetch in the managed Cluster.",
                "type": "string"
              }
            },
            "required": [
              "featureID",
              "group",
              "kind",
              "name",
              "version"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-type": "atomic"
        },
        "profileNameFormat": {
          "description": "InstantiatedProfileNameFormat defines a template used to generate the name\nof the ClusterProfile created in the management cluster. The template can reference:\n- .Cluster.metadata.namespace: namespace of the managed cluster\n- .Cluster.metadata.name: name of the managed cluster\n- .Cluster.kind: kind of the managed cluster object\n- event data",
          "type": "string"
        },
        "reloader": {
          "default": false,
          "description": "Reloader indicates whether Deployment/StatefulSet/DaemonSet instances deployed\nby Sveltos and part of this ClusterProfile need to be restarted via rolling upgrade\nwhen a ConfigMap/Secret instance mounted as volume is modified.\nWhen set to true, when any mounted ConfigMap/Secret is modified, Sveltos automatically\nstarts a rolling upgrade for Deployment/StatefulSet/DaemonSet instances mounting it.\nThis field will be directly transferred to the ClusterProfile Spec\ngenerated in response to events.",
          "type": "boolean"
        },
        "secretGenerator": {
          "description": "The SecretGenerator field references Secrets containing templates.\nThese referenced Secret will be dynamically instantiated in the management cluster\nbased on event data.",
          "items": {
            "properties": {
              "name": {
                "description": "Name of the referenced resource.\nName can be expressed as a template and instantiate using\n- .Cluster.metadata.namespace: namespace of the managed cluster\n- .Cluster.metadata.name: name of the managed cluster\n- .Cluster.kind: kind of the managed cluster object",
                "minLength": 1,
                "type": "string"
              },
              "nameFormat": {
                "description": "InstantiatedResourceNameFormat defines a template used to generate the name\nof the resource created in the management cluster. The template can reference:\n- .Cluster.metadata.namespace: namespace of the managed cluster\n- .Cluster.metadata.name: name of the managed cluster\n- .Cluster.kind: kind of the managed cluster object\n- event data",
                "minLength": 1,
                "type": "string"
              },
              "namespace": {
                "description": "Namespace of the referenced resource.\nNamespace can be left empty. In such a case, namespace will\nbe implicit set to cluster's namespace.",
                "type": "string"
              },
              "optional": {
                "default": false,
                "description": "Optional indicates that the referenced resource is not mandatory.\nIf set to true and the resource is not found, the error will be ignored,\nand Sveltos will continue processing other generators.",
                "type": "boolean"
              }
            },
            "required": [
              "name",
              "nameFormat"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "sourceClusterSelector": {
          "description": "SourceClusterSelector identifies clusters to associate to.\nThis represents the set of clusters where Sveltos will watch for\nevents defined by referenced EventSource",
          "properties": {
            "matchExpressions": {
              "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
              "items": {
                "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.",
                "properties": {
                  "key": {
                    "description": "key is the label key that the selector applies to.",
                    "type": "string"
                  },
                  "operator": {
                    "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.",
                    "type": "string"
                  },
                  "values": {
                    "description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array",
                    "x-kubernetes-list-type": "atomic"
                  }
                },
                "required": [
                  "key",
                  "operator"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array",
              "x-kubernetes-list-type": "atomic"
            },
            "matchLabels": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
              "type": "object"
            }
          },
          "type": "object",
          "x-kubernetes-map-type": "atomic",
          "additionalProperties": false
        },
        "stopMatchingBehavior": {
          "default": "WithdrawPolicies",
          "description": "StopMatchingBehavior indicates what behavior should be when a Cluster stop matching\nthe ClusterProfile. By default all deployed Helm charts and Kubernetes resources will\nbe withdrawn from Cluster. Setting StopMatchingBehavior to LeavePolicies will instead\nleave ClusterProfile deployed policies in the Cluster.\nThis field will be directly transferred to the ClusterProfile Spec\ngenerated in response to events.",
          "enum": [
            "WithdrawPolicies",
            "LeavePolicies"
          ],
          "type": "string"
        },
        "syncMode": {
          "default": "Continuous",
          "description": "SyncMode specifies how features are synced in a matching workload cluster.\n- OneTime means, first time a workload cluster matches the ClusterProfile,\nfeatures will be deployed in such cluster. Any subsequent feature configuration\nchange won't be applied into the matching workload clusters;\n- Continuous mode ensures that the first time a workload cluster matches a ClusterProfile,\nthe specified features are deployed. Subsequent changes to the feature configuration are also\nautomatically applied to all matching workload clusters.\n_ SyncModeContinuousWithDriftDetection operates similarly to Continuous mode, but also monitors\nmatching managed clusters for configuration drift. If drift is detected, a reconciliation is\ntriggered to ensure the managed cluster's configuration aligns with the ClusterProfile.\n- DryRun means no change will be propagated to any matching cluster. A report\ninstead will be generated summarizing what would happen in any matching cluster\nbecause of the changes made to ClusterProfile while in DryRun mode.\nThis field will be directly transferred to the ClusterProfile Spec\ngenerated in response to events.",
          "enum": [
            "OneTime",
            "Continuous",
            "ContinuousWithDriftDetection",
            "DryRun"
          ],
          "type": "string"
        },
        "templateResourceRefs": {
          "description": "TemplateResourceRefs is a list of resource to collect from the management cluster.\nThose resources' values will be used to instantiate templates contained in referenced\nPolicyRefs and Helm charts\nThis field will be directly transferred to the ClusterProfile Spec",
          "items": {
            "properties": {
              "identifier": {
                "description": "Identifier is how the resource will be referred to in the\ntemplate",
                "type": "string"
              },
              "ignoreStatusChanges": {
                "default": false,
                "description": "IgnoreStatusChanges indicates whether changes to the status of the referenced\nresource should be ignored. If set to true, only changes to the spec or\nmetadata (generation change) will trigger a reconciliation.",
                "type": "boolean"
              },
              "optional": {
                "default": false,
                "description": "Optional indicates that the referenced resource is not mandatory.\nIf set to true and the resource is not found, the error will be ignored,\nand Sveltos will continue processing other TemplateResourceRefs.",
                "type": "boolean"
              },
              "resource": {
                "description": "Resource references a Kubernetes instance in the management\ncluster to fetch and use during template instantiation.\nFor ClusterProfile namespace can be left empty. In such a case, namespace will\nbe implicit set to cluster's namespace.\nName and namespace can be expressed as a template and instantiate using any cluster field.",
                "properties": {
                  "apiVersion": {
                    "description": "API version of the referent.",
                    "type": "string"
                  },
                  "fieldPath": {
                    "description": "If referring to a piece of an object instead of an entire object, this string\nshould contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].\nFor example, if the object reference is to a container within a pod, this would take on a value like:\n\"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered\nthe event) or if no container name is specified \"spec.containers[2]\" (container with\nindex 2 in this pod). This syntax is chosen only to have some well-defined way of\nreferencing a part of an object.",
                    "type": "string"
                  },
                  "kind": {
                    "description": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
                    "type": "string"
                  },
                  "name": {
                    "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                    "type": "string"
                  },
                  "namespace": {
                    "description": "Namespace of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
                    "type": "string"
                  },
                  "resourceVersion": {
                    "description": "Specific resourceVersion to which this reference is made, if any.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency",
                    "type": "string"
                  },
                  "uid": {
                    "description": "UID of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids",
                    "type": "string"
                  }
                },
                "type": "object",
                "x-kubernetes-map-type": "atomic",
                "additionalProperties": false
              },
              "watchFields": {
                "description": "WatchFields is an optional list of dot-separated field paths to include\nwhen computing the hash for this resource (e.g. \"status.readyReplicas\",\n\"metadata.labels\"). When non-empty, only the listed fields are hashed and\nIgnoreStatusChanges is ignored. Use this when you need to react to a\nspecific field without being sensitive to every other change on the object.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "identifier",
              "resource"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "tier": {
          "default": 100,
          "description": "Tier controls the order of deployment for ClusterProfile or Profile resources targeting\nthe same cluster resources.\nImagine two configurations (ClusterProfiles or Profiles) trying to deploy the same resource (a Kubernetes\nresource or an helm chart). By default, the first one to reach the cluster \"wins\" and deploys it.\nTier allows you to override this. When conflicts arise, the ClusterProfile or Profile with the **lowest**\nTier value takes priority and deploys the resource.\nHigher Tier values represent lower priority. The default Tier value is 100.\nUsing Tiers provides finer control over resource deployment within your cluster, particularly useful\nwhen multiple configurations manage the same resources.\nThis field will be directly transferred to the ClusterProfile Spec\ngenerated in response to events.",
          "format": "int32",
          "minimum": 1,
          "type": "integer"
        },
        "validateHealths": {
          "description": "ValidateHealths is a slice of Lua functions to run against\nthe managed cluster to validate the state of those add-ons/applications\nis healthy\nThis field will be directly transferred to the ClusterProfile Spec\ngenerated in response to events.",
          "items": {
            "properties": {
              "evaluateCEL": {
                "description": "EvaluateCEL contains a list of named CEL (Common Expression Language) rules.\nEach rule will be evaluated in order against each object selected based on\nthe criteria defined above. Each rule's expression must return a boolean value\nindicating whether the object is a match.\n\nEvaluation stops at the first rule that returns true; subsequent\nrules will not be evaluated.",
                "items": {
                  "description": "CELRule defines a named CEL rule used in EvaluateCEL.",
                  "properties": {
                    "name": {
                      "description": "Name is a human-readable identifier for the rule.",
                      "type": "string"
                    },
                    "rule": {
                      "description": "Rule is the CEL (Common Expression Language) expression to evaluate.\nIt must return a bool",
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "rule"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "featureID": {
                "description": "FeatureID is an indentifier of the feature (Helm/Kustomize/Resources)\nThis field indicates when to run this check.\nFor instance:\n- if set to Helm this check will be run after all helm\ncharts specified in the ClusterProfile are deployed.\n- if set to Resources this check will be run after the content\nof all the ConfigMaps/Secrets referenced by ClusterProfile in the\nPolicyRef sections is deployed",
                "enum": [
                  "Resources",
                  "Helm",
                  "Kustomize"
                ],
                "type": "string"
              },
              "group": {
                "description": "Group of the resource to fetch in the managed Cluster.",
                "type": "string"
              },
              "kind": {
                "description": "Kind of the resource to fetch in the managed Cluster.",
                "minLength": 1,
                "type": "string"
              },
              "labelFilters": {
                "description": "LabelFilters allows to filter resources based on current labels.",
                "items": {
                  "properties": {
                    "key": {
                      "description": "Key is the label key",
                      "type": "string"
                    },
                    "operation": {
                      "description": "Operation is the comparison operation",
                      "enum": [
                        "Equal",
                        "Different",
                        "Has",
                        "DoesNotHave"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "description": "Value is the label value",
                      "type": "string"
                    }
                  },
                  "required": [
                    "key",
                    "operation"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "name": {
                "description": "Name is the name of this check",
                "type": "string"
              },
              "namespace": {
                "description": "Namespace of the resource to fetch in the managed Cluster.\nEmpty for resources scoped at cluster level.",
                "type": "string"
              },
              "script": {
                "description": "Script is a text containing a lua script.\nMust return struct with field \"health\"\nrepresenting whether object is a match (true or false)",
                "type": "string"
              },
              "version": {
                "description": "Version of the resource to fetch in the managed Cluster.",
                "type": "string"
              }
            },
            "required": [
              "featureID",
              "group",
              "kind",
              "name",
              "version"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-type": "atomic"
        }
      },
      "required": [
        "eventSourceName",
        "sourceClusterSelector"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "EventTriggerStatus defines the observed state of EventTrigger",
      "properties": {
        "clusterInfo": {
          "description": "ClusterInfo represent the deployment status in each managed\ncluster.",
          "items": {
            "properties": {
              "cluster": {
                "description": "Cluster references the Cluster",
                "properties": {
                  "apiVersion": {
                    "description": "API version of the referent.",
                    "type": "string"
                  },
                  "fieldPath": {
                    "description": "If referring to a piece of an object instead of an entire object, this string\nshould contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].\nFor example, if the object reference is to a container within a pod, this would take on a value like:\n\"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered\nthe event) or if no container name is specified \"spec.containers[2]\" (container with\nindex 2 in this pod). This syntax is chosen only to have some well-defined way of\nreferencing a part of an object.",
                    "type": "string"
                  },
                  "kind": {
                    "description": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
                    "type": "string"
                  },
                  "name": {
                    "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                    "type": "string"
                  },
                  "namespace": {
                    "description": "Namespace of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
                    "type": "string"
                  },
                  "resourceVersion": {
                    "description": "Specific resourceVersion to which this reference is made, if any.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency",
                    "type": "string"
                  },
                  "uid": {
                    "description": "UID of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids",
                    "type": "string"
                  }
                },
                "type": "object",
                "x-kubernetes-map-type": "atomic",
                "additionalProperties": false
              },
              "failureMessage": {
                "description": "FailureMessage provides more information about the error.",
                "type": "string"
              },
              "hash": {
                "description": "Hash represents the hash of the Classifier currently deployed\nin the Cluster",
                "format": "byte",
                "type": "string"
              },
              "status": {
                "description": "Status represents the state of the feature in the workload cluster",
                "enum": [
                  "Provisioning",
                  "Provisioned",
                  "Failed",
                  "FailedNonRetriable",
                  "Removing",
                  "Removed"
                ],
                "type": "string"
              }
            },
            "required": [
              "cluster",
              "hash"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "destinationMatchingClusterRefs": {
          "description": "DestinationMatchingClusterRefs reference all the cluster-api Cluster currently matching\nClusterProfile DestinationClusterSelector",
          "items": {
            "description": "ObjectReference contains enough information to let you inspect or modify the referred object.",
            "properties": {
              "apiVersion": {
                "description": "API version of the referent.",
                "type": "string"
              },
              "fieldPath": {
                "description": "If referring to a piece of an object instead of an entire object, this string\nshould contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].\nFor example, if the object reference is to a container within a pod, this would take on a value like:\n\"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered\nthe event) or if no container name is specified \"spec.containers[2]\" (container with\nindex 2 in this pod). This syntax is chosen only to have some well-defined way of\nreferencing a part of an object.",
                "type": "string"
              },
              "kind": {
                "description": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
                "type": "string"
              },
              "name": {
                "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                "type": "string"
              },
              "namespace": {
                "description": "Namespace of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
                "type": "string"
              },
              "resourceVersion": {
                "description": "Specific resourceVersion to which this reference is made, if any.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency",
                "type": "string"
              },
              "uid": {
                "description": "UID of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids",
                "type": "string"
              }
            },
            "type": "object",
            "x-kubernetes-map-type": "atomic",
            "additionalProperties": false
          },
          "type": "array"
        },
        "matchingClusters": {
          "description": "MatchingClusterRefs reference all the cluster-api Cluster currently matching\nClusterProfile SourceClusterSelector",
          "items": {
            "description": "ObjectReference contains enough information to let you inspect or modify the referred object.",
            "properties": {
              "apiVersion": {
                "description": "API version of the referent.",
                "type": "string"
              },
              "fieldPath": {
                "description": "If referring to a piece of an object instead of an entire object, this string\nshould contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].\nFor example, if the object reference is to a container within a pod, this would take on a value like:\n\"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered\nthe event) or if no container name is specified \"spec.containers[2]\" (container with\nindex 2 in this pod). This syntax is chosen only to have some well-defined way of\nreferencing a part of an object.",
                "type": "string"
              },
              "kind": {
                "description": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
                "type": "string"
              },
              "name": {
                "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                "type": "string"
              },
              "namespace": {
                "description": "Namespace of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
                "type": "string"
              },
              "resourceVersion": {
                "description": "Specific resourceVersion to which this reference is made, if any.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency",
                "type": "string"
              },
              "uid": {
                "description": "UID of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids",
                "type": "string"
              }
            },
            "type": "object",
            "x-kubernetes-map-type": "atomic",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
