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

Commit

Permalink
rename healthcheck to sidecar (#1)
Browse files Browse the repository at this point in the history
* rename healthcheck to sidecar

Changed references to healthcheck to sidecar

* Formatting

* Update IAM Permissions

Adding the correct IAM permissions for some of the checks in our sidecar
  • Loading branch information
tfhartmann authored and hakamadare committed Mar 6, 2018
1 parent 9199011 commit ccc6254
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ This module
- `consul_image` - Image to use when deploying consul, defaults to the hashicorp consul image
- `consul_memory_reservation` - The soft limit (in MiB) of memory to reserve for the container, (defaults 32)
- `definitions` - List of Consul Service and Health Check Definitions
- `healthcheck_image` - Image to use when deploying health check agent, defaults to fitnesskeeper/consul-healthchecks:latest image
- `healthcheck_memory_reservation` - The soft limit (in MiB) of memory to reserve for the container, defaults 32
- `sidecar_image` - Image to use when deploying health check agent, defaults to fitnesskeeper/consul-sidecar:latest image
- `sidecar_memory_reservation` - The soft limit (in MiB) of memory to reserve for the container, defaults 32
- `iam_path` - IAM path, this is useful when creating resources with the same name across multiple regions. (Defaults to /)
- `registrator_image` - Image to use when deploying registrator agent, defaults to the gliderlabs registrator:latest image
- `registrator_memory_reservation` The soft limit (in MiB) of memory to reserve for the container, defaults 32
Expand Down
8 changes: 6 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ data "template_file" "consul" {
definitions = "${join(" ", var.definitions)}"
image = "${var.consul_image}"
registrator_image = "${var.registrator_image}"
healthcheck_image = "${var.healthcheck_image}"
sidecar_image = "${var.sidecar_image}"
consul_memory_reservation = "${var.consul_memory_reservation}"
registrator_memory_reservation = "${var.registrator_memory_reservation}"
healthcheck_memory_reservation = "${var.healthcheck_memory_reservation}"
sidecar_memory_reservation = "${var.sidecar_memory_reservation}"
awslogs_group = "consul-agent-${var.ecs_cluster}"
awslogs_stream_prefix = "consul-agent-${var.ecs_cluster}"
awslogs_region = "${data.aws_region.current.name}"
Expand All @@ -31,6 +31,10 @@ data "aws_iam_policy_document" "consul_task_policy" {
actions = [
"ec2:Describe*",
"autoscaling:Describe*",
"cloudwatch:PutMetricData",
"ecs:DescribeClusters",
"ecs:UpdateContainerInstancesState",
"ecs:DescribeContainerInstances",
]

resources = ["*"]
Expand Down
8 changes: 4 additions & 4 deletions templates/consul.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"volumesFrom": [
{
"sourceContainer": "consul-healthchecks-${env}"
"sourceContainer": "consul-sidecar-${env}"
}
],
"portMappings": [
Expand All @@ -38,11 +38,11 @@
}
},
{
"name": "consul-healthchecks-${env}",
"image": "${healthcheck_image}",
"name": "consul-sidecar-${env}",
"image": "${sidecar_image}",
"essential": true,
"cpu": 0,
"memoryReservation": ${healthcheck_memory_reservation},
"memoryReservation": ${sidecar_memory_reservation},
"environment": [
{
"name": "CHECKS",
Expand Down
8 changes: 4 additions & 4 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ variable "ecs_cluster" {
description = "EC2 Container Service cluster in which the service will be deployed (must already exist, the module will not create it)."
}

variable "healthcheck_image" {
default = "fitnesskeeper/consul-healthchecks"
description = "Image to use when deploying health check agent, defaults to fitnesskeeper/consul-healthchecks:latest image"
variable "sidecar_image" {
default = "fitnesskeeper/consul-sidecar"
description = "Image to use when deploying health check agent, defaults to fitnesskeeper/consul-sidecar:latest image"
}

variable "healthcheck_memory_reservation" {
variable "sidecar_memory_reservation" {
description = "The soft limit (in MiB) of memory to reserve for the container, defaults 32"
default = "32"
}
Expand Down

0 comments on commit ccc6254

Please sign in to comment.