Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
Return Prometheus deployment to be a worker workload
Browse files Browse the repository at this point in the history
* Expose etcd metrics to workers so Prometheus can
run on a worker, rather than a controller
* Drop temporary firewall rules allowing Prometheus
to run on a controller and scrape targes
* Related to poseidon/typhoon#175
  • Loading branch information
dghubble committed Apr 8, 2018
1 parent e5495da commit 5e8b148
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions security.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ resource "aws_security_group_rule" "controller-etcd" {
self = true
}

resource "aws_security_group_rule" "controller-etcd-metrics" {
security_group_id = "${aws_security_group.controller.id}"

type = "ingress"
protocol = "tcp"
from_port = 2381
to_port = 2381
source_security_group_id = "${aws_security_group.worker.id}"
}

resource "aws_security_group_rule" "controller-flannel" {
security_group_id = "${aws_security_group.controller.id}"

Expand Down Expand Up @@ -81,16 +91,6 @@ resource "aws_security_group_rule" "controller-node-exporter" {
source_security_group_id = "${aws_security_group.worker.id}"
}

resource "aws_security_group_rule" "controller-node-exporter-self" {
security_group_id = "${aws_security_group.controller.id}"

type = "ingress"
protocol = "tcp"
from_port = 9100
to_port = 9100
self = true
}

resource "aws_security_group_rule" "controller-kubelet-self" {
security_group_id = "${aws_security_group.controller.id}"

Expand Down Expand Up @@ -266,16 +266,6 @@ resource "aws_security_group_rule" "worker-flannel-self" {
resource "aws_security_group_rule" "worker-node-exporter" {
security_group_id = "${aws_security_group.worker.id}"

type = "ingress"
protocol = "tcp"
from_port = 9100
to_port = 9100
source_security_group_id = "${aws_security_group.controller.id}"
}

resource "aws_security_group_rule" "worker-node-exporter-self" {
security_group_id = "${aws_security_group.worker.id}"

type = "ingress"
protocol = "tcp"
from_port = 9100
Expand Down

0 comments on commit 5e8b148

Please sign in to comment.