GitRepo Resource

The GitRepo resource describes git repositories, how to access them and where the bundles are located.

The content of the resource corresponds to the GitRepoSpec. For more information on how to use GitRepo resource, e.g. how to watch private repositories, see Create a GitRepo Resource.

  1. kind: GitRepo
  2. apiVersion: fleet.cattle.io/v1alpha1
  3. metadata:
  4. # Any name can be used here
  5. name: my-repo
  6. # For single cluster use fleet-local, otherwise use the namespace of
  7. # your choosing
  8. namespace: fleet-local
  9. spec:
  10. # This can be a HTTPS or git URL. If you are using a git URL then
  11. # clientSecretName will probably need to be set to supply a credential.
  12. # repo is the only required parameter for a repo to be monitored.
  13. #
  14. repo: https://github.com/rancher/fleet-examples
  15. # Enforce all resources go to this target namespace. If a cluster scoped
  16. # resource is found the deployment will fail.
  17. #
  18. # targetNamespace: app1
  19. # Any branch can be watched, this field is optional. If not specified the
  20. # branch is assumed to be master
  21. #
  22. # branch: master
  23. # A specific commit or tag can also be watched.
  24. #
  25. # revision: v0.3.0
  26. # For a private git repository you must supply a clientSecretName. A default
  27. # secret can be set at the namespace level using the GitRepoRestriction
  28. # type. Secrets must be of the type "kubernetes.io/ssh-auth" or
  29. # "kubernetes.io/basic-auth". The secret is assumed to be in the
  30. # same namespace as the GitRepo
  31. #
  32. # clientSecretName: my-ssh-key
  33. # If fleet.yaml contains a private Helm repo that requires authentication,
  34. # provide the credentials in a K8s secret and specify them here.
  35. # Danger: the credentials will be sent to all repositories referenced from
  36. # this gitrepo. See section below for more information.
  37. #
  38. # helmSecretName: my-helm-secret
  39. # Helm credentials from helmSecretName will be used if the helm repository url matches this regular expression.
  40. # Credentials will always be used if it is empty or not provided
  41. #
  42. # helmRepoURLRegex: https://charts.rancher.io/*
  43. # Contains the auth secret for private Helm repository for each path.
  44. # See [Create a GitRepo Resource](.gitrepo-add#use-different-helm-credentials-for-each-path)
  45. #
  46. # helmSecretNameForPaths: multi-helm-secret
  47. # To add additional ca-bundle for self-signed certs, caBundle can be
  48. # filled with base64 encoded pem data. For example:
  49. # `cat /path/to/ca.pem | base64 -w 0`
  50. #
  51. # caBundle: my-ca-bundle
  52. # Disable SSL verification for git repo
  53. #
  54. # insecureSkipTLSVerify: true
  55. # A git repo can read multiple paths in a repo at once.
  56. # The below field is expected to be an array of paths and
  57. # supports path globbing (ex: some/*/path)
  58. #
  59. # Example:
  60. # paths:
  61. # - single-path
  62. # - multiple-paths/*
  63. paths:
  64. - simple
  65. # PollingInterval configures how often fleet checks the git repo. The default
  66. # is 15 seconds.
  67. # Setting this to zero does not disable polling. It results in a 15s
  68. # interval, too.
  69. # As checking a git repo incurs a CPU cost, raising this value can help
  70. # lowering fleetcontroller's CPU usage if tens of git repos are used or more
  71. #
  72. # pollingInterval: 15s
  73. # When disablePolling is set to true the git repo won't be checked periodically.
  74. # It will rely on webhooks only.
  75. # See [Using Webhooks Instead of Polling](https://fleet.rancher.io/webhook)
  76. # disablePolling: false
  77. # Paused causes changes in Git to not be propagated down to the clusters but
  78. # instead mark resources as OutOfSync
  79. #
  80. # paused: false
  81. # Increment this number to force a redeployment of contents from Git
  82. #
  83. # forceSyncGeneration: 0
  84. # The service account that will be used to perform this deployment.
  85. # This is the name of the service account that exists in the
  86. # downstream cluster in the cattle-fleet-system namespace. It is assumed
  87. # this service account already exists so it should be create before
  88. # hand, most likely coming from another git repo registered with
  89. # the Fleet manager.
  90. #
  91. # serviceAccount: moreSecureAccountThanClusterAdmin
  92. # Target clusters to deploy to if running Fleet in a multi-cluster
  93. # style. Refer to the "Mapping to Downstream Clusters" docs for
  94. # more information.
  95. # If empty, the "default" cluster group is used.
  96. #
  97. # targets: ...
  98. # Drift correction removes any external change made to resources managed by Fleet. It performs a helm rollback, which uses
  99. # a three-way merge strategy by default.
  100. # It will try to update all resources by doing a PUT request if force is enabled. Three-way strategic merge might fail when updating
  101. # an item inside of an array as it will try to add a new item instead of replacing the existing one. This can be fixed by using force.
  102. # Keep in mind that resources might be recreated if force is enabled.
  103. # Failed rollback will be removed from the helm history unless keepFailHistory is set to true.
  104. #
  105. # correctDrift:
  106. # enabled: false
  107. # force: false #Warning: it might recreate resources if set to true
  108. # keepFailHistory: false