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

Fix CloudFront Distribution OriginSSL support #922

Merged
merged 2 commits into from
Nov 10, 2021

Conversation

stevendborrelli
Copy link
Contributor

@stevendborrelli stevendborrelli commented Nov 10, 2021

Description of your changes

From #915

Creating a distribution with a custom origin was stuck infinitely reconciling every second. After looking into this, it was due to a naming difference between provider-aws and the aws sdk where for provider-aws the variable was OriginSSLProtocols and for aws-sdk it was OriginSslProtocols.

Fixes #894.

I have:

  • Read and followed Crossplane's [contribution process].
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Tested with the following code from #894

# Distribution will not be deleted unless you mark the distribution disabled via
# spec.distributionConfig.enabled.
apiVersion: cloudfront.aws.crossplane.io/v1alpha1
kind: Distribution
metadata:
  name: example2-distribution
spec:
  forProvider:
    region: us-east-1
    distributionConfig:
      enabled: true
      comment: Example CloudFront Distribution
      origins:
        items:
          - domainName: exampledomain.example.com
            id: example
            originPath: "/helloworld"
            customHeaders:
              items:
                - headerName: "test"
                  headerValue: "test"
              quantity: 1
            customOriginConfig:
              httpPort: 80
              originProtocolPolicy: "http-only"
              originReadTimeout: 10
              originKeepaliveTimeout: 5
              httpSPort: 443
              originSSLProtocols:
                items:
                  - TLSv1
                quantity: 1
      defaultCacheBehavior:
        targetOriginID: example
        viewerProtocolPolicy: allow-all
        minTTL: 0
        forwardedValues:
          cookies:
            forward: none
          queryString: false
  providerConfigRef:
    name: aws-provider

gstramandinoli and others added 2 commits November 10, 2021 18:22
Signed-off-by: gstramandinoli <giuseppe.stramandinoli@vonage.com>
Signed-off-by: Steven Borrelli <steve@borrelli.org>
Copy link
Member

@muvaf muvaf left a comment

Choose a reason for hiding this comment

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

I wasn't aware of that option. Thanks @stevendborrelli !

@muvaf muvaf merged commit bedb2e6 into crossplane-contrib:master Nov 10, 2021
originProtocolPolicy: "http-only"
originReadTimeout: 10
originKeepaliveTimeout: 5
httpSPort: 443
Copy link
Member

Choose a reason for hiding this comment

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

@stevendborrelli is this really with upper "S" httpSPort ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are some case issues in the acc-generator. I am reviewing and will submit a PR to fix.

@negz negz changed the title Fix originssl Fix CloudFront Distribution OriginSSL support Nov 11, 2021
@negz
Copy link
Member

negz commented Nov 11, 2021

/backport

@github-actions
Copy link

Successfully created backport PR #923 for release-0.20.

@github-actions
Copy link

Backport failed for release-0.19, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin release-0.19
git worktree add -d .worktree/backport-922-to-release-0.19 origin/release-0.19
cd .worktree/backport-922-to-release-0.19
git checkout -b backport-922-to-release-0.19
ancref=$(git merge-base 4e81878a6050dbd219c975955a39a7463d0f375b c41d3cfb8fdfcba4fa4ff3cd49a8c06c87059ad6)
git cherry-pick -x $ancref..c41d3cfb8fdfcba4fa4ff3cd49a8c06c87059ad6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CloudFront Distribution Custom Origin Reconciling Loop
6 participants