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

[PE1-1809] Support Function Associations for ingress-based behaviors #105

Merged
merged 7 commits into from
Oct 17, 2023

Conversation

LCaparelli
Copy link
Member

@LCaparelli LCaparelli commented Oct 10, 2023

Description

  • $TITLE
  • deprecate viewer function arn annotation in favor of more flexible function associations annotation

TODO in upcoming PRs:

Motivation and Context

This allows users to specify both Cloudfront Functions and Lambda@Edge Functions that should be associated with behaviors present in the distribution.

How has this been tested?

Created, updated and deleted functions from a Distribution based on multiple Ingresses.

Checklist

  • I have implemented automated tests for the changes.
  • I have updated the documentation accordingly.

@LCaparelli
Copy link
Member Author

LCaparelli commented Oct 10, 2023

Sorry for the longest PR in history @caiofralmeida, next ones should be much shorter as they will share much of the logic introduced here 🙇

Each commit is more-or-less digestible and local, so I'd suggest checking one at a time.

::warning
  file=internal/k8s/function_association.go,line=232,col=2::
  if-return: redundant if ...; err != nil check,
  just return error instead. (revive)
::error file=internal/cloudfront/origin.go,line=76,col=2::
  field `viewerFnARN` is unused (unused)
::error file=internal/k8s/ingress.go,line=122,col=2::
  S1011: should replace loop with
  `paths = append(paths, sp.paths[ing]...)` (gosimple)

Signed-off-by: Lucas Caparelli <[email protected]>
@LCaparelli LCaparelli merged commit 2b9c5e9 into develop Oct 17, 2023
3 checks passed
@LCaparelli LCaparelli deleted the PE1-1809/function-associations branch October 17, 2023 14:23
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.

2 participants