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

peering: remove unnecessary expose servers service, add error cases, fix flaky test #1683

Merged
merged 1 commit into from Nov 8, 2022

Conversation

ndhanushkodi
Copy link
Contributor

@ndhanushkodi ndhanushkodi commented Nov 7, 2022

Changes proposed in this PR:

  • Expose servers service is only needed when partitions are enabled, since peering now requires mesh gateways. So this PR makes it so the helm chart doesn't deploy the expose servers service when only peering (and not partitions) is enabled.
  • Fail fast in the helm chart if tls or mesh gateways are not enabled since they are required for peering
  • In acceptance tests- fix flakiness due to mesh configuration not being recognized before the applying the acceptor resource (which generates the token), to ensure that the token is generated with mesh gateway addresses rather than server pod ips.

How I've tested this PR:
acceptance tests, unit tests

How I expect reviewers to test this PR:
👀

Checklist:

  • Tests added
  • CHANGELOG entry added

    HashiCorp engineers only, community PRs should not add a changelog entry.
    Entries should use present tense (e.g. Add support for...)

@ndhanushkodi ndhanushkodi requested review from a team, jmurret and ishustava and removed request for a team November 7, 2022 03:10
@ndhanushkodi ndhanushkodi changed the title peering: remove unnecessary expose servers service, add error cases, fix flaky test peering: remove unnecessary expose servers service, add error cases, fix flaky test, fix ACL issue Nov 8, 2022
@ndhanushkodi ndhanushkodi changed the title peering: remove unnecessary expose servers service, add error cases, fix flaky test, fix ACL issue peering: remove unnecessary expose servers service, add error cases, fix flaky test Nov 8, 2022
Copy link
Member

@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!

CHANGELOG.md Outdated
Comment on lines 15 to 16
* Enabling peering requires `global.tls.enabled`. [[GH-1610](https://github.com/hashicorp/consul-k8s/pull/1610)]
* Enabling peering requires `meshGateway.enabled`. [[GH-1683](https://github.com/hashicorp/consul-k8s/pull/1683)]
Copy link
Member

Choose a reason for hiding this comment

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

nit: could we rephrase to be "verb ..." so "Require global.tls.enabled when peering is enabled" 🙏

CHANGELOG.md Outdated
@@ -34,6 +35,7 @@ IMPROVEMENTS:
* API Gateway: Add `tolerations` to `apiGateway.managedGatewayClass` and `apiGateway.controller` [[GH-1650](https://github.com/hashicorp/consul-k8s/pull/1650)]
* API Gateway: Create PodSecurityPolicy for controller when `global.enablePodSecurityPolicies=true`. [[GH-1656](https://github.com/hashicorp/consul-k8s/pull/1656)]
* API Gateway: Create PodSecurityPolicy and allow controller to bind it to ServiceAccounts that it creates for Gateway Deployments when `global.enablePodSecurityPolicies=true`. [[GH-1672](https://github.com/hashicorp/consul-k8s/pull/1672)]
* Expose servers service is only deployed when Admin Partitions(ENT) is enabled. [[GH-1683](https://github.com/hashicorp/consul-k8s/pull/1683)]
Copy link
Member

@ishustava ishustava Nov 8, 2022

Choose a reason for hiding this comment

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

Same here:

Suggested change
* Expose servers service is only deployed when Admin Partitions(ENT) is enabled. [[GH-1683](https://github.com/hashicorp/consul-k8s/pull/1683)]
* Deploy `expose-servers` service only when Admin Partitions(ENT) is enabled. [[GH-1683](https://github.com/hashicorp/consul-k8s/pull/1683)]

Copy link
Contributor

@jmurret jmurret Nov 8, 2022

Choose a reason for hiding this comment

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

The suggestion above has the word deploy(ed) twice.. NVM, as admin, I could modify someone else's suggestion. 😬

Copy link
Contributor

@jmurret jmurret left a comment

Choose a reason for hiding this comment

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

👍 Looks good! Nice work!

…s are included

remove expose server service when peering is enabled, add more error msgs
@ndhanushkodi ndhanushkodi merged commit e2cd804 into main Nov 8, 2022
@ndhanushkodi ndhanushkodi deleted the nd/peering-improvements branch November 8, 2022 19:25
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.

None yet

3 participants