-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elaborate on how to enable autologin for ECR #193
Changes from all commits
5c30c4b
9c125b5
5dd39b7
9f4d152
4a7a3ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ type ImageRepositorySpec struct { | |
``` | ||
|
||
The `Suspend` field can be set to `true` to stop the controller scanning the image repository | ||
specified; remove the field value or set to `false` to resume scanning. | ||
specified; remove the field value or set it to `false` to resume scanning. | ||
|
||
### Authentication | ||
|
||
|
@@ -77,9 +77,40 @@ For a publicly accessible image repository, you will not need to provide a `secr | |
|
||
When running in [<abbr title="Elastic Kubernetes Service">EKS</abbr>][EKS] and using [<abbr | ||
title="Elastic Container Registry">ECR</abbr>][ECR] to store images, you should be able to rely on | ||
the controller retrieving credentials automatically. The controller must be run with the flag | ||
`--aws-autologin-for-ecr` set for this to work. The advice under "Other platforms" below will also | ||
work for ECR. | ||
the controller retrieving credentials automatically. | ||
|
||
The `image-reflector-controller` must be run with the flag `--aws-autologin-for-ecr` set for this to work. | ||
|
||
This flag can be added by including a patch in the `kustomization.yaml` overlay file in your `flux-system`, | ||
similar to the process described in [customize Flux manifests][]: | ||
|
||
``` | ||
patches: | ||
- target: | ||
version: v1 | ||
group: apps | ||
kind: Deployment | ||
name: image-reflector-controller | ||
namespace: flux-system | ||
patch: |- | ||
- op: add | ||
path: /spec/template/spec/containers/0/args/- | ||
value: --aws-autologin-for-ecr | ||
``` | ||
|
||
Alternatively, the advice under [Other platforms][other platforms] below will also work for ECR. | ||
|
||
> You need to upgrade to Flux version 2 release [v0.19][Flux v0.19.0] that contains the image-reflector-controller release [v0.13.0][image-reflector-controller v0.13.0]. | ||
|
||
> [**Release date**: 2021-10-19][image-reflector-controller v0.13.0] | ||
> | ||
> This prerelease adds experimental support for automatically getting | ||
credentials from AWS when scanning an image in [Elastic Container Registry | ||
(ECR)][ECR]. | ||
> | ||
> Improvements: | ||
> * Get credentials from AWS ECR when needed | ||
> [#174][image-reflector-controller#174] | ||
|
||
#### Other platforms | ||
|
||
|
@@ -190,7 +221,7 @@ type ImageRepositoryStatus struct { | |
// +optional | ||
ObservedGeneration int64 `json:"observedGeneration,omitempty"` | ||
|
||
// CannonicalName is the name of the image repository with all the | ||
// CanonicalImageName is the name of the image repository with all the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This section is taken from https://github.com/fluxcd/image-reflector-controller/blob/main/api/v1beta1/imagerepository_types.go#L99 which also has this incorrect name. Can you update that as well and run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like this has been taken care of. I found another CannonicalName in the docs and updated it there 👍 |
||
// implied bits made explicit; e.g., `docker.io/library/alpine` | ||
// rather than `alpine`. | ||
// +optional | ||
|
@@ -261,3 +292,8 @@ and reference it under `secretRef`. | |
[sops-guide]: https://toolkit.fluxcd.io/guides/mozilla-sops/ | ||
[EKS]: https://docs.aws.amazon.com/eks/latest/userguide/what-is-eks.html | ||
[ECR]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/what-is-ecr.html | ||
[customize Flux manifests]: https://fluxcd.io/docs/installation/#customize-flux-manifests | ||
[other platforms]: https://fluxcd.io/docs/components/image/imagerepositories/#other-platforms | ||
[Flux v0.19.0]: https://github.com/fluxcd/flux2/releases/tag/v0.19.0 | ||
[image-reflector-controller v0.13.0]: https://github.com/fluxcd/image-reflector-controller/blob/main/CHANGELOG.md#0130 | ||
[image-reflector-controller#174]: https://github.com/fluxcd/image-reflector-controller/pull/174 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API specs usually don't contain changelogs, what's the reason we add these here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an experimental feature, I wanted to call out the release version that these docs applied to so that it is clear enough what needs to be updated when changes inevitably happen. (Also, it was a suggestion from @lloydchang)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose the right place for this documentation might actually be here. This section should be updated anyway since it's likely a lot of folks will prefer this method of authentication over the CronJob approach.