Skip to content
This repository was archived by the owner on Feb 5, 2020. It is now read-only.

Conversation

@enxebre
Copy link
Contributor

@enxebre enxebre commented Oct 17, 2017

No description provided.

@coreosbot
Copy link

Can one of the admins verify this patch?

1 similar comment
@coreosbot
Copy link

Can one of the admins verify this patch?

Copy link
Contributor

@squat squat 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 over all. I have some questions about consistent naming of resources.


resource "google_compute_instance_template" "tectonic-master-it" {
name = "tectonic-master-it"
name = "${var.cluster_name}-tectonic-master-it"
Copy link
Contributor

Choose a reason for hiding this comment

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

consider removing -tectonic from the name. none of the other names use it.

count = "${var.instance_count}"
target_size = 1
name = "tectonic-master-igm-${count.index}"
name = "${var.cluster_name}-tectonic-master-igm-${count.index}"
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above.

resource "google_compute_firewall" "master-ingress-flannel" {
name = "master-ingress-flannel"
name = "${var.cluster_name}-master-ingress-flannel"
network = "${google_compute_network.tectonic-network.name}"
Copy link
Contributor

Choose a reason for hiding this comment

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

we should ensure we only create this resource on clusters that actually use Flannel networking.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We'll probably move to use routes and kubenet, will handle this in a follow up networking specific PR

@@ -1,31 +1,43 @@
resource "google_compute_target_pool" "tectonic-master-targetpool" {
name = "tectonic-master-targetpool"
name = "${var.cluster_name}-tectonic-master-targetpool"
Copy link
Contributor

Choose a reason for hiding this comment

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

remove -tectonic from the name for consistency with the other resources and other providers, e.g. https://github.com/coreos/tectonic-installer/blob/master/modules/aws/master-asg/master.tf


resource "google_compute_target_pool" "tectonic-worker-targetpool" {
name = "tectonic-worker-targetpool"
name = "${var.cluster_name}-tectonic-worker-targetpool"
Copy link
Contributor

Choose a reason for hiding this comment

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

same for this whole file

## A single GCP network
resource "google_compute_network" "tectonic-network" {
name = "tectonic-network"
name = "${var.cluster_name}-tectonic-network"
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above for this whole file


resource "google_compute_instance_template" "tectonic-worker-it" {
name = "tectonic-worker-it"
name = "${var.cluster_name}-tectonic-worker-it"
Copy link
Contributor

Choose a reason for hiding this comment

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

same for this whole file

limitations under the License.
*/
locals {
etcd_count = "${var.tectonic_experimental ? 0 : max(var.tectonic_etcd_count, 1)}"
Copy link
Contributor

Choose a reason for hiding this comment

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

this is only used once; is it worth creating this local expression? maybe

@enxebre enxebre force-pushed the namespacing branch 2 times, most recently from 4aaafe8 to cedd937 Compare October 20, 2017 12:28
@enxebre
Copy link
Contributor Author

enxebre commented Oct 20, 2017

Thanks for having a look @squat, removed 'tectonic' from naming for consistency and pointless 'local'

@squat
Copy link
Contributor

squat commented Oct 20, 2017

ok to test

@squat squat merged commit 11332b9 into coreos:master Oct 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants