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 registry 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. #
  34. # If fleet.yaml contains a private Helm repo that requires authentication,
  35. # provide the credentials in a K8s secret and specify them here.
  36. # Danger: the credentials will be sent to all repositories referenced from
  37. # this gitrepo. See section below for more information.
  38. #
  39. # helmSecretName: my-helm-secret
  40. #
  41. # Helm credentials from helmSecretName will be used if the helm repository url matches this regular expression.
  42. # Credentials will always be used if it is empty or not provided
  43. #
  44. # helmRepoURLRegex: https://charts.rancher.io/*
  45. #
  46. # To add additional ca-bundle for self-signed certs, caBundle can be
  47. # filled with base64 encoded pem data. For example:
  48. # `cat /path/to/ca.pem | base64 -w 0`
  49. #
  50. # caBundle: my-ca-bundle
  51. #
  52. # Disable SSL verification for git repo
  53. #
  54. # insecureSkipTLSVerify: true
  55. #
  56. # A git repo can read multiple paths in a repo at once.
  57. # The below field is expected to be an array of paths and
  58. # supports path globbing (ex: some/*/path)
  59. #
  60. # Example:
  61. # paths:
  62. # - single-path
  63. # - multiple-paths/*
  64. paths:
  65. - simple
  66. # PollingInterval configures how often fleet checks the git repo. The default
  67. # is 15 seconds.
  68. # Setting this to zero does not disable polling. It results in a 15s
  69. # interval, too.
  70. # As checking a git repo incurs a CPU cost, raising this value can help
  71. # lowering fleetcontroller's CPU usage if tens of git repos are used or more
  72. #
  73. # pollingInterval: 15s
  74. # Paused causes changes in Git to not be propagated down to the clusters but
  75. # instead mark resources as OutOfSync
  76. #
  77. # paused: false
  78. # Increment this number to force a redeployment of contents from Git
  79. #
  80. # forceSyncGeneration: 0
  81. # The service account that will be used to perform this deployment.
  82. # This is the name of the service account that exists in the
  83. # downstream cluster in the cattle-fleet-system namespace. It is assumed
  84. # this service account already exists so it should be create before
  85. # hand, most likely coming from another git repo registered with
  86. # the Fleet manager.
  87. #
  88. # serviceAccount: moreSecureAccountThanClusterAdmin
  89. # Target clusters to deploy to if running Fleet in a multi-cluster
  90. # style. Refer to the "Mapping to Downstream Clusters" docs for
  91. # more information.
  92. # If empty, the "default" cluster group is used.
  93. #
  94. # targets: ...