Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Migrate TLS generation into the k8s-tiller module #27

Merged
merged 9 commits into from
May 6, 2019

Conversation

yorinasub17
Copy link
Contributor

This merges into #26

Once I started to use the new version in EKS, it turned into a mess as I had a lot of copy pasting to do, and the kubergrunt calls were messy to control. As I copied into both the EKS example AND the reference architecture, I couldn't help but wonder if the TLS generation should just be handled in the k8s-tiller module. I think it makes sense, given that we force the usage of TLS in there.

The downside of this approach is that the k8s-tiller implementation is now complex given the conditionals spread across an inner module call, and the kubernetes authentication methods. For example, take a look at the conditional logic used to decide which authentication parameters to pass into kubectl and kubergrunt.

Nevertheless from a UX perspective, I think this is the right approach.

Note that I opted not to pull in the client granting and waiting for tiller. I think both those features make sense to leave out of the module for better flexibility. E.g you might want to use the provider to generate the Tiller TLS certs, but rely on kubergrunt for granting and configuring because you plan on running those outside of terraform.

EOF

# TODO: When package-terraform-utilities is available, replace
esc_newl = "\\"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

NOTE: I already have approval to open package-terraform-utilities up. I have a PR that does the license change and such, so will update this once that is merged.

@yorinasub17 yorinasub17 requested a review from rileykarson May 3, 2019 15:53
@yorinasub17
Copy link
Contributor Author

UPDATES:

  • Use package-terraform-utilities, which is now public to have better error messages for missing expected executables and escape newlines in a platform aware way.
  • Add a regression test to make sure the root example still works even if kubergrunt is not installed.

@yorinasub17
Copy link
Contributor Author

NOTE: gruntwork-io/kubergrunt#47 is required for this implementation to work.

@yorinasub17
Copy link
Contributor Author

Going to merge this into the feature branch so the entire changeset is one.

@yorinasub17 yorinasub17 merged commit b9bc5ce into yori-tf-tls-mgmt May 6, 2019
@yorinasub17 yorinasub17 deleted the yori-k8s-tiller-tls-module branch May 6, 2019 20:59
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.

2 participants