Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Add TransparentProxy to Service and ProxyDefaults #914

Merged
merged 1 commit into from
Apr 22, 2021

Conversation

thisisnotashwin
Copy link

@thisisnotashwin thisisnotashwin commented Apr 15, 2021

Changes proposed in this PR:

  • Add TransparentProxy to ServiceDefaults and ProxyDefaults
  • Only support v1 version of Mutating Webhook

How I've tested this PR: Acceptance tests passed.

How I expect reviewers to test this PR: Code Review

Checklist:

  • Bats tests added
  • CHANGELOG entry added (HashiCorp engineers only, community PRs should not add a changelog entry)

@thisisnotashwin thisisnotashwin changed the base branch from master to feature-tproxy April 15, 2021 13:53
@thisisnotashwin thisisnotashwin force-pushed the cluster-resource branch 3 times, most recently from 57a6869 to 962c3f2 Compare April 15, 2021 20:32
Base automatically changed from feature-tproxy to master April 16, 2021 03:31
@thisisnotashwin thisisnotashwin force-pushed the cluster-resource branch 8 times, most recently from 88bbff9 to 8e33469 Compare April 20, 2021 21:56
@thisisnotashwin thisisnotashwin changed the title Add Cluster resource Add TransparentProxy to Service and ProxyDefaults Apr 20, 2021
@thisisnotashwin thisisnotashwin marked this pull request as ready for review April 22, 2021 14:37
@thisisnotashwin thisisnotashwin requested review from kschoche, a team and ishustava and removed request for a team April 22, 2021 14:40
Copy link
Contributor

@ishustava ishustava left a comment

Choose a reason for hiding this comment

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

Looks great, Ashwin! One comment about our spec description, but won't block the approval.

Comment on lines +92 to +98
transparentProxy:
description: TransparentProxy controls configuration specific to proxies in transparent mode.
properties:
outboundListenerPort:
description: The port of the listener where outbound application traffic is being redirected to.
type: integer
type: object
Copy link
Contributor

Choose a reason for hiding this comment

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

wondering if our docs should say that we don't support these?

Copy link
Author

Choose a reason for hiding this comment

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

It doesnt say it in the docs but we do have a webhook that rejects any CRD that has this set with an error message that says: Please you annotation `
I went back and forth on this a little bit and decided to only use the webhook because I figured it would be confusing for the docs to say that it wasn't supported. Do you think it makes sense to also have it in the docs?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm yeah, I can see that. Let's keep it as is then.

Copy link
Author

Choose a reason for hiding this comment

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

I added this as a part of the commit that adds Mode and UpstreamConfigs to ServiceDefaults. Will update these CRDs as a part of their equivalent helm commit if that is ok?

Comment on lines +7 to +8
github.com/hashicorp/consul/api v1.4.1-0.20210415000851-62fcf1ff17cd
github.com/hashicorp/consul/sdk v0.7.0
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure why this change is needed.

Copy link
Author

Choose a reason for hiding this comment

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

We don't strictly need it for the acceptance tests here, but this ensure the acceptance tests run against a version of Consul that does explicitly support the TransparentProxy field, even though we do not set it or should allow it to be set. It was done more from a correctness perspective.

Copy link
Contributor

Choose a reason for hiding this comment

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

got it, thanks for clarifying!

Copy link
Contributor

@kschoche kschoche left a comment

Choose a reason for hiding this comment

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

Looks great! Left one comment but I think it's probably okay!

- Update webhook versions to only support v1
@thisisnotashwin thisisnotashwin merged commit 85a238d into master Apr 22, 2021
@thisisnotashwin thisisnotashwin deleted the cluster-resource branch April 22, 2021 20:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants