Commit Graph

24 Commits

Author SHA1 Message Date
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
Aurel Canciu a55c502bb4
Fix HelmChart valuesFile chart path restriction
As part of the feature implementation to support helm chart
dependencies, the functionality for allowing values files overwriting
from any location scoped to the same source was altered. This should fix
the problem by allowing users to load files from any arbitrary location
as long as it's in the context of the same source from where the helm
chart itself is loaded.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-12-17 12:57:41 +02:00
Hidde Beydals 5f3c014966 Validate provided name for charts from HelmRepos
Following the rules described in
https://helm.sh/docs/chart_best_practices/conventions/#chart-names.

This guards against people following the wrong guidance of Artifactory,
that supports and promotes repository indexes with e.g. '/' in the
chart names.

In a future version this should be moved to a validation webhook, but
there are still discussions ongoing around the TLS certificates for
this.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-12-09 15:37:10 +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 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
Aurel Canciu f1362bd3a9
Implement DepdendencyManager for non-packaged
Non-packaged charts that don't have their dependencies present in
charts/ will now have these dependencies built using the
DependencyManager. The idea behind it is to replicate the logic
implemeneted in Helm's downloader.Manager with the support for already
existing HelmRepository resources and their chart retrieval capabilities.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-10-28 15:46:18 +02:00
Aurel Canciu ad995d80cc
Reorganize helm chart testdata for controllers
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-10-28 14:57:12 +02: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
Aurel Canciu 684624b1a0
Add support for loading packaged helm charts
The feature allows the source-controller to load packaged helm charts
for HelmChart resource artifacts from GitRepository and Bucket sources

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-10-27 11:15:17 +02: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 03ce9d96da Support Helm charts from Bucket sources 2020-09-21 12:40:15 +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 24f47ac183 Support Helm charts from GitRepository sources 2020-08-31 16:21:53 +02:00
Hidde Beydals d38b8fe193 Support proper semver ranges for Helm charts
This commit changes the semver range parser to `blang/semver`, which
is also used to parse semver tags for GitRepository sources.
2020-08-31 10:03:47 +02:00
Hidde Beydals 3475d741a3 Switch to dedicated git and helm testserver pkgs 2020-08-18 12:11:29 +02:00
Hidde Beydals 9d947b8efa Use testserver package from fluxcd/pkg 2020-08-18 12:11:29 +02:00
Hidde Beydals 0bc28f7a42 testserver: move from internal to pkg 2020-06-30 11:48:14 +02:00
Hidde Beydals 384bf9fe7c testserver: suffix structs with Server 2020-06-30 11:42:52 +02:00
stefanprodan ca884a9b37 test: fix GC tests for macOS 2020-04-30 09:56:46 +03: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 6083d886ce controllers: add HelmChart reconciler tests 2020-04-17 19:21:48 +02:00