Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ WORKDIR /viya4-iac-gcp
COPY --from=terraform /bin/terraform /bin/terraform
COPY . .

RUN apt-get install -y jq \
RUN apt-get update && apt-get upgrade -y \
&& apt-get install -y jq \
&& curl -sLO https://storage.googleapis.com/kubernetes-release/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl \
&& chmod 755 ./kubectl /viya4-iac-gcp/docker-entrypoint.sh \
&& mv ./kubectl /usr/local/bin/kubectl \
Expand Down
12 changes: 12 additions & 0 deletions docs/CONFIG-VARS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Supported configuration variables are listed in the table below. All variables
- [For `storage_type=ha` only (Google Filestore)](#for-storage_typeha-only-google-filestore)
- [Google Container Registry (GCR)](#google-container-registry-gcr)
- [Postgres Servers](#postgres-servers)
- [Monitoring](#monitoring)

Terraform input variables can be set in the following ways:
- Individually, with the [-var command line option](https://www.terraform.io/docs/configuration/variables.html#variables-on-the-command-line).
Expand Down Expand Up @@ -293,3 +294,14 @@ postgres_servers = {
}
}
```

## Monitoring

| Name | Description | Type | Default | Notes |
| :--- | ---: | ---: | ---: | ---: |
| create_gke_monitoring_service | Enable GKE metrics from pods in the cluster to the Google Cloud Monitoring API | boolean | false | |
| gke_monitoring_service | Value of the Google Cloud Monitoring API to use if monitoring is enabled. Values are: monitoring.googleapis.com, monitoring.googleapis.com/kubernetes, none | string | "none" | |
| gke_monitoring_enabled_components | List of services to monitor: SYSTEM_COMPONENTS, WORKLOADS (WORKLOADS deprecated in 1.24). | list of strings | ["SYSTEM_COMPONENTS"] | |
| enable_managed_prometheus | Enable Google Cloud [Managed Service for Prometheus](https://cloud.google.com/stackdriver/docs/managed-prometheus) for your cluster | boolean | false | |

Note: For additional details about Google Kubernetes Engine (GKE) integration with Cloud Logging and Cloud Monitoring, including Google Cloud [Managed Service for Prometheus](https://cloud.google.com/stackdriver/docs/managed-prometheus), view the ["Overview of Google Cloud's operations suite for GKE" documentation](https://cloud.google.com/stackdriver/docs/solutions/gke)
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ module "gke" {
grant_registry_access = var.enable_registry_access

monitoring_service = var.create_gke_monitoring_service ? var.gke_monitoring_service : "none"
monitoring_enabled_components = var.create_gke_monitoring_service ? var.gke_monitoring_enabled_components : []

monitoring_enable_managed_prometheus = var.enable_managed_prometheus

cluster_autoscaling = var.enable_cluster_autoscaling ? {
enabled : true,
Expand Down
14 changes: 13 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ variable "enable_registry_access" {
default = true
}

# Azure Monitor
# GKE Monitoring
variable "create_gke_monitoring_service" {
type = bool
description = "Enable GKE metrics from pods in the cluster to the Google Cloud Monitoring API."
Expand All @@ -389,6 +389,18 @@ variable "gke_monitoring_service" {
default = "none"
}

variable "gke_monitoring_enabled_components" {
type = list(string)
description = "List of services to monitor: SYSTEM_COMPONENTS, WORKLOADS (WORKLOADS deprecated in 1.24)."
default = ["SYSTEM_COMPONENTS"]
}

variable "enable_managed_prometheus" {
type = bool
description = "Enable Google Cloud Managed Service for Prometheus for your cluster"
default = false
}

# Network
variable "vpc_name" {
type = string
Expand Down