Commit Graph

275 Commits

Author SHA1 Message Date
Stefan Prodan 8f4ae31562
Add test for empty label selector and fix ACL name
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-06 16:44:37 +03:00
Stefan Prodan c67a4c62f1
Add ACL documentation to the API spec docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-06 15:39:50 +03:00
Stefan Prodan 9126625713
Use the metav1 label selector helpers in ACL logic
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-06 14:57:30 +03:00
Stefan Prodan eb61ba0000
Implement access control list for repository
When a policy refers to a repository in a different namespace, the controller checks if the policy namespace labels match any of the selectors defined on the ImageRepository object. If the namespace where the policy resides, doesn't have labels or the labels don't match the repository ACL, then the controller sets the policy ready status to false and the reason to AccessDenied. The access denied error message is set on the ready condition message and logged before the controller rejects the policy.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-06 12:03:06 +03:00
Stefan Prodan 52960ab911
Add image repository access control list to API
- add `AccessFrom` to ImageRepositorySpec for granting cross-namespace access to repositories
- change `ImageRepositoryRef` type from local reference to namespaced reference

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-06 11:54:55 +03:00
Stefan Prodan 7084da9283
Merge pull request #161 from fluxcd/release-v0.11.1
Release v0.11.1
2021-08-05 16:15:33 +03:00
Stefan Prodan ba8634cbde
Release v0.11.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-05 16:06:25 +03:00
Stefan Prodan a9f6de1b67
Merge pull request #160 from fluxcd/update-deps
Update dependencies
2021-08-05 13:22:33 +03:00
Stefan Prodan a186041467
Update dependencies
- k8s.io/* v0.21.3
- controller-runtime v0.9.5
- badger v3.2103.1

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-05 12:48:53 +03:00
Michael Bridgen c22a8d04d0
Merge pull request #158 from fluxcd/samples-to-v1beta1
Correct apiVersion of v1beta1 samples
2021-07-14 10:33:20 +01:00
Michael Bridgen 5da11523f8 Correct apiVersion of v1beta1 samples
Signed-off-by: Michael Bridgen <michael@weave.works>
2021-07-14 09:18:41 +01:00
Michael Bridgen 4542bd0108
Merge pull request #155 from fluxcd/release-v0.11.0
Release v0.11.0
2021-06-28 12:58:54 +01:00
Michael Bridgen 5c94f3d811 Bump controller version used in config
Signed-off-by: Michael Bridgen <michael@weave.works>
2021-06-28 12:47:29 +01:00
Michael Bridgen 4b48cf19ae Write changelog entry for v0.11.0
Signed-off-by: Michael Bridgen <michael@weave.works>
2021-06-28 12:46:18 +01:00
Michael Bridgen 22f2317404 Bump API version to v0.11.0
Signed-off-by: Michael Bridgen <michael@weave.works>
2021-06-28 12:29:50 +01:00
Michael Bridgen 4073a938de
Merge pull request #154 from fluxcd/api-v1beta1
Graduate v1alpha2 API to v1beta1
2021-06-24 15:59:21 +01:00
Michael Bridgen d3dee1b3ff Add guide to v1beta1 API
Since the schema and semantics haven't changed, this is just the guide
for v1alpha2 with the version changed.

Signed-off-by: Michael Bridgen <michael@weave.works>
2021-06-24 15:50:11 +01:00
Michael Bridgen 58e7a1539d Graduate v1alpha2 API to v1beta1
The schema is the same, which means this is a case of

 - copying over the type definitions;
 - changing the "stored" CRD version;
 - giving a CRD conversion of None, meaning just change the apiVersion;
 - using the new API package in the controller code;
 - moving the API docs to v1beta1

Signed-off-by: Michael Bridgen <michael@weave.works>
2021-06-24 15:50:11 +01:00
Stefan Prodan d41b3f1db5
Merge pull request #153 from makkes/concurrent-reconciles
Make concurrent reconciliation configurable
2021-06-24 17:37:11 +03:00
Max Jonas Werner 03043e592e
chore: add options type for both controllers
This is in alignment with other controllers such as the
helm-controller.

Signed-off-by: Max Jonas Werner <mail@makk.es>
2021-06-24 16:22:07 +02:00
Max Jonas Werner f78b99301b
Make concurrent reconciliation configurable
Default for both, the ImageRepository and the ImagePolicy controllers
is 4 workers.

closes #148

Signed-off-by: Max Jonas Werner <mail@makk.es>
2021-06-23 17:05:03 +02:00
Hidde Beydals 6185181168
Merge pull request #152 from fluxcd/release-v0.10.0
Release v0.10.0
2021-06-10 14:28:14 +02:00
Hidde Beydals 3f549f535f Release v0.10.0
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-10 14:14:38 +02:00
Hidde Beydals 9fe157c6bd
Merge pull request #151 from fluxcd/nightly-builds 2021-06-10 13:49:29 +02:00
Hidde Beydals b606f2a024 Disable multi-arch builds for build workflow
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-10 11:19:40 +02:00
Hidde Beydals 7703b7c1ce Allow RC releases
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-10 10:58:11 +02:00
Hidde Beydals 99f5d447b9 Add nightly builds workflow
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-10 10:57:21 +02:00
Stefan Prodan 4646ed79b1
Merge pull request #150 from fluxcd/controller-runtime-v0.9.0
Update dependencies
2021-06-08 15:39:42 +03:00
Stefan Prodan 0539836ef3
Update dependencies
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-08 15:12:51 +03:00
Stefan Prodan d7072934fe
Merge pull request #149 from fluxcd/deps-up
Update Go and Badger
2021-06-03 12:04:21 +03:00
Stefan Prodan dfd180ff03
Update Go to v1.16
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-03 11:33:11 +03:00
Stefan Prodan a7d1ee2c6e
Update badger to v3.2103.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-03 11:31:53 +03:00
Aurel Canciu c0ee790b3e
Merge pull request #144 from fluxcd/error-reporting-image-policy
Better error reporting for image policy evaluation
2021-05-25 14:43:04 +02:00
Aurel Canciu 746f61edb3
Better error reporting for image policy evaluation
A more verbose message associated with the error should give the user
better understanding of the cause and the nature of the failure.

Fixes #143

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2021-05-14 20:05:54 +03:00
Stefan Prodan de3de64add
Merge pull request #141 from fluxcd/release-v0.9.1
Release v0.9.1
2021-04-29 12:10:35 +03:00
Stefan Prodan bee746a7b5
Release v0.9.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-29 11:47:04 +03:00
Stefan Prodan a82216d611
Merge pull request #140 from fluxcd/fix-invalid-regex-handling
Ensure invalid regex errors are reported to user
2021-04-29 10:28:48 +03:00
Aurel Canciu 6ffbfa67c2
Ensure invalid regex errors are reported to user
The errors generated by ImagePolicy resources having invalid tag filter
regex patterns were not being reported to the user correctly, no event
was recorded and the ReadyCondition message did not reflect the
encountered error.

Fixes #138

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2021-04-29 00:26:36 +03:00
Hidde Beydals 41cf207caf
Merge pull request #136 from fluxcd/remove-v1alpha1-from-scheme
Remove v1alpha1 API from Scheme
2021-04-22 10:37:04 +02:00
Hidde Beydals 480afb73a2 Remove v1alpha1 API from Scheme
This was accidentally done while mirroring the work done on the
image-automation-controller. It technically should not hurt, but
should not be either.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-22 10:04:05 +02:00
Stefan Prodan 13de2b4653
Merge pull request #135 from fluxcd/release-v0.9.0
Release v0.9.0
2021-04-22 09:18:06 +03:00
Stefan Prodan 678686f396
Release v0.9.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-21 20:23:18 +03:00
Stefan Prodan 2c0ff938e4
Merge pull request #134 from fluxcd/v1alpha2-docs
Add API docs for v1alpha2
2021-04-21 19:44:53 +03:00
Stefan Prodan 1158d23299
Add API docs for v1alpha2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-21 19:11:06 +03:00
Hidde Beydals ae2cf5589d
Merge pull request #132 from fluxcd/v1alpha2 2021-04-21 16:29:24 +02:00
Hidde Beydals b414878024 Update samples to v1alpha2 API
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-21 15:59:07 +02:00
Michael Bridgen ced5d88fe6 Move from v1alpha1 to v1alpha2 API
The image automation part of the API has changed structure (see [1]),
and had a version bump from `v1alpha1` to `v1alpha2`. Since the types
here are also in `image.toolkit.fluxcd.io`, there will be less
complication if they also get a version bump even though they aren't
changing.

[1] https://github.com/fluxcd/image-automation-controller/pull/139

Signed-off-by: Michael Bridgen <michael@weave.works>
2021-04-21 15:58:59 +02:00
Stefan Prodan 93cb3f3af5
Merge pull request #133 from fluxcd/runtime-v0.11.0
Runtime update and status patching
2021-04-21 13:50:47 +03:00
Stefan Prodan 43f06484fa
Use patch instead of update to set status
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-21 13:22:28 +03:00
Stefan Prodan 3eb929c0a1
Update fluxcd/pkg/runtime to v0.11.0
Followup https://github.com/fluxcd/pkg/pull/96

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-21 13:21:58 +03:00