Commit Graph

260 Commits

Author SHA1 Message Date
Hidde Beydals e42eedd392 Introduce more explicit Condition types
This commit introduces new Condition types to the v1beta1 API,
facilitating easier observation of (potentially) problematic state for
end-users.

- `ArtifactUnavailableCondition`: indicates there is no artifact
  available for the resource. This Condition should be set by the
  reconciler as soon as it observes the absence of an artifact for a
  source.
- `CheckoutFailedCondition`: indicates a transient or persistent
  checkout failure. This Condition should be set by the reconciler as
  soon as it observes a Git checkout failure, including any
  prerequisites like the unavailability of the referenced Secret used
  for authentication. It should be deleted as soon as a successful
  checkout has been observed again.
- `SourceVerifiedCondition`: indicates the integrity of the source has
  been verified. The Condition should be set to True or False by the
  reconciler based on the result of the integrity check.
  If there is no verification mode and/or secret configured, the
  Condition should be removed.
- `IncludeUnavailableCondition`: indicates one of the referenced
  includes is not available. This Condition should for example be set
  by the reconciler when the include does not exist, or does not have
  an artifact. If the includes become available, it should be deleted.
- `ArtifactOutdatedCondition`: indicates the current artifact of the
  source is outdated. This Condition should for example be set by the
  reconciler when it notices there is a newer revision for an artifact,
  or the previously included artifacts differ from the current available
  ones. The Condition should be removed after writing a new artifact
  to the storage.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-02-23 12:35:30 +01:00
Hidde Beydals 7c3c14997e Switch to v1beta2 API package
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-02-23 12:35:25 +01:00
Sunny cc1e48243d Introduce v1beta2 API package
This commit introduces a v1beta2 API package for the staged breaking
changes around conditions and general usage of the API objects.

Signed-off-by: Hidde Beydals <hello@hidde.co>
Signed-off-by: Sunny <darkowlzz@protonmail.com>
Co-authored-by: Hidde Beydals <hello@hidde.co>
2022-02-23 12:34:35 +01:00
Stefan Prodan fb45c9caf6
Increase default timeout to 60s
Increase the default timeout from 20s to 60s for Git repository cloning and Bucket download

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-07 10:29:43 +02:00
Stefan Prodan eacabe23a1
Log the error when tmp cleanup fails
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-07 10:37:06 +02:00
Aurel Canciu 22d0880e4d
Update flux pkg components
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2021-12-20 14:47:44 +01:00
Aurel Canciu e3d04b31bc
Update Go to v1.17
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2021-12-20 13:11:21 +01:00
York Chen 9eab99fe00 crds: set default observedGeneration to -1
This ensures the resources aren't marked as Healthy prematurely
by tools as e.g. kstatus. Which will now report a status of
`InProgress` instead of `Ready`.

Signed-off-by: York Chen <ychen@d2iq.com>
2021-12-09 14:19:09 +01:00
Jonathan Innis 8870a0b3af Change bucket JSONPath from url to endpoint
Signed-off-by: Jonathan Innis <jonathan.innis.ji@gmail.com>
2021-12-04 15:15:49 -08:00
Stefan Prodan de09b6ee9b Update controller-runtime to v0.10.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-22 14:36:43 +01:00
Stefan Prodan 058a016a60 Add ACL optional field to Source API
Cherry-picked from 525be388ec.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-22 11:41:55 +01:00
Hidde Beydals fb688ffe8a
storage: change Artifact checksum to SHA256
This changes the format of the Artifact checksum from SHA1 to SHA256 to
mitigate chosen-prefix and length extension attacks, and ensures it can
be used to secure content against malicious modifications.

Source consumers (including our own {kustomize,helm}-controllers)
should ensure the SHA256 of a downloaded artifact matches the
advertised checksum before making use of it.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-11-11 22:47:49 +01:00
Hidde Beydals b7376ce94c gogit: allow checkout of commit without branch
This commit changes the `gogit` behavior for commit checkouts,
now allowing one to reference to just a commit while omitting any
branch reference. Doing this creates an Artifact with a
`HEAD/<commit>` revision.

If both a `branch` and `commit` are defined, the commit is expected
to exist within the branch. This results in a more efficient clone
of just the target branch, and also makes this change backwards
compatible.

Fixes #407
Fixes #315

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-10-27 00:43:31 +05:30
Dylan Arbour 5e6abae9e8 Add ReconcileStrategy to HelmChart
This commit adds a `ReconcileStrategy` field to the `HelmChart` resource, which
allows defining when a new chart should be packaged and/or published if it
originates from a `Bucket` or `GitRepository` resource.

The two available strategies are:

- `ChartVersion`: creates a new artifact when the version of the Helm chart as
  defined in the `Chart.yaml` from the Source is different from the current
  version.
- `Revision`: creates a new artifact when the revision of the Source is
  different from the current revision.

For the `Revision` strategy, the (checksum part of the) revision of the
artifact the chart originatesfrom is added as SemVer metadata.

A chart from a `GitRepository` with Artifact revision
`main/f0faacd5164a875ebdbd9e3fab778f49c5aadbbc` and a chart with e.g. SemVer
`0.1.0` will be published as `0.1.0+f0faacd5164a875ebdbd9e3fab778f49c5aadbbc`.

A chart from a `Bucket` with Artifact revision
`f0faacd5164a875ebdbd9e3fab778f49c5aadbbc` and a chart with e.g. SemVer `0.1.0`
will be published as `0.1.0+f0faacd5164a875ebdbd9e3fab778f49c5aadbbc`.

Signed-off-by: Dylan Arbour <arbourd@users.noreply.github.com>
2021-10-14 13:49:52 -05:00
pa250194 0444c6e16d Service Account Key Authentication to GCP Provider
Signed-off-by: pa250194 <pa250194@ncr.com>
2021-09-16 09:49:56 -05:00
pa250194 7da9619b58 Feature: Add Support for Google Cloud Storage along with Workload Identity
Added Support for Google Cloud Storage with Workload Identity as Source Provider. This enables the use of GCP without enabling S3 compatible access.

Signed-off-by: pa250194 <pa250194@ncr.com>
2021-09-16 09:49:56 -05:00
Stefan Prodan 7001b34f10
Update dependencies
- k8s.io/* v0.21.3
- controller-runtime v0.9.5
- kubectl 1.21.3

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-05 12:43:08 +03:00
Hidde Beydals 1f27410b34 Update Helm to v3.6.1
v3.6.1 is a a security update from Helm, ensuring that credentials are
always only passed to the defined repository host.

Based on Helm user reports, disabling this behavior may be required for
some Helm repository solutions like Artifactory, and may be done by
setting `PassCredentials` in the `HelmRepositorySpec`.

For more information, see:
https://github.com/helm/helm/security/advisories/GHSA-56hp-xqp3-w2jf

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-18 12:31:23 +02:00
Hidde Beydals a76b10cebb Update K8s, controller-runtime and fluxcd/pkg deps
Controller-runtime has been updated to `v0.9.0`, K8s dependencies to
`v0.21.1`, and all `fluxcd/pkg` and other dependencies to the versions
that have matching dependencies and/or build constraints.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-08 13:41:34 +02:00
Philip Laine fcf7048992 Add include property to GitRepositories
Signed-off-by: Philip Laine <philip.laine@gmail.com>
Signed-off-by: Philip Laine <philip.laine@xenit.se>
2021-05-11 09:46:50 +02:00
Stefan Prodan cb491c9f10
Update fluxcd/pkg/runtime to v0.11.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-21 15:04:16 +03:00
Dylan Arbour 4a834e1d2d Add `ValuesFiles` to HelmChart spec
Signed-off-by: Dylan Arbour <arbourd@users.noreply.github.com>
2021-04-19 09:16:53 -04:00
abhinav454 ae24285596 Add shortNames to api resources
Signed-off-by: abhinav454 <43758739+abhinav454@users.noreply.github.com>
2021-04-15 09:03:56 -04:00
Stefan Prodan d7c90a533d
Update Helm to v3.5.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-15 11:57:01 +03:00
Hidde Beydals d3bcc6a66b Update Go to 1.16
This commit updates Go to 1.16, a required change because of the use of
`os.WriteFile` in one of the tests introduced by commit
b5004a93bc.

Normally _just_ this would not justify the change, but given the
introduction of breaking changes (and thereby forcing a MINOR update
anyway), and the various file{system, path} improvements introduced in
Go 1.16 like
[`filepath#WalkDir`](https://golang.org/pkg/path/filepath/#WalkDir),
going ahead with this should be fine.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-13 16:35:41 +02:00
Stefan Prodan 664a568822
Add support for Git submodules with go-git
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-30 13:00:13 +03:00
Stefan Prodan 2f04bd3043
Update dependencies
- helm.sh/helm/v3 v3.5.3
- github.com/minio/minio-go/v7 v7.0.10
- sigs.k8s.io/controller-runtime v0.8.3

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-12 12:39:23 +02:00
Stefan Prodan 22f5a6f6fb
Update dependencies
- helm.sh/helm/v3 v3.5.2 (forces us into pinning docker)
- sigs.k8s.io/controller-tools/cmd/controller-gen v0.4.1
- sigs.k8s.io/controller-runtime v0.8.2
- fluxcd/pkg/apis/meta v0.8.0
- fluxcd/pkg/runtime v0.8.3

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-23 13:18:21 +02:00
Hidde Beydals 7e63ef841c Rename Git packages to implementations
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-02-08 13:55:23 +01:00
Stefan Prodan 207ed99d72
Use LocalObjectReference from fluxcd/pkg/meta v0.7
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-21 14:18:42 +02:00
Stefan Prodan 8e3700ebd8
Add QPS/Burst flags using fluxcd/pkg/runtime v0.8
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-21 14:13:07 +02:00
Hidde Beydals 34c4290cda Alin HelmChart source indexer and watches
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-01-18 17:08:25 +01:00
Stefan Prodan ab16dd7c2e
Update Kubernetes and Helm packages
- k8s.io/api v0.20.2
- controller-runtime v0.8.0
- helm v3.5.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-16 14:38:28 +02:00
Hidde Beydals fda481efe9 Upgrade controller-runtime to v0.7.0
This commit upgrades the `controller-runtime` dependency to `v0.7.0`,
including all changes required to make all wiring work again.

- Upgrade `runtime` to v0.6.0 to include `controller-runtime` changes.
- Loggers have been removed from the reconcilers and are now retrieved
  from the `context.Context` passed to the `Reconcile` method and
  downwards functions.
- Logger configuration flags are now bound to the flag set using
  `BindFlags` from `runtime/logger`, ensuring the same contract across
  GitOps Toolkit controllers, and the `--log-json` flag has been
  deprecated in favour of the `--log-encoding=json` default.
- The `ChangePredicate` from `runtime` has changed to a
  `ReconcilateAtChangedPredicate`, and is now chained with the
  `GenerationChangedPredicate` from `controller-runtime` using
  `predicate.Or`.
- Signatures that made use of `runtime.Object` have changed to
  `client.Object`, removing the requirement to e.g. call
  `runtime.Object#Object`.
- The `client.MatchingField` function was deprecated, and has been
  replaced with `client.MatchingFields{}`.
- The `leader-election-role` was changed, as leader election now works
  via the `coordination/v1` API.

Other notable changes:

- `util.ObjectKey` was added to easily construct a `client.ObjectKey` /
  `types.NamespacedName` from a `metav1.Object`.
- The `SourceIndexKey` constant has been split out into
  `{GitRepository,HelmRepository,Bucket}IndexKey` constants.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-12-18 19:17:10 +01:00
Hidde Beydals 830b350339 Upgrade dependencies
* `github.com/fluxcd/pkg/apis/meta` to `v0.5.0`
* `github.com/fluxcd/pkg/helmtestserver` to `v0.1.0`
* `github.com/fluxcd/pkg/runtime` to `v0.4.0`
* `helm.sh/helm/v3` to `v3.4.2`
* `k8s.io/{api,apimachinery,client-go}` to `v0.19.4`
* `sigs.k8s.io/controller-runtime` to `v0.6.4`

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-12-09 18:22:27 +01:00
Philip Laine f044ebc253 Rename git2go option to libgit2
Signed-off-by: Philip Laine <philip.laine@xenit.se>
2020-12-06 23:19:57 +01:00
Philip Laine 1b4eacc588 Refactor argument name to enable git2go
Signed-off-by: Philip Laine <philip.laine@xenit.se>
2020-12-04 10:07:17 +01:00
Philip Laine 2cb3754953 Add support for gitv2 servers
Signed-off-by: Philip Laine <philip.laine@xenit.se>
2020-12-02 20:18:29 +01:00
Hidde Beydals 0c904a1879 Watch chart sources for revision changes
To enqueue a new reconciliation for the HelmChart sources as soon as
the revision of their upstream source changes.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-11-26 13:02:55 +01:00
Stefan Prodan 07d09e2c2e
Add suspend field to Source API
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-26 12:49:12 +02:00
Hidde Beydals 0b4586253c Add LastHandledReconcileAt to source statuses
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-11-19 13:21:59 +01:00
Aurel Canciu b80f450b68
Switch to new pkg/apis/meta SetResourceCondition
Use SetResourceCondition as a generic method to set conditions for CRs,
implmeneting the ObjectWithStatusConditions interface used as input
type.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-11-19 13:08:33 +02:00
Aurel Canciu 69f9bbdaa6
Use SetStatusCondition vs FilterOutCondition
Change to rely on the upstream k8s api/meta SetStatusCondition to
set/update the resources status conditions rather than
FilterOutCondition from apis/meta which is due to be removed.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-11-19 13:08:33 +02:00
Aurel Canciu 00bb853d0e
Refactor to adopt k8s standardized Condition type
Updates to use metav1.Condition type and removes references for
deprecated corev1.Condition* constants and uses the new k8s api/meta
helpers in place of the old pkg/apis/meta types.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-11-19 13:08:33 +02:00
Philip Laine 0596513afd Add documentation for kind string constants
Signed-off-by: Philip Laine <philip.laine@xenit.se>
2020-11-02 09:55:39 +01:00
Philip Laine 01d0053871 Fix duration default values
Signed-off-by: Philip Laine <philip.laine@xenit.se>
2020-11-02 09:55:39 +01:00
Philip Laine d67dd6cd58 Set default values in api objects
Signed-off-by: Philip Laine <philip.laine@xenit.se>
2020-11-02 09:55:39 +01:00
Aurel Canciu 60d1dc8219
Update pkg components and k8s to 1.19
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-11-01 18:11:27 +02:00
Hidde Beydals 54aaef5380
Index HelmRepository resources by their URL
To facilitate an inexpensive lookup when collecting credentials and
index artifacts while working with chart dependencies.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-10-28 14:57:12 +02:00
Hidde Beydals c657e68ba1 Various API doc corrections
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-10-28 01:09:21 +01:00
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
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
stefanprodan 3efd54efd1 Add git repository artifacts to API 2020-04-06 19:02:14 +03:00
stefanprodan f4e568d4b9 Add Git branch and tag to API 2020-04-06 10:42:35 +03:00
stefanprodan f740d434dc Add repository sync interval to API 2020-04-05 18:10:30 +03:00
stefanprodan d9ee2ab288 Implement Helm repository readiness 2020-04-05 16:41:26 +03:00
stefanprodan 6b31c57ba7 Add repository status conditions 2020-04-05 15:18:43 +03:00
stefanprodan 92b7b1fe43 Scaffold repository controllers 2020-04-05 12:34:29 +03:00