Hidde Beydals
2103d38a70
Merge pull request #33 from fluxcd/git-timeout
...
api: add timeout field to GitRepositorySpec
2020-04-22 12:16:31 +02:00
Hidde Beydals
920d37fcda
api: add timeout field to GitRepositorySpec
...
This commit adds a timeout field to the GitRepositorySpec to be used
during the git clone operation when reconciling the resource.
When no interval is defined the default timeout returned by the getter
is 20 seconds.
The timeout can not be added yet to the Helm related sources as it
is currently not possible to inject anything custom into the HTTP
client from the Helm HTTP getter except for the authentication
options built in. A submit has been submitted to make this possible
and is waiting for review.
This commit includes some context changes to the other reconcilers
to tidy them up and make them depend on a single background context.
It also includes some added docblocks that crossed my path.
2020-04-22 11:42:27 +02:00
stefanprodan
61d49cab5e
controller: Move SyncAt annotation to API
2020-04-20 10:51:33 +03:00
Hidde Beydals
5b77100589
controllers: make concurrent reconciles config opt
...
Introduces new helpers and config structs to all reconcilers to
set the max concurrent reconciles number.
Introduces a new flag `--concurrent` to configure the number of
concurrent reconciles per reconciler, defaults to `2`.
2020-04-19 11:52:10 +02:00
Hidde Beydals
236a6950cd
controllers: test HelmChart missing HelmRepository
2020-04-17 20:39:33 +02:00
Hidde Beydals
7e7f1ccd89
controllers: test HelmChart secretKey usage
2020-04-17 20:29:45 +02:00
Hidde Beydals
d36efa70dd
controllers: slightly restructure HelmRepository tests
2020-04-17 19:21:55 +02:00
Hidde Beydals
6083d886ce
controllers: add HelmChart reconciler tests
2020-04-17 19:21:48 +02:00
Hidde Beydals
31656c2d62
controllers: test HelmRepository invalid URL
2020-04-17 12:26:42 +02:00
Hidde Beydals
8f09c453ab
controllers: test HelmRepository missing secretRef
2020-04-17 12:17:04 +02:00
Hidde Beydals
3c70c8d333
controllers: test HelmRepository TLS auth
2020-04-17 10:41:24 +02:00
Hidde Beydals
1cc6464b73
controllers: test HelmRepository HTTP basic auth
2020-04-17 10:36:24 +02:00
Hidde Beydals
a50ea436fa
controllers: basic HelmRepository reconciler tests
2020-04-17 10:35:52 +02:00
Hidde Beydals
ab3879d170
controllers: check if != nil before defering
2020-04-16 11:11:51 +02:00
stefanprodan
40c1851ffc
Add verification failed reason
2020-04-14 18:35:23 +03:00
Stefan Prodan
440c70d010
Fix public key naming
...
Co-Authored-By: Hidde Beydals <hiddeco@users.noreply.github.com>
2020-04-14 18:26:59 +03:00
stefanprodan
96e289fda0
Implement PGP signature verification
...
- check if HEAD commit is PGP signed
- load GPG public keys from Kubernetes secret
- verify PGP signature
2020-04-14 18:25:25 +03:00
Hidde Beydals
45da46216c
Merge pull request #21 from fluxcd/log-context
...
Use same logger during reconcile operations
2020-04-14 12:08:53 +02:00
stefanprodan
1832b2d11d
Introduce source interface
...
- add source interface with `GetArtifact` and `GetInterval` funcs
- implement source interface for all types
- fix HelmChart requeue
2020-04-14 12:49:31 +03:00
Hidde Beydals
b0f4908af0
Use same logger during reconcile operations
2020-04-14 11:36:46 +02:00
stefanprodan
e88d7219ca
Change artifact path format
...
- move artifact path composition to API
- change path format to `<source-kind>/<source-namespace>/<source-name>/<artifact-filename>`
2020-04-13 19:52:30 +03:00
Hidde Beydals
f8e0685af1
Merge pull request #14 from fluxcd/git-auth-helper
...
Internal helpers for Git auth methods from secrets
2020-04-13 13:44:00 +02:00
Hidde Beydals
90348ebf08
Internal helpers for Git auth methods from secrets
2020-04-13 13:19:23 +02:00
Hidde Beydals
23f0b38ac2
Add helmchart/finalizers RBAC rule for OpenShift
2020-04-13 13:12:41 +02:00
Hidde Beydals
194371c4c0
Set owner ref to HelmRepository on HelmChart
2020-04-13 12:29:13 +02:00
Hidde Beydals
ea610829c3
Helm repository and chart HTTP and TLS auth
2020-04-13 11:47:51 +02:00
Hidde Beydals
1b391f4896
Move artifact gc to delete event predicate
2020-04-13 01:35:44 +02:00
Hidde Beydals
629da726c6
Rename RepositoryChange to SourceChange predicate
2020-04-13 01:11:07 +02:00
Hidde Beydals
4bde6bf880
Prevent delete from wiping all artifacts for kind
2020-04-12 22:07:57 +02:00
Hidde Beydals
3e0810aefe
Give namespace precedence in calc artifact path
2020-04-12 22:07:57 +02:00
Hidde Beydals
7e99998c5f
Factor out injection of kind string in controllers
2020-04-12 22:07:53 +02:00
Hidde Beydals
d378bd1852
Introduce HelmChart API and controller
...
- Add the HelmChart types and controller
- Semver expressions are found by utilizing Helm repository index
helpers. As Helm makes use of `masterminds/semver`, the support
for i.e. ranges less mature than the `GitRepository` implementation.
- Recorded semver is as defined in the metadata of the chart. The
used name for the artifact does however include the checksum of the
chart archive, as chart maintainers may not always properly apply
semver.
- Switches to `sigs.k8s.io/yaml` for YAML operations as this among
other things is able to properly unmarshal embedded structures.
- Directly requeues on transient errors instead of using the defined
interval as a back-off strategy is applied on repeated failures.
2020-04-12 18:44:37 +02:00
stefanprodan
f9a35a6613
Move status condition helpers to API
2020-04-12 18:12:28 +03:00
stefanprodan
2bbcd91544
Add artifact to Git and Helm repos status
...
- create index.yaml symlink for Helm repos
- set symlink URL in status
2020-04-12 17:39:07 +03:00
stefanprodan
41d36f54ae
Wrap errors in git controller
2020-04-12 17:13:50 +03:00
stefanprodan
12d25ca47a
Add symlink for latest Git artifact
2020-04-12 09:56:52 +03:00
stefanprodan
786071fe3c
Add symlink helper to storage
2020-04-12 09:56:03 +03:00
stefanprodan
06af12739d
Implement Git SSH authentication
2020-04-11 21:30:39 +03:00
stefanprodan
bbc25c3de0
Implement Git HTTP authentication
2020-04-11 12:14:16 +03:00
stefanprodan
e2d28296e1
Add GitRepositoryRef type
...
- add commit ref field
- implement commit checkout
2020-04-11 11:21:12 +03:00
stefanprodan
d1f76995ab
Add ready condition helpers
2020-04-10 22:44:09 +03:00
stefanprodan
131b9b8e33
Lock artifact on helm index download
...
- cleanup locks with GC
2020-04-10 16:45:23 +03:00
stefanprodan
98deb3fa54
Add file lock helper to Storage
...
- use https://github.com/golang/go/tree/master/src/cmd/go/internal/lockedfile
2020-04-10 16:08:05 +03:00
stefanprodan
9dae1c43d7
Use storage helper in HelmRepositoryReconciler
...
- move checksum and file write operations to Storage
- implement GC
2020-04-10 15:16:31 +03:00
stefanprodan
ce01399c15
Refactor git controller fs operations
...
- use storage helper in GitRepositoryReconciler
- implement artifacts GC
- rename status artifacts to artifact
2020-04-10 12:01:06 +03:00
stefanprodan
d1fb8e1ade
Add storage helpers
...
- add storage and artifact types
- extract fs operations to storage functions
- construct artifact paths from Kubernetes objects metadata
2020-04-10 11:51:15 +03:00
stefanprodan
8cd8d8f6f2
Consolidate status conditions
...
- Use the same condition type as https://github.com/kubernetes/enhancements/pull/1624 so it can be dropped in favour of the Kubernetes type when that PR is merged
2020-04-10 08:38:40 +03:00
Hidde Beydals
81873e7553
Download Helm repository indexes w/ Helm's getter
2020-04-09 15:53:38 +02:00
Hidde Beydals
4d30a82ef4
Rename project to source-controller
2020-04-08 16:12:17 +03:00
stefanprodan
62350a944b
Implement git tag semver filter
2020-04-07 13:22:55 +03:00