Skip to content
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

Closed
wants to merge 5 commits into from

Conversation

kingdonb
Copy link
Member

Fixes fluxcd/website#601

There is not enough context in the documentation for --aws-autologin-for-ecr to guarantee that a new user who finds this section of the doc will be able to figure out where or how to add this flag to the image-reflector-controller.

Provide an example patches directive and be sure to say more explicitly which controller accepts this flag. (It is not at all obvious which controller owns the documentation at this URL, even though it has been pulled from this repo, there is no breadcrumb at all or anything else which says "image reflector controller")

https://fluxcd.io/docs/components/image/imagerepositories/#ecr-and-eks

kingdonb pushed a commit to lloydchang/image-reflector-controller that referenced this pull request Oct 31, 2021
kingdonb pushed a commit to kingdonb/image-reflector-controller that referenced this pull request Oct 31, 2021
@kingdonb
Copy link
Member Author

I incorporated some additional feedback from @lloydchang based on kingdonb#1

This review also spotted and fixed some typos, not directly in the path of this change but in adjacent sections, which I think are close enough to include here. Thanks!

relu
relu previously approved these changes Nov 2, 2021
Copy link
Member

@relu relu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty clear to me 💯


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].
Copy link
Member

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?

Copy link
Member Author

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)

Copy link
Member

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.

@squaremo
Copy link
Member

squaremo commented Nov 2, 2021

(It is not at all obvious which controller owns the documentation at this URL)

That's because it's API documentation -- no controller owns this documentation. I hesitated to refer to the flag here at all, because advice on how to run the controller really belongs elsewhere (but an elsewhere that doesn't exist, at present).

@squaremo
Copy link
Member

squaremo commented Nov 2, 2021

Please keep the commit message subject to 50 characters -- see https://github.com/fluxcd/.github/blob/main/CONTRIBUTING.md#format-of-the-commit-message

@stefanprodan
Copy link
Member

I think the patch example should be in the guide not here in the API docs.

@kingdonb
Copy link
Member Author

kingdonb commented Nov 2, 2021

I'll implement these changes and come back, thank you

@@ -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
Copy link
Contributor

@darkowlzz darkowlzz Nov 3, 2021

Choose a reason for hiding this comment

The 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 make manifests to update the same in the CRD spec in config/crd/bases/image.toolkit.fluxcd.io_imagerepositories.yaml?

Copy link
Member Author

Choose a reason for hiding this comment

The 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 👍

@solms
Copy link

solms commented Nov 30, 2021

Not sure how much value this adds, but just to let you know that I am a (new) Flux user who spent way too much time trying to figure out how to use the --aws-autologin-for-ecr, and this PR finally cleared it up and sorted me out :)

So +1 to new users being lost in this section and thanks @kingdonb for putting this out there!

Kingdon Barrett and others added 5 commits December 16, 2021 13:52
Signed-off-by: Kingdon Barrett <kingdon@weave.works>
I noticed that some links might not be good, and all of the new links
added in this PR were not following the convention of link targets in
the footer. Correct those issues.

Signed-off-by: Kingdon Barrett <kingdon@weave.works>
Signed-off-by: Kingdon Barrett <kingdon@weave.works>
Signed-off-by: Kingdon Barrett <kingdon@weave.works>
@stefanprodan stefanprodan requested a review from relu January 7, 2022 09:12
@stefanprodan stefanprodan dismissed relu’s stale review January 7, 2022 09:13

I don't think API docs should refer to flux bootstrap


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].
Copy link
Member

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.

@kingdonb
Copy link
Member Author

kingdonb commented Jan 14, 2022

I am going to close this and reopen based on the current WIP in fluxcd/website#702

There are still maybe some valuable additions in here that have not been covered there already. For the most part, this PR is superseded by that one.

@kingdonb kingdonb closed this Jan 14, 2022
kingdonb pushed a commit to kingdonb/image-reflector-controller that referenced this pull request Jan 14, 2022
When fluxcd/website#702 merges, this patch will
have been incorporated into the Image Update Guide. Add a link to the
more directly relevant Image Update Guide here instead, since it has the
example, and it doesn't belong in the API docs nor need to be repeated
here, per the discussion from the earlier PR number fluxcd#193.

Signed-off-by: Kingdon Barrett <kingdon@weave.works>
@kingdonb kingdonb deleted the explain-autologin-for-ecr branch January 14, 2022 16:34
kingdonb pushed a commit to kingdonb/image-reflector-controller that referenced this pull request Jan 27, 2022
Squashed commits:

follow the convention of using footer-style links

I noticed that some links might not be good, and all of the new links
added in this PR were not following the convention of link targets in
the footer. Correct those issues.

Signed-off-by: Kingdon Barrett <kingdon@weave.works>

Update docs/spec/v1beta1/imagerepositories.md

Signed-off-by: Kingdon Barrett <kingdon@weave.works>

update docs

Signed-off-by: Kingdon Barrett <kingdon@weave.works>

Link to the Image Update guide

When fluxcd/website#702 merges, this patch will
have been incorporated into the Image Update Guide. Add a link to the
more directly relevant Image Update Guide here instead, since it has the
example, and it doesn't belong in the API docs nor need to be repeated
here, per the discussion from the earlier PR number fluxcd#193.

Signed-off-by: Kingdon Barrett <kingdon@weave.works>

remove orphaned link URLs

Signed-off-by: Kingdon Barrett <kingdon@weave.works>
kingdonb pushed a commit to kingdonb/image-reflector-controller that referenced this pull request Jan 27, 2022
Link to the Image Update guide

When fluxcd/website#702 merges, this patch will
have been incorporated into the Image Update Guide. Add a link to the
more directly relevant Image Update Guide here instead, since it has the
example, and it doesn't belong in the API docs nor need to be repeated
here, per the discussion from the earlier PR number fluxcd#193.

Signed-off-by: Kingdon Barrett <kingdon@weave.works>

remove orphaned link URLs

Signed-off-by: Kingdon Barrett <kingdon@weave.works>
Signed-off-by: Kingdon Barrett <yebyen@gmail.com>
kingdonb pushed a commit to kingdonb/image-reflector-controller that referenced this pull request Jan 27, 2022
Link to the Image Update guide

When fluxcd/website#702 merges, this patch will
have been incorporated into the Image Update Guide. Add a link to the
more directly relevant Image Update Guide here instead, since it has the
example, and it doesn't belong in the API docs nor need to be repeated
here, per the discussion from the earlier PR number fluxcd#193.

Signed-off-by: Kingdon Barrett <kingdon@weave.works>

remove orphaned link URLs

Signed-off-by: Kingdon Barrett <kingdon@weave.works>
Signed-off-by: Kingdon Barrett <yebyen@gmail.com>
kingdonb pushed a commit to kingdonb/image-reflector-controller that referenced this pull request Jan 31, 2022
Link to the Image Update guide

When fluxcd/website#702 merges, this patch will
have been incorporated into the Image Update Guide. Add a link to the
more directly relevant Image Update Guide here instead, since it has the
example, and it doesn't belong in the API docs nor need to be repeated
here, per the discussion from the earlier PR number fluxcd#193.

Signed-off-by: Kingdon Barrett <kingdon@weave.works>

remove orphaned link URLs

Signed-off-by: Kingdon Barrett <kingdon@weave.works>
Signed-off-by: Kingdon Barrett <yebyen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image Repositories
7 participants