Commit Graph

9 Commits

Author SHA1 Message Date
Michael Bridgen 42aa8ed657 Use fluxcd/pkg/{apis,runtime}/acl for ACLs
This commit replaces the local ACL-related API types, and the func for
checking access, with their standarised forms in fluxcd/pkg/apis/acl
and fluxcd/pkg/runtime/acl respectively.

The test case for "When the ACL is empty, it denies access" needed
adjustment because the zero value of acl.AccessFrom is not valid -- it
needs an explicit list of namespace selectors. Providing `nil` in the
test case is the equivalent of providing a zero value.

Signed-off-by: Michael Bridgen <michael@weave.works>
2022-01-27 17:20:27 +00:00
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 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
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
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 fd9c1a23ad
Release v0.7.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-16 17:38:57 +02:00
Michael Bridgen 482be97e88 Switch to fluxcd/pkg/meta.LocalObjectReference
This comes with less baggage than the corev1 original.

(While I was here, I updated the fallback controller-gen version to
0.4.1, which gives much better error messages.)

Signed-off-by: Michael Bridgen <michael@weave.works>
2021-01-26 15:35:12 +00:00
Michael Bridgen bbd55c8a93 Implement use of certs from a secret
This implements the design in #89, so you can provide a TLS
certificate and key to use for authentication; and, a CA certificate
for when you are using self-signed certs.

Unlike other GOTK controllers, the certificate secret is separate to
the credentials secret. This is because the credentials secret is more
likely to be a dockerconfigjson secret (i.e., created with

    docker create secret docker-registry ...

or its equivalent).

Signed-off-by: Michael Bridgen <michael@weave.works>
2021-01-26 15:35:12 +00:00
Michael Bridgen 24dc118ead Add generated API documentation
(after a couple of tweaks:)

    make api-docs

Signed-off-by: Michael Bridgen <michael@weave.works>
2020-11-30 14:21:46 +00:00