diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d76b76e..d71c4f2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,21 +1,28 @@ --- repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.4.0 + rev: v4.3.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files - id: check-merge-conflict + - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook - rev: v5.0.0 + rev: v8.0.0 hooks: - id: commitlint stages: [commit-msg] additional_dependencies: ['@commitlint/config-conventional'] + - repo: https://github.com/Yelp/detect-secrets - rev: v1.1.0 + rev: v1.2.0 hooks: - id: detect-secrets args: ['--baseline', '.secrets.baseline'] + + - repo: https://github.com/tfsec/tfsec + rev: v1.26.3 + hooks: + - id: tfsec-system diff --git a/.secrets.baseline b/.secrets.baseline index 28f363c..a2c25cc 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -1,5 +1,5 @@ { - "version": "1.1.0", + "version": "1.2.0", "plugins_used": [ { "name": "ArtifactoryDetector" diff --git a/loki.hcl.tpl b/loki.hcl.tpl deleted file mode 100644 index 6206838..0000000 --- a/loki.hcl.tpl +++ /dev/null @@ -1,46 +0,0 @@ -auth_enabled: false - -server: - http_listen_port: 3100 - grpc_listen_port: 9096 - -common: - path_prefix: /tmp/loki - storage: - filesystem: - chunks_directory: /tmp/loki/chunks - rules_directory: /tmp/loki/rules - replication_factor: 1 - ring: - instance_addr: 127.0.0.1 - kvstore: - store: consul - consul: - host: localhost:8500 - - -schema_config: - configs: - - from: 2020-10-24 - store: boltdb-shipper - object_store: filesystem - schema: v11 - index: - prefix: index_ - period: 24h - -ruler: - alertmanager_url: http://localhost:9093 - -# By default, Loki will send anonymous, but uniquely-identifiable usage and configuration -# analytics to Grafana Labs. These statistics are sent to https://stats.grafana.org/ -# -# Statistics help us better understand how Loki is used, and they show us performance -# levels for most users. This helps us prioritize features and documentation. -# For more information on what's sent, look at -# https://github.com/grafana/loki/blob/main/pkg/usagestats/stats.go -# Refer to the buildReport method to see what goes into a report. -# -# If you would like to disable reporting, uncomment the following lines: -#analytics: -# reporting_enabled: false diff --git a/loki.nomad b/loki.nomad deleted file mode 100644 index 6be4fe7..0000000 --- a/loki.nomad +++ /dev/null @@ -1,140 +0,0 @@ -variable "loki_version" { - type = string - default = "v2.5.0" - description = "Loki release to deploy. See https://github.com/grafana/loki/releases/" -} -job "loki" { - datacenters = ["dc1"] - type = "service" - name = "loki" - // migrate {} - meta { - auto-backup = true - backup-schedule = "@hourly" - backup-target-db = "postgres" - } - update { - max_parallel = 1 - health_check = "checks" - min_healthy_time = "5s" - healthy_deadline = "60s" - progress_deadline = "3m" - auto_revert = true - auto_promote = true - canary = 1 - } - priority = 80 - group "log-server" { - count = 1 - - network { - port "loki_http_listen" { - static = 3100 - } - port "loki_grpc_listen" { - static = 9096 - } - } - service { - name = "loki-http-server" - tags = ["logs", "loki", "observability", "urlprefix-/loki"] - port = "loki_http_listen" - - check { - name = "loki_http_alive" - type = "tcp" - interval = "10s" - timeout = "3s" - } - - check { - name = "loki_http_ready" - type = "http" - path = "/ready" - port = "loki_http_listen" - interval = "10s" - timeout = "3s" - } - } - task "server" { - driver = "raw_exec" - config { - command = "loki" - args = [ - "-config.file=local/loki.yml" - ] - } - resources { - cpu = 128 - memory = 50 - } - template { - // source = "local/loki.yml.tpl" - data = <