{
  "description": "GitRepo describes a git repository that is watched by Fleet.\nThe resource contains the necessary information to deploy the repo, or parts\nof it, to target clusters.",
  "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": {
      "properties": {
        "branch": {
          "description": "Branch The git branch to follow.",
          "nullable": true,
          "type": "string"
        },
        "bundles": {
          "description": "Bundles defines the paths of bundles to be read.\nThis drives the fleet resource scanner that simply loads the specified folders",
          "items": {
            "properties": {
              "base": {
                "description": "Base is the base path for the bundle resources",
                "type": "string"
              },
              "options": {
                "description": "Options is the path (relative to path above) that defines a fleet.yaml file to configure the bundle",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "caBundle": {
          "description": "CABundle is a PEM encoded CA bundle which will be used to validate the repo's certificate.",
          "format": "byte",
          "nullable": true,
          "type": "string"
        },
        "clientSecretName": {
          "description": "ClientSecretName is the name of the client secret to be used to connect to the repo\nIt is expected the secret be of type \"kubernetes.io/basic-auth\" or \"kubernetes.io/ssh-auth\".",
          "nullable": true,
          "type": "string"
        },
        "correctDrift": {
          "description": "CorrectDrift specifies how drift correction should work.",
          "properties": {
            "enabled": {
              "description": "Enabled correct drift if true.",
              "type": "boolean"
            },
            "force": {
              "description": "Force helm rollback with --force option will be used if true. This will try to recreate all resources in the release.",
              "type": "boolean"
            },
            "keepFailHistory": {
              "description": "KeepFailHistory keeps track of failed rollbacks in the helm history.",
              "type": "boolean"
            }
          },
          "type": "object"
        },
        "deleteNamespace": {
          "description": "DeleteNamespace specifies if the namespace created must be deleted after deleting the GitRepo.",
          "type": "boolean"
        },
        "disablePolling": {
          "description": "Disables git polling. When enabled only webhooks will be used.",
          "type": "boolean"
        },
        "forceSyncGeneration": {
          "description": "Increment this number to force a redeployment of contents from Git.",
          "format": "int64",
          "type": "integer"
        },
        "helmRepoURLRegex": {
          "description": "HelmRepoURLRegex Helm credentials will be used if the helm repo matches this regex\nCredentials will not be used if this is empty or not provided.",
          "nullable": true,
          "type": "string"
        },
        "helmSecretName": {
          "description": "HelmSecretName contains the auth secret for a private Helm repository.",
          "nullable": true,
          "type": "string"
        },
        "helmSecretNameForPaths": {
          "description": "HelmSecretNameForPaths contains the auth secret for private Helm repository for each path.",
          "nullable": true,
          "type": "string"
        },
        "imageScanCommit": {
          "description": "Commit specifies how to commit to the git repo when a new image is scanned and written back to git repo.",
          "properties": {
            "authorEmail": {
              "description": "AuthorEmail gives the email to provide when making a commit",
              "type": "string"
            },
            "authorName": {
              "description": "AuthorName gives the name to provide when making a commit",
              "type": "string"
            },
            "messageTemplate": {
              "description": "MessageTemplate provides a template for the commit message,\ninto which will be interpolated the details of the change made.",
              "type": "string"
            }
          },
          "type": "object"
        },
        "imageScanInterval": {
          "description": "ImageScanInterval is the interval of syncing scanned images and writing back to git repo.",
          "type": "string"
        },
        "insecureSkipTLSVerify": {
          "description": "InsecureSkipTLSverify will use insecure HTTPS to clone the repo.",
          "type": "boolean"
        },
        "keepResources": {
          "description": "KeepResources specifies if the resources created must be kept after deleting the GitRepo.",
          "type": "boolean"
        },
        "ociRegistrySecret": {
          "description": "OCIRegistrySecret contains the name of the secret to be used for retrieving the OCI registry connection details.",
          "type": "string"
        },
        "paths": {
          "description": "Paths is the directories relative to the git repo root that contain resources to be applied.\nPath globbing is supported, for example [\"charts/*\"] will match all folders as a subdirectory of charts/\nIf empty, \"/\" is the default.",
          "items": {
            "type": "string"
          },
          "nullable": true,
          "type": "array"
        },
        "paused": {
          "description": "Paused, when true, causes changes in Git not to be propagated down to the clusters but instead to mark\nresources as OutOfSync.",
          "type": "boolean"
        },
        "pollingInterval": {
          "description": "PollingInterval is how often to check git for new updates.",
          "nullable": true,
          "type": "string"
        },
        "repo": {
          "description": "Repo is a URL to a git repo to clone and index.",
          "minLength": 1,
          "type": "string"
        },
        "revision": {
          "description": "Revision A specific commit or tag to operate on.",
          "nullable": true,
          "type": "string"
        },
        "serviceAccount": {
          "description": "ServiceAccount used in the downstream cluster for deployment.",
          "nullable": true,
          "type": "string"
        },
        "targetNamespace": {
          "description": "Ensure that all resources are created in this namespace\nAny cluster scoped resource will be rejected if this is set\nAdditionally this namespace will be created on demand.",
          "nullable": true,
          "type": "string"
        },
        "targets": {
          "description": "Targets is a list of targets this repo will deploy to.",
          "items": {
            "description": "GitTarget is a cluster or cluster group to deploy to.",
            "properties": {
              "clusterGroup": {
                "description": "ClusterGroup is the name of a cluster group in the same namespace as the clusters.",
                "nullable": true,
                "type": "string"
              },
              "clusterGroupSelector": {
                "description": "ClusterGroupSelector is a label selector to select cluster groups.",
                "nullable": true,
                "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"
                    },
                    "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"
              },
              "clusterName": {
                "description": "ClusterName is the name of a cluster.",
                "nullable": true,
                "type": "string"
              },
              "clusterSelector": {
                "description": "ClusterSelector is a label selector to select clusters.",
                "nullable": true,
                "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"
                    },
                    "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"
              },
              "name": {
                "description": "Name is the name of this target.",
                "nullable": true,
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "webhookSecret": {
          "description": "WebhookSecret contains the name of the secret to use for webhook parsing",
          "type": "string"
        }
      },
      "required": [
        "repo"
      ],
      "type": "object"
    },
    "status": {
      "properties": {
        "commit": {
          "description": "Commit is the Git commit hash from the last git job run.",
          "type": "string"
        },
        "conditions": {
          "description": "Conditions is a list of Wrangler conditions that describe the state\nof the resource.",
          "items": {
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.",
                "type": "string"
              },
              "lastUpdateTime": {
                "description": "The last time this condition was updated.",
                "type": "string"
              },
              "message": {
                "description": "Human-readable message indicating details about last transition",
                "type": "string"
              },
              "reason": {
                "description": "The reason for the condition's last transition.",
                "type": "string"
              },
              "status": {
                "description": "Status of the condition, one of True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type of cluster condition.",
                "type": "string"
              }
            },
            "required": [
              "status",
              "type"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "desiredReadyClusters": {
          "description": "DesiredReadyClusters\tis the number of clusters that should be ready for bundles of this resource.",
          "type": "integer"
        },
        "display": {
          "description": "Display contains a human readable summary of the status.",
          "properties": {
            "error": {
              "description": "Error is true if a message is present.",
              "type": "boolean"
            },
            "message": {
              "description": "Message contains the relevant message from the deployment conditions.",
              "type": "string"
            },
            "readyBundleDeployments": {
              "description": "ReadyBundleDeployments is a string in the form \"%d/%d\", that describes the\nnumber of ready bundledeployments over the total number of bundledeployments.",
              "type": "string"
            },
            "state": {
              "description": "State is the state of the resource, e.g. \"GitUpdating\" or the maximal\nBundleState according to StateRank.",
              "type": "string"
            }
          },
          "type": "object"
        },
        "gitJobStatus": {
          "description": "GitJobStatus is the status of the last Git job run, e.g. \"Current\" if there was no error.",
          "type": "string"
        },
        "lastPollingTriggered": {
          "description": "LastPollingTime is the last time the polling check was triggered",
          "format": "date-time",
          "type": "string"
        },
        "lastSyncedImageScanTime": {
          "description": "LastSyncedImageScanTime is the time of the last image scan.",
          "format": "date-time",
          "type": "string"
        },
        "observedGeneration": {
          "description": "ObservedGeneration is the current generation of the resource in the cluster. It is copied from k8s\nmetadata.Generation. The value is incremented for all changes, except for changes to .metadata or .status.",
          "format": "int64",
          "type": "integer"
        },
        "perClusterResourceCounts": {
          "additionalProperties": {
            "description": "ResourceCounts contains the number of resources in each state.",
            "properties": {
              "desiredReady": {
                "description": "DesiredReady is the number of resources that should be ready.",
                "type": "integer"
              },
              "missing": {
                "description": "Missing is the number of missing resources.",
                "type": "integer"
              },
              "modified": {
                "description": "Modified is the number of resources that have been modified.",
                "type": "integer"
              },
              "notReady": {
                "description": "NotReady is the number of not ready resources. Resources are not\nready if they do not match any other state.",
                "type": "integer"
              },
              "orphaned": {
                "description": "Orphaned is the number of orphaned resources.",
                "type": "integer"
              },
              "ready": {
                "description": "Ready is the number of ready resources.",
                "type": "integer"
              },
              "unknown": {
                "description": "Unknown is the number of resources in an unknown state.",
                "type": "integer"
              },
              "waitApplied": {
                "description": "WaitApplied is the number of resources that are waiting to be applied.",
                "type": "integer"
              }
            },
            "type": "object"
          },
          "description": "PerClusterResourceCounts contains the number of resources in each state over all bundles, per cluster.",
          "type": "object"
        },
        "pollingCommit": {
          "description": "PollingCommit is the latest Git commit hash received from polling",
          "type": "string"
        },
        "readyClusters": {
          "description": "ReadyClusters is the lowest number of clusters that are ready over\nall the bundles of this resource.",
          "type": "integer"
        },
        "resourceCounts": {
          "description": "ResourceCounts contains the number of resources in each state over all bundles.",
          "properties": {
            "desiredReady": {
              "description": "DesiredReady is the number of resources that should be ready.",
              "type": "integer"
            },
            "missing": {
              "description": "Missing is the number of missing resources.",
              "type": "integer"
            },
            "modified": {
              "description": "Modified is the number of resources that have been modified.",
              "type": "integer"
            },
            "notReady": {
              "description": "NotReady is the number of not ready resources. Resources are not\nready if they do not match any other state.",
              "type": "integer"
            },
            "orphaned": {
              "description": "Orphaned is the number of orphaned resources.",
              "type": "integer"
            },
            "ready": {
              "description": "Ready is the number of ready resources.",
              "type": "integer"
            },
            "unknown": {
              "description": "Unknown is the number of resources in an unknown state.",
              "type": "integer"
            },
            "waitApplied": {
              "description": "WaitApplied is the number of resources that are waiting to be applied.",
              "type": "integer"
            }
          },
          "type": "object"
        },
        "resources": {
          "description": "Resources contains metadata about the resources of each bundle.",
          "items": {
            "description": "Resource contains metadata about the resources of a bundle.",
            "properties": {
              "apiVersion": {
                "description": "APIVersion is the API version of the resource.",
                "nullable": true,
                "type": "string"
              },
              "error": {
                "description": "Error is true if any Error in the PerClusterState is true.",
                "type": "boolean"
              },
              "id": {
                "description": "ID is the name of the resource, e.g. \"namespace1/my-config\" or \"backingimagemanagers.storage.io\".",
                "nullable": true,
                "type": "string"
              },
              "incompleteState": {
                "description": "IncompleteState is true if a bundle summary has 10 or more non-ready\nresources or a non-ready resource has more 10 or more non-ready or\nmodified states.",
                "type": "boolean"
              },
              "kind": {
                "description": "Kind is the k8s kind of the resource.",
                "nullable": true,
                "type": "string"
              },
              "message": {
                "description": "Message is the first message from the PerClusterStates.",
                "nullable": true,
                "type": "string"
              },
              "name": {
                "description": "Name of the resource.",
                "nullable": true,
                "type": "string"
              },
              "namespace": {
                "description": "Namespace of the resource.",
                "nullable": true,
                "type": "string"
              },
              "perClusterState": {
                "description": "PerClusterState contains lists of cluster IDs for every State for this resource",
                "nullable": true,
                "properties": {
                  "missing": {
                    "description": "Missing is a list of cluster IDs for which this a resource is in Missing state",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "modified": {
                    "description": "Modified is a list of cluster IDs for which this a resource is in Modified state",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "notReady": {
                    "description": "NotReady is a list of cluster IDs for which this a resource is in NotReady state",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "orphaned": {
                    "description": "Orphaned is a list of cluster IDs for which this a resource is in Orphaned state",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "pending": {
                    "description": "Pending is a list of cluster IDs for which this a resource is in Pending state",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "ready": {
                    "description": "Ready is a list of cluster IDs for which this a resource is in Ready state",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "unknown": {
                    "description": "Unknown is a list of cluster IDs for which this a resource is in Unknown state",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "waitApplied": {
                    "description": "WaitApplied is a list of cluster IDs for which this a resource is in WaitApplied state",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "state": {
                "description": "State is the state of the resource, e.g. \"Unknown\", \"WaitApplied\", \"ErrApplied\" or \"Ready\".",
                "type": "string"
              },
              "transitioning": {
                "description": "Transitioning is true if any Transitioning in the PerClusterState is true.",
                "type": "boolean"
              },
              "type": {
                "description": "Type is the type of the resource, e.g. \"apiextensions.k8s.io.customresourcedefinition\" or \"configmap\".",
                "type": "string"
              }
            },
            "required": [
              "perClusterState"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "summary": {
          "description": "Summary contains the number of bundle deployments in each state and a list of non-ready resources.",
          "properties": {
            "desiredReady": {
              "description": "DesiredReady is the number of bundle deployments that should be\nready.",
              "type": "integer"
            },
            "errApplied": {
              "description": "ErrApplied is the number of bundle deployments that have been synced\nfrom the Fleet controller and the downstream cluster, but with some\nerrors when deploying the bundle.",
              "type": "integer"
            },
            "modified": {
              "description": "Modified is the number of bundle deployments that have been deployed\nand for which all resources are ready, but where some changes from the\nGit repository have not yet been synced.",
              "type": "integer"
            },
            "nonReadyResources": {
              "description": "NonReadyClusters is a list of states, which is filled for a bundle\nthat is not ready.",
              "items": {
                "description": "NonReadyResource contains information about a bundle that is not ready for a\ngiven state like \"ErrApplied\". It contains a list of non-ready or modified\nresources and their states.",
                "properties": {
                  "bundleState": {
                    "description": "State is the state of the resource, like e.g. \"NotReady\" or \"ErrApplied\".",
                    "nullable": true,
                    "type": "string"
                  },
                  "message": {
                    "description": "Message contains information why the bundle is not ready.",
                    "nullable": true,
                    "type": "string"
                  },
                  "modifiedStatus": {
                    "description": "ModifiedStatus lists the state for each modified resource.",
                    "items": {
                      "description": "ModifiedStatus is used to report the status of a resource that is modified.\nIt indicates if the modification was a create, a delete or a patch.",
                      "properties": {
                        "apiVersion": {
                          "nullable": true,
                          "type": "string"
                        },
                        "delete": {
                          "type": "boolean"
                        },
                        "exist": {
                          "description": "Exist is true if the resource exists but is not owned by us. This can happen if a resource was adopted by another bundle whereas the first bundle still exists and due to that reports that it does not own it.",
                          "type": "boolean"
                        },
                        "kind": {
                          "nullable": true,
                          "type": "string"
                        },
                        "missing": {
                          "type": "boolean"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "namespace": {
                          "nullable": true,
                          "type": "string"
                        },
                        "patch": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "nullable": true,
                    "type": "array"
                  },
                  "name": {
                    "description": "Name is the name of the resource.",
                    "nullable": true,
                    "type": "string"
                  },
                  "nonReadyStatus": {
                    "description": "NonReadyStatus lists the state for each non-ready resource.",
                    "items": {
                      "description": "NonReadyStatus is used to report the status of a resource that is not ready. It includes a summary.",
                      "properties": {
                        "apiVersion": {
                          "nullable": true,
                          "type": "string"
                        },
                        "kind": {
                          "nullable": true,
                          "type": "string"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "namespace": {
                          "nullable": true,
                          "type": "string"
                        },
                        "summary": {
                          "properties": {
                            "error": {
                              "type": "boolean"
                            },
                            "message": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "state": {
                              "type": "string"
                            },
                            "transitioning": {
                              "type": "boolean"
                            }
                          },
                          "type": "object"
                        },
                        "uid": {
                          "description": "UID is a type that holds unique ID values, including UUIDs.  Because we\ndon't ONLY use UUIDs, this is an alias to string.  Being a type captures\nintent and helps make sure that UIDs and names do not get conflated.",
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "nullable": true,
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "nullable": true,
              "type": "array"
            },
            "notReady": {
              "description": "NotReady is the number of bundle deployments that have been deployed\nwhere some resources are not ready.",
              "type": "integer"
            },
            "outOfSync": {
              "description": "OutOfSync is the number of bundle deployments that have been synced\nfrom Fleet controller, but not yet by the downstream agent.",
              "type": "integer"
            },
            "pending": {
              "description": "Pending is the number of bundle deployments that are being processed\nby Fleet controller.",
              "type": "integer"
            },
            "ready": {
              "description": "Ready is the number of bundle deployments that have been deployed\nwhere all resources are ready.",
              "type": "integer"
            },
            "waitApplied": {
              "description": "WaitApplied is the number of bundle deployments that have been\nsynced from Fleet controller and downstream cluster, but are waiting\nto be deployed.",
              "type": "integer"
            }
          },
          "type": "object"
        },
        "updateGeneration": {
          "description": "Update generation is the force update generation if spec.forceSyncGeneration is set",
          "format": "int64",
          "type": "integer"
        },
        "webhookCommit": {
          "description": "WebhookCommit is the latest Git commit hash received from a webhook",
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "GitRepo v1alpha1"
}