Skip to content

Commit ce4ac58

Browse files
author
Paulo Gomes
committed
libgit2: Update documentation
Signed-off-by: Paulo Gomes <[email protected]>
1 parent 2d65cf4 commit ce4ac58

File tree

2 files changed

+9
-64
lines changed

2 files changed

+9
-64
lines changed

DEVELOPMENT.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,6 @@ There are a number of dependencies required to be able to run the controller and
1313
- [Install Docker](https://docs.docker.com/engine/install/)
1414
- (Optional) [Install Kubebuilder](https://book.kubebuilder.io/quick-start.html#installation)
1515

16-
The [libgit2](https://libgit2.org/) dependency is now automatically managed by the Makefile logic.
17-
However, it depends on [pkg-config](https://freedesktop.org/wiki/Software/pkg-config/) being installed:
18-
19-
### macOS
20-
21-
```console
22-
$ # Ensure pkg-config is installed
23-
$ brew install pkg-config
24-
```
25-
26-
### Linux
27-
28-
```console
29-
$ # Ensure pkg-config is installed
30-
$ pacman -S pkgconf
31-
```
32-
33-
**Note:** Example shown is for Arch Linux, but likewise procedure can be
34-
followed using any other package manager. Some distributions may have slight
35-
variation of package names (e.g. `apt install -y pkg-config`).
36-
3716
In addition to the above, the following dependencies are also used by some of the `make` targets:
3817

3918
- `controller-gen` (v0.7.0)
@@ -149,18 +128,11 @@ Create a `.vscode/launch.json` file:
149128
"type": "go",
150129
"request": "launch",
151130
"mode": "auto",
152-
"envFile": "${workspaceFolder}/build/.env",
153131
"program": "${workspaceFolder}/main.go"
154132
}
155133
]
156134
}
157135
```
158136

159-
Create the environment file containing details on how to load
160-
`libgit2` dependencies:
161-
```bash
162-
make env
163-
```
164-
165137
Start debugging by either clicking `Run` > `Start Debugging` or using
166138
the relevant shortcut.

docs/spec/v1beta2/gitrepositories.md

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ spec:
228228
branch: <branch-name>
229229
```
230230

231-
Using the [`go-git` Git implementation](#git-implementation), this will perform
232-
a shallow clone to only fetch the specified branch.
231+
This will perform a shallow clone to only fetch the specified branch.
233232

234233
#### Tag example
235234

@@ -284,9 +283,9 @@ spec:
284283
commit: "<commit SHA>"
285284
```
286285

287-
This field takes precedence over all other fields. Using the [`go-git` Git
288-
implementation](#git-implementation), it can be combined with `.spec.ref.branch`
289-
to perform a shallow clone of the branch, in which the commit must exist:
286+
This field takes precedence over all other fields. It can be combined with
287+
`.spec.ref.branch` to perform a shallow clone of the branch, in which the
288+
commit must exist:
290289

291290
```yaml
292291
---
@@ -385,32 +384,13 @@ resume.
385384

386385
### Git implementation
387386

388-
**Note:** `libgit2` is being deprecated, as its use is known to cause controllers
389-
to panic when running over long periods of time, or when under high GC pressure.
390-
A new opt-out feature gate `ForceGoGitImplementation` was introduced, which will
391-
use `go-git` regardless of the value defined at `.spec.gitImplementation`.
392-
This can be disabled by starting the controller with the additional flag below:
393-
`--feature-gates=ForceGoGitImplementation=false`.
394-
395-
`.spec.gitImplementation` is an optional field to change the client library
396-
implementation used for Git operations (e.g. clone, checkout). The default
397-
value is `go-git`.
398-
399-
Unless you need support for a specific Git wire protocol functionality not
400-
supported by the default implementation (as documented below), changing the
401-
implementation is generally not recommended as it can come with its own set of
402-
drawbacks. For example, not being able to make use of shallow clones forces the
403-
controller to fetch the whole Git history tree instead of a specific one,
404-
resulting in an increase of disk space and traffic usage.
405-
406-
**Note:** The `libgit2` implementation does not support shallow clones or
407-
Git submodules.
387+
`.spec.gitImplementation` is deprecated and its value ignored, the git
388+
implementation used across Flux is go-git.
408389

409390
#### Optimized Git clones
410391

411392
Optimized Git clones decreases resource utilization for GitRepository
412-
reconciliations. It supports both `go-git` and `libgit2` implementations
413-
when cloning repositories using branches or tags.
393+
reconciliations.
414394

415395
When enabled, it avoids full Git clone operations by first checking whether
416396
the revision of the last stored artifact is still the head of the remote
@@ -428,20 +408,13 @@ not affected by this functionality.
428408
#### Proxy support
429409

430410
When a proxy is configured in the source-controller Pod through the appropriate
431-
environment variables, for example `HTTPS_PROXY`, `NO_PROXY`, etc. There may be
432-
some limitations in the proxy support based on the Git implementation.
433-
434-
| Git Implementation | HTTP_PROXY | HTTPS_PROXY | NO_PROXY | Self-signed Certs |
435-
|--------------------|------------|-------------|----------|-------------------|
436-
| `go-git` | true | true | true | false |n
437-
| `libgit2` | true | true | true | true |
411+
environment variables, for example `HTTPS_PROXY`, `NO_PROXY`, etc.
438412

439413
### Recurse submodules
440414

441415
`.spec.recurseSubmodules` is an optional field to enable the initialization of
442416
all submodules within the cloned Git repository, using their default settings.
443-
This option is only available when using the (default) `go-git` [Git
444-
implementation](#git-implementation), and defaults to `false`.
417+
This option defaults to `false`.
445418

446419
Note that for most Git providers (e.g. GitHub and GitLab), deploy keys can not
447420
be used as reusing a key across multiple repositories is not allowed. You have

0 commit comments

Comments
 (0)