Commit Graph

60 Commits

Author SHA1 Message Date
Hidde Beydals 582c2092b6 Change copyright to Flux authors
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-10-27 17:54:22 +01:00
stefanprodan f16e5f041a Promote API to v1beta1 2020-09-30 16:11:00 +03:00
Hidde Beydals 431ea05427 Implement `fluxcd/pkg/meta/api` in APIs 2020-09-30 10:18:43 +02:00
Hidde Beydals b9576d56f1 Prevent resources getting stuck on transient err
This commit ensures that resources will only return early if they are
already in a `Ready==True` state. If not, but the status object somehow
still reports that it has an artifact, the reconciliation will continue
to ensure and/or guarantee state, and to prevent a deadlock from
happening.
2020-09-22 17:00:54 +02:00
Hidde Beydals 270b6a5c0c api: add HasRevision method to Artifact 2020-09-21 22:41:51 +02:00
Hidde Beydals 8cdb821946 docs: document Bucket support HelmChart 2020-09-21 12:40:15 +02:00
Hidde Beydals 03ce9d96da Support Helm charts from Bucket sources 2020-09-21 12:40:15 +02:00
stefanprodan 2ca47fb4ba Guard against missing S3 credentials 2020-09-18 16:11:24 +03:00
stefanprodan 0e6ae3b769 Add Bucket type to API 2020-09-18 16:11:24 +03:00
Hidde Beydals 2e0b6cb6c9 Allow overwriting chart values from GitRepository 2020-09-11 11:32:45 +02:00
Hidde Beydals f40a42115b Conditionally remove artifact from source status
We only want to remove it if it is no longer in storage, otherwise we
still want to keep it around till we have a new artifact.
2020-09-11 10:10:47 +02:00
Hidde Beydals 7a3a5938d3 Mark resources as progressing on spec changes 2020-09-10 14:13:41 +02:00
Hidde Beydals 42706a342b Calculate checksums during file writes 2020-09-10 13:00:08 +02:00
Michael Bridgen 901463eaaa Use pkg/runtime for predicate and logger 2020-09-09 17:57:16 +01:00
Hidde Beydals 99b74da044 api/artifact: add checksum field to artifact
This includes a change to how the revision for HelmRepository sources is
recorded, as this will now equal to the generated timestamp from the index
in RFC3339Nano format.
2020-09-09 13:41:56 +02:00
Hidde Beydals 0b752178b1 storage: only store relative path in artifact
As the storage base directory is determined during runtime, and
artifacts may live longer than that if they are e.g. stored in a
persistent volume but the mount path configuration changes.
2020-09-08 17:21:56 +02:00
Hidde Beydals f8c4bd31ca api/artifact: add ArtifactDir helper func
To make it easier to construct just the directory path for the
artifact (relative to the storage base path).
2020-09-08 15:16:58 +02:00
Hidde Beydals 24f47ac183 Support Helm charts from GitRepository sources 2020-08-31 16:21:53 +02:00
stefanprodan 227c9c88f9 Use logger package from fluxcd/pkg
Update client-go to v0.18.8 and controller-runtime to v0.6.2
2020-08-21 12:10:01 +03:00
Hidde Beydals 157ad2f51a Make various targets work after api pkg change 2020-08-20 10:32:24 +02:00
Hidde Beydals b75d613f3a Make api package dedicated module
As other controllers depend on source-controller because of the API
package, but this pulls in obsolete dependencies for the controllers.
By publishing the API package as a dedicated module while
using a (local) replace for the project itself, this should be
prevented.
2020-08-17 17:20:11 +02:00
stefanprodan 4486ab7a5e Implement HelmRepository timeout 2020-08-12 14:10:03 +03:00
Hidde Beydals 8e1b213da5 Change CRD domain to 'source.toolkit.fluxcd.io'
Due to required domain changes for the helm-controller so that it
can co-exist in a cluster with the Helm Operator, other Toolkit
components are moving to a *.toolklit.fluxcd.io domain too.
2020-07-30 21:50:46 +02:00
Hidde Beydals e72855f88d Refactor garbage collectors to finalizers 2020-07-16 14:18:33 +02:00
stefanprodan b3e58b48dd Rename syncAt annotation to reconcileAt
Use `fluxcd.io/reconcileAt` annotation across all controllers.
2020-07-13 16:06:16 +03:00
Hidde Beydals c90be06345 Add constants for kind names 2020-07-10 12:07:54 +02:00
stefanprodan b9dc2ecf64 Add ignore field to GitRepository spec 2020-07-09 14:48:02 +03:00
Erik Hollensbe b1b1dbcec5 Support programming excluded patterns in gitrepository spec
-- More coming in this commit message soon

Signed-off-by: Erik Hollensbe <github@hollensbe.org>
2020-07-08 14:38:44 +00:00
Hidde Beydals 7e647a6bb2 Generate API documentation 2020-06-19 16:45:05 +02:00
stefanprodan c9db552555 git: fix reference json serialization
- add omitempty to GitRepositoryRef fields
2020-04-30 09:54:34 +03:00
stefanprodan 8071dadbf0 status: record progressing
Set ready condition to unknown while the reconciliation is progressing.
This allows other operators to wait for a sync to complete.
2020-04-27 11:16:35 +03:00
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
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 8d67f3360b Add PGP signature verification to API 2020-04-14 18:25:25 +03:00
Hidde Beydals dbe3f4fa9c api: corrections to match v1alpha1 spec 2020-04-14 13:34:38 +02: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 dd688879ee Get message from truely ready conditions only 2020-04-14 11:36:50 +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 ea610829c3 Helm repository and chart HTTP and TLS auth 2020-04-13 11:47:51 +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 461c015273 Add artifact type to API 2020-04-12 17:31:25 +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 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