Skip to main content
Version: 0.26.0

Git Repositories and Resources Enterprise

During the pull request creation, to authenticate using Git, you will need to select the git repository where the pull request will be created.

The default git repository selected in the UI

Depending on the action performed on the resource (creation/deletion/editing), the default git repository selected in the UI is determined in the following order:

  1. the repository used to initially create the resource found in the annotation (in the case of editing or deleting of resources)

    annotations: "{...\"parameter_values\":{...\"url\":\"\"}"
  2. the first repository found with a default annotation

    annotations: default
  3. the flux-system repository

    name: flux-system
    namespace: flux-system
  4. the first repository in the list of git repositories that the user has access to

In the case of deletion and editing, if the resource repository is found amongst the git repositories that the user has access to, it will be preselected and the selection will be disabled. If it is not found, the user will be able to choose a new repository.

In the case of tenants, its recommended the default is added to an appropriate git repository.

Overriding the calculated git repository HTTPS URL

The system will try and automatically calculate the correct HTTPS API endpoint to create a Pull Request against. For example, if the git repository URL is ssh://, the system will try and convert it to

However it is not always possible to accurately derive this URL. An override can be specified to set the correct URL instead. For example the ssh url may be ssh://git@interal-ssh-server:2222/org/repo.git and the correct HTTPS url may be

In this case we set the override via the annotation on the GitRepository object:

kind: GitRepository
name: repo
namespace: flux-system
interval: 1m
url: ssh://git@interal-ssh-server:2222/org/repo.git

The pull request will then be created against the correct HTTPS API.

The above also applies to the creation of applications.