generated from clouddrove/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: added filebeat addon * fix- fixed tfcheck * fix- fixed tfchecks * fix: formated code * fix- added filebeat addon path for readme * fix- renamed secondary range * fix- added description in outputs * fix- updated addons readme
- Loading branch information
1 parent
525e254
commit e7cedcf
Showing
19 changed files
with
633 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
provider "google" { | ||
project = local.gcp_project_id | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
## Node affinity for particular node in which labels key is "Infra-Services" and value is "true" | ||
daemonset: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: "cloud.google.com/gke-nodepool" | ||
operator: In | ||
values: | ||
- "critical" | ||
## Using limits and requests | ||
resources: | ||
limits: | ||
cpu: "300m" | ||
memory: "200Mi" | ||
requests: | ||
cpu: 100m | ||
memory: 100Mi | ||
# Include the daemonset | ||
enabled: true | ||
extraEnvs: | ||
- name: "ELASTICSEARCH_USERNAME" | ||
valueFrom: | ||
secretKeyRef: | ||
name: elasticsearch-master-credentials | ||
key: username | ||
- name: "ELASTICSEARCH_PASSWORD" | ||
valueFrom: | ||
secretKeyRef: | ||
name: elasticsearch-master-credentials | ||
key: password | ||
# Allows you to add any config files in /usr/share/filebeat | ||
# such as filebeat.yml for daemonset | ||
filebeatConfig: | ||
filebeat.yml: | | ||
filebeat.inputs: | ||
- type: container | ||
paths: | ||
- /var/log/containers/*.log | ||
processors: | ||
- add_kubernetes_metadata: | ||
host: ${NODE_NAME} | ||
matchers: | ||
- logs_path: | ||
logs_path: "/var/log/containers/" | ||
output.elasticsearch: | ||
host: '${NODE_NAME}' | ||
hosts: '["https://${ELASTICSEARCH_HOSTS:elasticsearch-master:9200}"]' | ||
username: '${ELASTICSEARCH_USERNAME}' | ||
password: '${ELASTICSEARCH_PASSWORD}' | ||
protocol: https | ||
ssl.certificate_authorities: ["/usr/share/filebeat/certs/ca.crt"] | ||
# A list of secrets and their paths to mount inside the pod | ||
# This is useful for mounting certificates for security other sensitive values | ||
secretMounts: | ||
- name: elasticsearch-master-certs | ||
secretName: elasticsearch-master-certs | ||
path: /usr/share/filebeat/certs/ | ||
|
||
deployment: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: "cloud.google.com/gke-nodepool" | ||
operator: In | ||
values: | ||
- "critical" | ||
|
||
## Using limits and requests | ||
resources: | ||
limits: | ||
cpu: "300m" | ||
memory: "200Mi" | ||
requests: | ||
cpu: 100m | ||
memory: 100Mi | ||
|
||
extraEnvs: | ||
- name: "ELASTICSEARCH_USERNAME" | ||
valueFrom: | ||
secretKeyRef: | ||
name: elasticsearch-master-credentials | ||
key: username | ||
- name: "ELASTICSEARCH_PASSWORD" | ||
valueFrom: | ||
secretKeyRef: | ||
name: elasticsearch-master-credentials | ||
key: password | ||
# such as filebeat.yml for deployment | ||
filebeatConfig: | ||
filebeat.yml: | | ||
filebeat.inputs: | ||
- type: log | ||
paths: | ||
- /usr/share/filebeat/logs/filebeat | ||
output.elasticsearch: | ||
host: "${NODE_NAME}" | ||
hosts: '["https://${ELASTICSEARCH_HOSTS:elasticsearch-master:9200}"]' | ||
username: "${ELASTICSEARCH_USERNAME}" | ||
password: "${ELASTICSEARCH_PASSWORD}" | ||
protocol: https | ||
ssl.certificate_authorities: ["/usr/share/filebeat/certs/ca.crt"] | ||
# A list of secrets and their paths to mount inside the pod | ||
# This is useful for mounting certificates for security other sensitive values | ||
secretMounts: | ||
- name: elasticsearch-master-certs | ||
secretName: elasticsearch-master-certs | ||
path: /usr/share/filebeat/certs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Filebeat Helm Chart | ||
|
||
Filebeat helps you keep the simple things simple by offering a lightweight way to forward and centralize logs and files. | ||
|
||
## Installation | ||
Below terraform script shows how to use Filebeat Terraform Addon, A complete example is also given [here](https://github.com/clouddrove/terraform-google-gke-addons/blob/master/_examples/complete/main.tf). | ||
|
||
```hcl | ||
module "addons" { | ||
source = "git::https://github.dev/clouddrove/terraform-google-gke-addons" | ||
depends_on = [module.gke] | ||
gke_cluster_name = module.gke.name | ||
project_id = local.gcp_project_id | ||
region = local.region | ||
filebeat = true | ||
} | ||
``` | ||
|
||
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
|
||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
Oops, something went wrong.