Commit Graph

1268 Commits

Author SHA1 Message Date
Sunny b41c717e16
controllers: emit event and log source up-to-date
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-03-30 17:06:16 +05:30
Sunny 86860ec913
Update all reconcilers with ArtifactInStorage cond
Update alll the other reconcilers similar to the GitRepository
reconcilers to introduce positive condition ArtifactInStorage and
reorder the status conditions.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-03-30 17:06:12 +05:30
Sunny d939e98ec2
Introduce separate positive polarity conditions
Introduce separate positive polarity conditions which are used to set
Ready condition. Move the "artifact stored" ready condition into
ArtifactInStorage positive polarity condition. If ArtifactInStorage is
True and there's no negative polarity condition present, the Ready
condition is summarized with ArtifactInStorage condition value.

Also, update the priorities of the conditions. ArtifactInStorage has
higher priority than SourceVerfied condition. If both are present, the
Ready condition will have ArtifactInStorage.
The negative polarity conditions are reordered to have the most likely
actual cause of failure condition the highest priority, for example
StorageOperationFailed, followed by the conditions that are reconciled
first in the whole reconciliation so as to prioritize the first failure
which may be the cause of subsequent failures.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-03-30 17:02:59 +05:30
Hidde Beydals de8f32bc90
Merge pull request #648 from pjbgf/gitlab-fix 2022-03-30 12:12:53 +02:00
Paulo Gomes da91e47036 Improve documentation on Debugging source controller
Expands on the current documentation to help contributors debug the controller
regardless of all its existing dependencies.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-30 10:50:40 +02:00
Paulo Gomes c84179088c Fixes regression accessing GitLab public repositories
Some git servers are more accommodating than others. Gitlab will try to
validate credentials when they are provided, even if they are empty and
the target repository is public, leading to a failed authentication error.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-30 10:50:40 +02:00
Paulo Gomes 9b1140cc81
Merge pull request #644 from ilanpillemer/align-fuzzing-deps
align fuzzing deps
2022-03-28 18:05:30 +01:00
Ilan 7d9aa8a772 align fuzzing deps
Signed-off-by: Ilan <ilan.pillemer@gmail.com>
2022-03-28 17:21:47 +01:00
Paulo Gomes ab30e1c4b7
Merge pull request #643 from pjbgf/release-v0.22.4
Release v0.22.4
2022-03-28 14:38:40 +01:00
Paulo Gomes 57336b8fe0
Release v0.22.4
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-28 14:19:29 +01:00
Paulo Gomes 90f34d573a
Merge pull request #637 from pjbgf/fix-managed-transport
Various fixes for managed transport
2022-03-28 14:02:23 +01:00
Paulo Gomes 92ad1f813b
Cache SSH connections
The underlying SSH connections are kept open and are reused
across several SSH sessions. This is due to upstream issues in
which concurrent/parallel SSH connections may lead to instability.

https://github.com/golang/go/issues/51926
https://github.com/golang/go/issues/27140
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-28 11:58:10 +01:00
Paulo Gomes 017707a71c
Improve managed transport observability
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-25 19:08:54 +00:00
Paulo Gomes b73f18a091
Update golang.org/x/crypto
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-25 19:08:53 +00:00
Paulo Gomes 5091b69ad5
Force ssh.Dial timeout
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-25 19:08:52 +00:00
Paulo Gomes a860ebee04
Reuse HTTP connections in managed transport
Ensure all requests are completely processed and closed,
to prove odds of the underlying connections to be reused.

The transport now is pooled and reused whenever possible.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-25 19:08:51 +00:00
Paulo Gomes 3819ac37bc
Move TransportPool to its own package
The experimental managed transport can also leverage TransportPool,
moving it to its own package to accommodate that use case.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-25 19:08:50 +00:00
Hidde Beydals f6b86cc444
Merge pull request #640 from fluxcd/release-v0.22.3 2022-03-25 16:45:29 +01:00
Hidde Beydals f60239bb3b Release v0.22.3
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-25 16:14:20 +01:00
Hidde Beydals be151c2fc1
Merge pull request #641 from fluxcd/fix-dpanic-log 2022-03-25 14:41:49 +01:00
Paulo Gomes 45641b17c7 Fix dpanic issue when logging odd number of args
Info was receiving odd number of arguments leading to:
odd number of arguments passed as key-value pairs for logging

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-25 14:27:04 +01:00
Sunny 0e733953c0
Merge pull request #639 from fluxcd/no-stalling-in-include
gitrepo: Do not stall when no included artifact
2022-03-25 16:55:44 +05:30
Sunny a62fee5ac0
gitrepo: Do not stall when no included artifact
The GitRepository object with included artifact should not stall when
the included artifact is not available since there's no way to signal a
reconciliation when the included artifact becomes available. The
reconciliation should fail and retry until the included artifact becomes
available.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-03-25 16:28:37 +05:30
Hidde Beydals 3cbb89d63b
Merge pull request #633 from fluxcd/release-v0.22.2 2022-03-23 20:03:47 +01:00
Hidde Beydals 3257d222f1 Release v0.22.2
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-23 19:46:31 +01:00
Hidde Beydals 985a915282
Merge pull request #632 from fluxcd/event-revision-annotation 2022-03-23 19:41:51 +01:00
Hidde Beydals 7ca393498c Prefix event annotations with API Group FQDN
This to facilitate improvements on the notification-controller side,
where annotations prefixed with the FQDN of the Group of the Involved
Object will be transformed into "fields".

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-23 19:28:05 +01:00
Sunny 01474953ac
Merge pull request #631 from fluxcd/source-ignore-subdir
test: source ignore for subdirectories in a repo
2022-03-23 17:55:19 +05:30
Sunny eed118b8c5
test: source ignore for subdirectories in a repo
Add gitrepository controller test for source ignore in a repository with
subdirectories where the subdirectories are part of the ignore patterns.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-03-23 17:17:06 +05:30
Hidde Beydals 65d274087d
Merge pull request #630 from fluxcd/release-v0.22.1 2022-03-23 11:03:41 +01:00
Hidde Beydals ec6d2f42c2 Release v0.22.1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-23 10:47:46 +01:00
Hidde Beydals e97fb2f310
Merge pull request #629 from fluxcd/bug-sourceignore 2022-03-23 10:44:47 +01:00
Hidde Beydals 501c8be467 fix: configure domain for .sourceignore rules
This ensures the scope while looking for matches is properly set, and
rules are thus correctly matched.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-23 10:29:08 +01:00
Stefan Prodan c00b601832
Merge pull request #628 from pjbgf/document-experimental-transport
Add experimental transport to spec documentation
2022-03-23 09:09:59 +02:00
Paulo Gomes ca64fac640
Add experimental transport to spec documentation.
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-22 19:22:19 +00:00
Stefan Prodan 499d569bd2
Merge pull request #627 from pjbgf/libgit2-documentation
Update development docs on libgit2
2022-03-22 08:41:36 +02:00
Paulo Gomes bf170561c6
Update development docs on libgit2
Since the move to using statically built versions of the dependency libraries
it is no longer required for users to install libgit2 into their development
environments.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-21 19:06:28 +00:00
Sunny 62b50074d9
Merge pull request #621 from fluxcd/release-v0.22.0
Release v0.22.0
2022-03-17 23:25:24 +05:30
Hidde Beydals 1711fcaed1 Release v0.22.0
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-17 18:32:00 +01:00
Hidde Beydals a9a2b3ed84
Merge pull request #622 from fluxcd/api-v1beta2-doc-polarity 2022-03-17 13:49:34 +01:00
Hidde Beydals 6bf8dc5cca api/v1beta2: add note on Condition polarity
This was missing for `BuildFailedCondition` and
`StorageOperationFailedCondition`.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-17 13:13:45 +01:00
Sunny e4d0b53164
Merge pull request #613 from fluxcd/reorder-conditions
Prioritize StorageOperationFailedCondition
2022-03-16 22:18:22 +05:30
Sunny a102d95cf9
Prioritize StorageOperationFailedCondition
Prioritize StorageOperationFailedCondition over other artifact outdated
and unavailable conditions so that when artifact is failing due to
storage operation, it's visble in the ready status condition, making the
reason for not ready more accurate.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-03-16 21:41:39 +05:30
Sunny a3cbe6ee46
Merge pull request #606 from pjbgf/managed-transport-libgit130
Experimental managed transport for libgit2 operations
2022-03-16 17:05:58 +05:30
Paulo Gomes 115040e9ea
Support redirects for libgit2 managed transport
For backwards compatibility, support for HTTP redirection is enabled when targeting
the same host, and no TLS downgrade took place.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-16 16:22:21 +05:30
Paulo Gomes 43661dd15e
Enforce effective URL on error messages
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-16 16:22:21 +05:30
Paulo Gomes d1a7e5d609
Fix race condition on httpSmartSubTransport
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-16 16:22:21 +05:30
Paulo Gomes 822788b79e
Fix word casing
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-16 16:22:21 +05:30
Paulo Gomes 4ed54bc359
Optimise basic auth for libgit2 managed transport
The initial implementation was based off upstream, which cause
an initial request to fail, and only then the credentials would
be added into the request.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-16 16:22:21 +05:30
Paulo Gomes 24bc95e1d8
Add license headers
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-16 16:22:21 +05:30