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

Modify mesh-task and controller #188

Conversation

Ganeshrockz
Copy link
Contributor

@Ganeshrockz Ganeshrockz commented Jul 24, 2023

Changes proposed in this PR:

  • Makes changes for mesh-task and controller modules to align with the consul-dataplane based architecture in ECS.
  • Changed the named of acl-controller module to just controller
  • Removed client agent specific TF resources and tests.
  • Gateway related flows will be changed in the upcoming PRs.
  • HCP related changes will be made in the upcoming PRs. CI will also not test HCP.

How I've tested this PR:

Unit and integration tests.

How I expect reviewers to test this PR:

Checklist:

  • Tests added
  • CHANGELOG entry added (Not needed. Will push this to a non default branch)

@Ganeshrockz Ganeshrockz changed the base branch from main to ganeshrockz/dataplane-arch-changes July 24, 2023 17:50
modules/mesh-task/variables.tf Outdated Show resolved Hide resolved
modules/mesh-task/variables.tf Show resolved Hide resolved
@Ganeshrockz Ganeshrockz marked this pull request as ready for review July 24, 2023 17:57
@Ganeshrockz Ganeshrockz requested review from a team, sarahethompson, alvin-huang, kisunji, cthain and pglass and removed request for a team July 24, 2023 17:57
@kisunji kisunji removed their request for review July 24, 2023 20:35
Copy link
Contributor

@cthain cthain left a comment

Choose a reason for hiding this comment

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

Left my initial comments from a quick pass over the PR. I will review in more detail and review the tests tomorrow.

modules/controller/README.md Outdated Show resolved Hide resolved
type = any
default = {}
description = <<-EOT
This accepts HTTP specific TLS configuration based on the `consulServers.http` schema present in https://github.com/hashicorp/consul-ecs/blob/main/config/schema.json.
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that we release the projects separately as tagged versions, I don't think that we should be pointing to the ECS config schema on main. It may deviate from the versioned file supported by the module. I don't have a good alternative suggestion but I'll try to think through this.

Copy link

Choose a reason for hiding this comment

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

We can link them to the Consul docs: https://developer.hashicorp.com/consul/docs/ecs/configuration-reference, which are at least versioned by Consul versions

Copy link

Choose a reason for hiding this comment

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

Oh, we can use the Git tag (v0.6.0) in place of main. We can even link to the specific line of code containing the field, too. Example:

If we do this, we need to update the release process, and ensure we set this set correctly for each release branch. We'd need to set this to match the default consul_ecs_image version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. I'll keep a note of this

modules/mesh-task/variables.tf Outdated Show resolved Hide resolved
modules/mesh-task/variables.tf Outdated Show resolved Hide resolved
modules/mesh-task/variables.tf Outdated Show resolved Hide resolved
modules/mesh-task/variables.tf Outdated Show resolved Hide resolved
modules/mesh-task/variables.tf Outdated Show resolved Hide resolved
modules/mesh-task/variables.tf Show resolved Hide resolved
@Ganeshrockz Ganeshrockz requested a review from cthain July 27, 2023 03:47
@Ganeshrockz
Copy link
Contributor Author

@cthain / @pglass Can you re-review this PR whenever possible? Thanks 🙇

Copy link

@pglass pglass left a comment

Choose a reason for hiding this comment

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

I have a bunch of small comments on the input variables, but this looks great!

modules/controller/variables.tf Outdated Show resolved Hide resolved
modules/controller/variables.tf Outdated Show resolved Hide resolved
modules/controller/variables.tf Outdated Show resolved Hide resolved
modules/controller/variables.tf Outdated Show resolved Hide resolved
modules/controller/variables.tf Outdated Show resolved Hide resolved
test/acceptance/tests/basic/basic_test.go Show resolved Hide resolved
test/acceptance/tests/basic/basic_test.go Outdated Show resolved Hide resolved
test/acceptance/tests/basic/basic_test.go Outdated Show resolved Hide resolved
test/acceptance/tests/basic/basic_test.go Outdated Show resolved Hide resolved
test/acceptance/tests/basic/basic_test.go Outdated Show resolved Hide resolved
@Ganeshrockz Ganeshrockz requested a review from pglass July 31, 2023 15:34
@Ganeshrockz
Copy link
Contributor Author

@pglass I've addressed almost all the comments except the one that talks about the version. Please re-review it whenever possible. Thanks

Copy link
Contributor

@cthain cthain left a comment

Choose a reason for hiding this comment

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

Awesome job on this @Ganeshrockz! I left a few minor comments/suggestions. Nothing blocking.

modules/controller/README.md Outdated Show resolved Hide resolved
modules/controller/variables.tf Outdated Show resolved Hide resolved
modules/controller/variables.tf Outdated Show resolved Hide resolved
modules/mesh-task/variables.tf Outdated Show resolved Hide resolved
test/acceptance/setup-terraform/main.tf Outdated Show resolved Hide resolved
t.Cleanup(func() {
_, _ = terraform.DestroyE(t, terraformOptions)
})
terraform.InitAndPlan(t, terraformOptions)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be validating the output of the plan? This test only checks that the plan works (which is a good start) but it doesn't verify that the plan matches our expectations.

This is already a huge PR so maybe this can be addressed in a follow up?

Copy link

Choose a reason for hiding this comment

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

Most of the validation tests here were just moved to this new location (which is great 👌). So agreed, but I feel like improvements to the existing validation tests can wait for a follow up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will keep a note of this as well.

@Ganeshrockz Ganeshrockz merged commit cd65577 into ganeshrockz/dataplane-arch-changes Aug 2, 2023
@Ganeshrockz Ganeshrockz deleted the net-4569/mesh-task-acceptance-tests branch August 2, 2023 09:31
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.

3 participants