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

Add CloudFront CachePolicy managed resource #783

Merged
merged 2 commits into from
Oct 1, 2021

Conversation

ulucinar
Copy link
Collaborator

@ulucinar ulucinar commented Jul 28, 2021

Description of your changes

This PR adds a new managed resource for the CloudFront CachePolicy API.

Depends on #782. We need to merge it first.

Fixes #236

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.
  • Add tests for cloudfront.IsUpToDate

How has this code been tested

I've manually tested provisioning a CloudFront CachePolicy resource/editing various fields of it/deleting it using this PR and using this PR on top of #782.

@ulucinar
Copy link
Collaborator Author

ulucinar commented Jul 29, 2021

After some initial consideration on how to implement a referencing mechanism for CachePolicies in a Distribution's DefaultCacheBehavior or other (non-default) CacheBehaviors, I have raised the following feature request for ACK code-generator (if not already implemented):
aws-controllers-k8s/community#881

According to my investigation, it seems not possible atm.

Because CloudFront support is still a v1alpha1 API, as I explained in the above feature request, I'm planning to introduce an index field, which will bind a reference (either a name or a label selector or a CachePolicy ID) to a specific CacheBehavior in the cacheBehaviors array of a Distribution. And it makes sense to introduce a separate set of referencer fields for the DefaultCacheBehavior (it's also explicitly defined in Distribution, outside the cacheBehaviors array).

As also discussed in the above feature request as an alternative, we may also, for instance, ignore the cacheBehaviors field in the associated generator-config.yaml, but I would not like to maintain the complex CacheBehavior type.

@AaronME AaronME self-requested a review August 12, 2021 01:34
@AaronME AaronME added the size/M label Aug 12, 2021
- Remove deprecated initializer from Distribution resource

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
@AaronME AaronME self-assigned this Sep 24, 2021
Copy link
Collaborator

@AaronME AaronME left a comment

Choose a reason for hiding this comment

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

Thanks, @ulucinar!

This LGTM.

@AaronME AaronME merged commit 0ffd242 into crossplane-contrib:master Oct 1, 2021
@ulucinar ulucinar deleted the aru/fix-236-cachepolicy branch October 4, 2021 00:15
tektondeploy pushed a commit to gtn3010/provider-aws that referenced this pull request Mar 12, 2024
[provider-aws]: Add & test example manifests for various resources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add CloudFront as a managed resource
2 participants