Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telegraf 배포 #111

Merged
merged 7 commits into from
Feb 4, 2025
Merged

telegraf 배포 #111

merged 7 commits into from
Feb 4, 2025

Conversation

ikjeong
Copy link
Contributor

@ikjeong ikjeong commented Feb 4, 2025

closed #103

@ikjeong ikjeong self-assigned this Feb 4, 2025
@goboolean-io
Copy link
Contributor

Ran Plan for dir: projects/dev workspace: default

Show Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
~ update in-place
- destroy
-/+ destroy and then create replacement
 <= read (data resources)

Terraform will perform the following actions:

  # module.argocd.data.kubernetes_secret.argocd_initial_password will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "kubernetes_secret" "argocd_initial_password" {
      + data      = (sensitive value)
      + id        = (known after apply)
      + immutable = (known after apply)
      + type      = (known after apply)

      + metadata {
          + generation       = (known after apply)
          + name             = "argocd-initial-admin-secret"
          + namespace        = "argocd"
          + resource_version = (known after apply)
          + uid              = (known after apply)
        }
    }

  # module.cloudflare.cloudflare_dns_record.istio-gateway will be updated in-place
~ resource "cloudflare_dns_record" "istio-gateway" {
      + comment             = (known after apply)
      + comment_modified_on = (known after apply)
      ~ content             = "34.47.92.167" -> (known after apply)
      ~ created_on          = "2025-01-28T12:03:24Z" -> (known after apply)
      + data                = (known after apply)
        id                  = "5b3805bf479bd12a29aad2877a6cfdfa"
      ~ meta                = jsonencode(
            {
              - auto_added             = false
              - managed_by_apps        = false
              - managed_by_argo_tunnel = false
            }
        ) -> (known after apply)
      ~ modified_on         = "2025-01-28T12:03:24Z" -> (known after apply)
        name                = "*.goboolean.io"
      ~ proxiable           = true -> (known after apply)
      ~ settings            = {
          + flatten_cname = (known after apply)
          + ipv4_only     = (known after apply)
          + ipv6_only     = (known after apply)
        } -> (known after apply)
        tags                = []
      + tags_modified_on    = (known after apply)
        # (4 unchanged attributes hidden)
    }

  # module.influxdb.helm_release.influxdb must be replaced
-/+ resource "helm_release" "influxdb" {
      ~ id                         = "influxdb" -> (known after apply)
      + manifest                   = (known after apply)
      ~ metadata                   = [
          - {
              - app_version    = "2.7.4"
              - chart          = "influxdb2"
              - first_deployed = 1738643058
              - last_deployed  = 1738643058
              - name           = "influxdb"
              - namespace      = "influxdb"
              - notes          = <<-EOT
                    InfluxDB 2 is deployed as a StatefulSet on your cluster.
                    
                    You can access it by using the service name: influxdb-influxdb2
                    
                    To retrieve the password for the 'admin' user:
                    
                      echo $(kubectl get secret influxdb-influxdb2-auth -o "jsonpath={.data['admin-password']}" --namespace influxdb | base64 --decode)
                    
                    Note: with enabled persistence, admin password is only set once during the initial deployment. The password is not changed when InfluxDB 2 is re-deployed with different password.
                EOT
              - revision       = 1
              - values         = jsonencode(
                    {
                      - adminUser        = {
                          - bucket           = "minimal"
                          - organization     = "goboolean"
                          - password         = "dfjInwr231-SUD83rbn"
                          - retention_policy = "0s"
                          - token            = ""
                          - user             = "admin"
                        }
                      - affinity         = {}
                      - env              = {}
                      - fullnameOverride = ""
                      - image            = {
                          - pullPolicy = "IfNotPresent"
                          - repository = "influxdb"
                          - tag        = "2.7.4-alpine"
                        }
                      - ingress          = {
                          - annotations = {}
                          - enabled     = false
                          - hostname    = "influxdb.foobar.com"
                          - path        = "/"
                          - tls         = false
                        }
                      - initScripts      = {
                          - enabled = false
                          - scripts = {
                              - "init.sh" = <<-EOT
                                    #!/bin/bash
                                    influx apply --force yes -u https://raw.githubusercontent.com/influxdata/community-templates/master/influxdb2_operational_monitoring/influxdb2_operational_monitoring.yml
                                EOT
                            }
                        }
                      - livenessProbe    = {}
                      - nameOverride     = ""
                      - nodeSelector     = {}
                      - pdb              = {
                          - create       = true
                          - minAvailable = 1
                        }
                      - persistence      = {
                          - accessMode = "ReadWriteOnce"
                          - enabled    = true
                          - mountPath  = "/var/lib/influxdb2"
                          - size       = "50Gi"
                          - subPath    = ""
                        }
                      - podAnnotations   = {}
                      - podLabels        = {}
                      - readinessProbe   = {}
                      - resources        = {}
                      - securityContext  = {}
                      - service          = {
                          - annotations = {}
                          - labels      = {}
                          - port        = 80
                          - portName    = "http"
                          - targetPort  = 8086
                          - type        = "ClusterIP"
                        }
                      - serviceAccount   = {
                          - annotations = {}
                          - create      = true
                          - name        = null
                        }
                      - startupProbe     = {
                          - enabled = false
                        }
                      - tolerations      = []
                    }
                )
              - version        = "2.1.2"
            },
        ] -> (known after apply)
        name                       = "influxdb"
      ~ namespace                  = "influxdb" -> "influxdata" # forces replacement
        # (26 unchanged attributes hidden)
    }

  # module.istio.data.kubernetes_service.istio_ingressgateway will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "kubernetes_service" "istio_ingressgateway" {
      + id     = (known after apply)
      + spec   = (known after apply)
      + status = (known after apply)

      + metadata {
          + generation       = (known after apply)
          + name             = "istio-ingressgateway"
          + namespace        = "istio-system"
          + resource_version = (known after apply)
          + uid              = (known after apply)
        }
    }

  # module.namespace.kubernetes_namespace.influxdata will be created
+ resource "kubernetes_namespace" "influxdata" {
      + id                               = (known after apply)
      + wait_for_default_service_account = false

      + metadata {
          + generation       = (known after apply)
          + name             = "influxdata"
          + resource_version = (known after apply)
          + uid              = (known after apply)
        }
    }

  # module.namespace.kubernetes_namespace.influxdb will be destroyed
  # (because kubernetes_namespace.influxdb is not in configuration)
- resource "kubernetes_namespace" "influxdb" {
      - id                               = "influxdb" -> null
      - wait_for_default_service_account = false -> null

      - metadata {
          - generation       = 0 -> null
          - name             = "influxdb" -> null
          - resource_version = "8361432" -> null
          - uid              = "eff2dbb3-3ed6-4e12-babb-8631563f18e4" -> null
            # (1 unchanged attribute hidden)
        }
    }

Plan: 2 to add, 1 to change, 2 to destroy.
Releasing state lock. This may take a few moments...
  • ▶️ To apply this plan, comment:
    • atlantis apply -d projects/dev
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d projects/dev
Plan: 2 to add, 1 to change, 2 to destroy.
  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@goboolean-io
Copy link
Contributor

Ran Plan for dir: projects/dev workspace: default

Show Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place

Terraform will perform the following actions:

  # module.influxdb.helm_release.influxdb will be updated in-place
~ resource "helm_release" "influxdb" {
        id                         = "influxdb"
      ~ metadata                   = [
          - {
              - app_version    = "2.7.4"
              - chart          = "influxdb2"
              - first_deployed = 1738644251
              - last_deployed  = 1738644251
              - name           = "influxdb"
              - namespace      = "influxdata"
              - notes          = <<-EOT
                    InfluxDB 2 is deployed as a StatefulSet on your cluster.
                    
                    You can access it by using the service name: influxdb-influxdb2
                    
                    To retrieve the password for the 'admin' user:
                    
                      echo $(kubectl get secret influxdb-influxdb2-auth -o "jsonpath={.data['admin-password']}" --namespace influxdata | base64 --decode)
                    
                    Note: with enabled persistence, admin password is only set once during the initial deployment. The password is not changed when InfluxDB 2 is re-deployed with different password.
                EOT
              - revision       = 1
              - values         = jsonencode(
                    {
                      - adminUser        = {
                          - bucket           = "minimal"
                          - organization     = "goboolean"
                          - password         = "dfjInwr231-SUD83rbn"
                          - retention_policy = "0s"
                          - token            = ""
                          - user             = "admin"
                        }
                      - affinity         = {}
                      - env              = {}
                      - fullnameOverride = ""
                      - image            = {
                          - pullPolicy = "IfNotPresent"
                          - repository = "influxdb"
                          - tag        = "2.7.4-alpine"
                        }
                      - ingress          = {
                          - annotations = {}
                          - enabled     = false
                          - hostname    = "influxdb.foobar.com"
                          - path        = "/"
                          - tls         = false
                        }
                      - initScripts      = {
                          - enabled = false
                          - scripts = {
                              - "init.sh" = <<-EOT
                                    #!/bin/bash
                                    influx apply --force yes -u https://raw.githubusercontent.com/influxdata/community-templates/master/influxdb2_operational_monitoring/influxdb2_operational_monitoring.yml
                                EOT
                            }
                        }
                      - livenessProbe    = {}
                      - nameOverride     = ""
                      - nodeSelector     = {}
                      - pdb              = {
                          - create       = true
                          - minAvailable = 1
                        }
                      - persistence      = {
                          - accessMode = "ReadWriteOnce"
                          - enabled    = true
                          - mountPath  = "/var/lib/influxdb2"
                          - size       = "50Gi"
                          - subPath    = ""
                        }
                      - podAnnotations   = {}
                      - podLabels        = {}
                      - readinessProbe   = {}
                      - resources        = {}
                      - securityContext  = {}
                      - service          = {
                          - annotations = {}
                          - labels      = {}
                          - port        = 80
                          - portName    = "http"
                          - targetPort  = 8086
                          - type        = "ClusterIP"
                        }
                      - serviceAccount   = {
                          - annotations = {}
                          - create      = true
                          - name        = null
                        }
                      - startupProbe     = {
                          - enabled = false
                        }
                      - tolerations      = []
                    }
                )
              - version        = "2.1.2"
            },
        ] -> (known after apply)
        name                       = "influxdb"
      ~ values                     = [
          ~ (sensitive value),
        ]
        # (26 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.
Releasing state lock. This may take a few moments...
  • ▶️ To apply this plan, comment:
    • atlantis apply -d projects/dev
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d projects/dev
Plan: 0 to add, 1 to change, 0 to destroy.
  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@goboolean-io
Copy link
Contributor

Ran Plan for dir: projects/dev workspace: default

Show Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place

Terraform will perform the following actions:

  # module.influxdb.helm_release.influxdb will be updated in-place
~ resource "helm_release" "influxdb" {
        id                         = "influxdb"
      ~ metadata                   = [
          - {
              - app_version    = "2.7.4"
              - chart          = "influxdb2"
              - first_deployed = 1738644251
              - last_deployed  = 1738644251
              - name           = "influxdb"
              - namespace      = "influxdata"
              - notes          = <<-EOT
                    InfluxDB 2 is deployed as a StatefulSet on your cluster.
                    
                    You can access it by using the service name: influxdb-influxdb2
                    
                    To retrieve the password for the 'admin' user:
                    
                      echo $(kubectl get secret influxdb-influxdb2-auth -o "jsonpath={.data['admin-password']}" --namespace influxdata | base64 --decode)
                    
                    Note: with enabled persistence, admin password is only set once during the initial deployment. The password is not changed when InfluxDB 2 is re-deployed with different password.
                EOT
              - revision       = 1
              - values         = jsonencode(
                    {
                      - adminUser        = {
                          - bucket           = "minimal"
                          - organization     = "goboolean"
                          - password         = "dfjInwr231-SUD83rbn"
                          - retention_policy = "0s"
                          - token            = ""
                          - user             = "admin"
                        }
                      - affinity         = {}
                      - env              = {}
                      - fullnameOverride = ""
                      - image            = {
                          - pullPolicy = "IfNotPresent"
                          - repository = "influxdb"
                          - tag        = "2.7.4-alpine"
                        }
                      - ingress          = {
                          - annotations = {}
                          - enabled     = false
                          - hostname    = "influxdb.foobar.com"
                          - path        = "/"
                          - tls         = false
                        }
                      - initScripts      = {
                          - enabled = false
                          - scripts = {
                              - "init.sh" = <<-EOT
                                    #!/bin/bash
                                    influx apply --force yes -u https://raw.githubusercontent.com/influxdata/community-templates/master/influxdb2_operational_monitoring/influxdb2_operational_monitoring.yml
                                EOT
                            }
                        }
                      - livenessProbe    = {}
                      - nameOverride     = ""
                      - nodeSelector     = {}
                      - pdb              = {
                          - create       = true
                          - minAvailable = 1
                        }
                      - persistence      = {
                          - accessMode = "ReadWriteOnce"
                          - enabled    = true
                          - mountPath  = "/var/lib/influxdb2"
                          - size       = "50Gi"
                          - subPath    = ""
                        }
                      - podAnnotations   = {}
                      - podLabels        = {}
                      - readinessProbe   = {}
                      - resources        = {}
                      - securityContext  = {}
                      - service          = {
                          - annotations = {}
                          - labels      = {}
                          - port        = 80
                          - portName    = "http"
                          - targetPort  = 8086
                          - type        = "ClusterIP"
                        }
                      - serviceAccount   = {
                          - annotations = {}
                          - create      = true
                          - name        = null
                        }
                      - startupProbe     = {
                          - enabled = false
                        }
                      - tolerations      = []
                    }
                )
              - version        = "2.1.2"
            },
        ] -> (known after apply)
        name                       = "influxdb"
      ~ values                     = [
          ~ (sensitive value),
        ]
        # (26 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.
Releasing state lock. This may take a few moments...
  • ▶️ To apply this plan, comment:
    • atlantis apply -d projects/dev
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d projects/dev
Plan: 0 to add, 1 to change, 0 to destroy.
  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@goboolean-io
Copy link
Contributor

Ran Plan for dir: projects/dev workspace: default

Show Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

  # module.telegraf.helm_release.telegraf will be created
+ resource "helm_release" "telegraf" {
      + atomic                     = false
      + chart                      = "telegraf"
      + cleanup_on_fail            = false
      + create_namespace           = false
      + dependency_update          = false
      + disable_crd_hooks          = false
      + disable_openapi_validation = false
      + disable_webhooks           = false
      + force_update               = false
      + id                         = (known after apply)
      + lint                       = false
      + manifest                   = (known after apply)
      + max_history                = 0
      + metadata                   = (known after apply)
      + name                       = "telegraf"
      + namespace                  = "fetch-system"
      + pass_credentials           = false
      + recreate_pods              = false
      + render_subchart_notes      = true
      + replace                    = false
      + repository                 = "https://helm.influxdata.com/"
      + reset_values               = false
      + reuse_values               = false
      + skip_crds                  = false
      + status                     = "deployed"
      + timeout                    = 300
      + values                     = [
          + (sensitive value),
        ]
      + verify                     = false
      + version                    = "1.8.55"
      + wait                       = true
      + wait_for_jobs              = false
    }

Plan: 1 to add, 0 to change, 0 to destroy.

  • ▶️ To apply this plan, comment:
    • atlantis apply -d projects/dev
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d projects/dev
Plan: 1 to add, 0 to change, 0 to destroy.
  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@ikjeong
Copy link
Contributor Author

ikjeong commented Feb 4, 2025

atlantis apply

@goboolean-io
Copy link
Contributor

Ran Apply for dir: projects/dev workspace: default

Apply Error

Show Output
running "/usr/bin/terraform apply -input=false \"/root/.atlantis/repos/goboolean/infrastructure/111/default/projects/dev/default.tfplan\"" in "/root/.atlantis/repos/goboolean/infrastructure/111/default/projects/dev": exit status 1
module.telegraf.helm_release.telegraf: Creating...
╷
│ Warning: Helm release "" was created but has a failed status. Use the `helm` command to investigate the error, correct it, then run Terraform again.
│ 
│   with module.telegraf.helm_release.telegraf,
│   on ../../modules/infra/fetch-system/telegraf/main.tf line 7, in resource "helm_release" "telegraf":
│    7: resource "helm_release" "telegraf" {
│ 
╵
╷
│ Error: 1 error occurred:
│ 	* Service "telegraf" is invalid: spec.ports: Required value
│ 
│ 
│ 
│   with module.telegraf.helm_release.telegraf,
│   on ../../modules/infra/fetch-system/telegraf/main.tf line 7, in resource "helm_release" "telegraf":
│    7: resource "helm_release" "telegraf" {
│ 
╵

@goboolean-io
Copy link
Contributor

Ran Plan for dir: projects/dev workspace: default

Show Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.telegraf.helm_release.telegraf is tainted, so must be replaced
-/+ resource "helm_release" "telegraf" {
      ~ id                         = "telegraf" -> (known after apply)
      + manifest                   = (known after apply)
      ~ metadata                   = [
          - {
              - app_version    = "1.32.1"
              - chart          = "telegraf"
              - first_deployed = 1738654752
              - last_deployed  = 1738654752
              - name           = "telegraf"
              - namespace      = "fetch-system"
              - notes          = <<-EOT
                    To open a shell session in the container running Telegraf run the following:
                    
                      kubectl exec -i -t --namespace fetch-system $(kubectl get pods --namespace fetch-system -l app.kubernetes.io/name=telegraf -o jsonpath='{.items[0].metadata.name}') /bin/sh
                    
                    To view the logs for a Telegraf pod, run the following:
                    
                      kubectl logs -f --namespace fetch-system $(kubectl get pods --namespace fetch-system -l app.kubernetes.io/name=telegraf -o jsonpath='{ .items[0].metadata.name }')
                EOT
              - revision       = 1
              - values         = jsonencode(
                    {
                      - affinity         = {}
                      - args             = []
                      - config           = {
                          - agent      = {
                              - collection_jitter   = "0s"
                              - debug               = false
                              - flush_interval      = "10s"
                              - flush_jitter        = "0s"
                              - hostname            = "$HOSTNAME"
                              - interval            = "10s"
                              - logfile             = ""
                              - metric_batch_size   = 1000
                              - metric_buffer_limit = 10000
                              - omit_hostname       = false
                              - precision           = ""
                              - quiet               = false
                              - round_interval      = true
                            }
                          - inputs     = [
                              - {
                                  - kafka_consumer = {
                                      - brokers        = [
                                          - "kafka.kafka.svc.cluster.local:9092",
                                        ]
                                      - consumer_group = "fetch-system-telegraf"
                                      - data_format    = "json"
                                      - topic_regexps  = [
                                          - ".*",
                                        ]
                                    }
                                },
                            ]
                          - outputs    = [
                              - {
                                  - influxdb_v2 = {
                                      - bucket       = "minimal"
                                      - organization = "goboolean"
                                      - token        = "asdae8221ewda8he2iuej8sajdikosad"
                                      - urls         = "http://influxdb-influxdb2.influxdata.svc.cluster.local:8086"
                                    }
                                },
                            ]
                          - processors = [
                              - {
                                  - enum = {
                                      - mapping = {
                                          - dest           = "status_code"
                                          - field          = "status"
                                          - value_mappings = {
                                              - critical = 3
                                              - healthy  = 1
                                              - problem  = 2
                                            }
                                        }
                                    }
                                },
                            ]
                        }
                      - env              = [
                          - {
                              - name  = "HOSTNAME"
                              - value = "telegraf-polling-service"
                            },
                        ]
                      - image            = {
                          - pullPolicy = "IfNotPresent"
                          - repo       = "docker.io/library/telegraf"
                          - tag        = "1.32-alpine"
                        }
                      - imagePullSecrets = []
                      - metrics          = {
                          - health   = {
                              - enabled         = false
                              - service_address = "http://:8888"
                              - threshold       = 5000
                            }
                          - internal = {
                              - collect_memstats = false
                              - enabled          = true
                            }
                        }
                      - nodeSelector     = {}
                      - pdb              = {
                          - create       = true
                          - minAvailable = 1
                        }
                      - podAnnotations   = {}
                      - podLabels        = {}
                      - rbac             = {
                          - clusterWide = false
                          - create      = true
                          - rules       = []
                        }
                      - replicaCount     = 1
                      - resources        = {}
                      - service          = {
                          - annotations = {}
                          - enabled     = true
                          - type        = "ClusterIP"
                        }
                      - serviceAccount   = {
                          - annotations = {}
                          - create      = true
                          - name        = null
                        }
                      - tolerations      = []
                      - updateStrategy   = {}
                    }
                )
              - version        = "1.8.55"
            },
        ] -> (known after apply)
        name                       = "telegraf"
      ~ status                     = "failed" -> "deployed"
      ~ values                     = [
          ~ (sensitive value),
        ]
        # (25 unchanged attributes hidden)
    }

Plan: 1 to add, 0 to change, 1 to destroy.

  • ▶️ To apply this plan, comment:
    • atlantis apply -d projects/dev
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d projects/dev
Plan: 1 to add, 0 to change, 1 to destroy.
  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@ikjeong
Copy link
Contributor Author

ikjeong commented Feb 4, 2025

atlantis apply

@goboolean-io
Copy link
Contributor

Ran Plan for dir: projects/dev workspace: default

Plan Error

The default workspace at path projects/dev is currently locked by another command that is running for this pull request.
Wait until the previous command is complete and try again.

@goboolean-io
Copy link
Contributor

Ran Apply for dir: projects/dev workspace: default

Apply Error

Show Output
running "/usr/bin/terraform apply -input=false \"/root/.atlantis/repos/goboolean/infrastructure/111/default/projects/dev/default.tfplan\"" in "/root/.atlantis/repos/goboolean/infrastructure/111/default/projects/dev": exit status 1
Acquiring state lock. This may take a few moments...
module.telegraf.helm_release.telegraf: Destroying... [id=telegraf]
module.telegraf.helm_release.telegraf: Destruction complete after 0s
module.telegraf.helm_release.telegraf: Creating...
module.telegraf.helm_release.telegraf: Still creating... [10s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [20s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [30s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [40s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [50s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [1m0s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [1m10s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [1m20s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [1m30s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [1m40s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [1m50s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [2m0s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [2m10s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [2m20s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [2m30s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [2m40s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [2m50s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [3m0s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [3m10s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [3m20s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [3m30s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [3m40s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [3m50s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [4m0s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [4m10s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [4m20s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [4m30s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [4m40s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [4m50s elapsed]
module.telegraf.helm_release.telegraf: Still creating... [5m0s elapsed]
╷
│ Warning: Helm release "" was created but has a failed status. Use the `helm` command to investigate the error, correct it, then run Terraform again.
│ 
│   with module.telegraf.helm_release.telegraf,
│   on ../../modules/infra/fetch-system/telegraf/main.tf line 7, in resource "helm_release" "telegraf":
│    7: resource "helm_release" "telegraf" {
│ 
╵
╷
│ Error: context deadline exceeded
│ 
│   with module.telegraf.helm_release.telegraf,
│   on ../../modules/infra/fetch-system/telegraf/main.tf line 7, in resource "helm_release" "telegraf":
│    7: resource "helm_release" "telegraf" {
│ 
╵

@ikjeong
Copy link
Contributor Author

ikjeong commented Feb 4, 2025

atlantis plan

@goboolean-io
Copy link
Contributor

Ran Plan for dir: projects/dev workspace: default

Show Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.telegraf.helm_release.telegraf is tainted, so must be replaced
-/+ resource "helm_release" "telegraf" {
      ~ id                         = "telegraf" -> (known after apply)
      + manifest                   = (known after apply)
      ~ metadata                   = [
          - {
              - app_version    = "1.32.1"
              - chart          = "telegraf"
              - first_deployed = 1738655543
              - last_deployed  = 1738655543
              - name           = "telegraf"
              - namespace      = "fetch-system"
              - notes          = <<-EOT
                    To open a shell session in the container running Telegraf run the following:
                    
                      kubectl exec -i -t --namespace fetch-system $(kubectl get pods --namespace fetch-system -l app.kubernetes.io/name=telegraf -o jsonpath='{.items[0].metadata.name}') /bin/sh
                    
                    To view the logs for a Telegraf pod, run the following:
                    
                      kubectl logs -f --namespace fetch-system $(kubectl get pods --namespace fetch-system -l app.kubernetes.io/name=telegraf -o jsonpath='{ .items[0].metadata.name }')
                EOT
              - revision       = 1
              - values         = jsonencode(
                    {
                      - affinity         = {}
                      - args             = []
                      - config           = {
                          - agent      = {
                              - collection_jitter   = "0s"
                              - debug               = false
                              - flush_interval      = "10s"
                              - flush_jitter        = "0s"
                              - hostname            = "$HOSTNAME"
                              - interval            = "10s"
                              - logfile             = ""
                              - metric_batch_size   = 1000
                              - metric_buffer_limit = 10000
                              - omit_hostname       = false
                              - precision           = ""
                              - quiet               = false
                              - round_interval      = true
                            }
                          - inputs     = [
                              - {
                                  - kafka_consumer = {
                                      - brokers        = [
                                          - "kafka.kafka.svc.cluster.local:9092",
                                        ]
                                      - consumer_group = "fetch-system-telegraf"
                                      - data_format    = "json"
                                      - topic_regexps  = [
                                          - ".*",
                                        ]
                                    }
                                },
                            ]
                          - outputs    = [
                              - {
                                  - influxdb_v2 = {
                                      - bucket       = "minimal"
                                      - organization = "goboolean"
                                      - token        = "asdae8221ewda8he2iuej8sajdikosad"
                                      - urls         = "http://influxdb-influxdb2.influxdata.svc.cluster.local:8086"
                                    }
                                },
                            ]
                          - processors = [
                              - {
                                  - enum = {
                                      - mapping = {
                                          - dest           = "status_code"
                                          - field          = "status"
                                          - value_mappings = {
                                              - critical = 3
                                              - healthy  = 1
                                              - problem  = 2
                                            }
                                        }
                                    }
                                },
                            ]
                        }
                      - env              = [
                          - {
                              - name  = "HOSTNAME"
                              - value = "telegraf-polling-service"
                            },
                        ]
                      - image            = {
                          - pullPolicy = "IfNotPresent"
                          - repo       = "docker.io/library/telegraf"
                          - tag        = "1.32-alpine"
                        }
                      - imagePullSecrets = []
                      - metrics          = {
                          - health   = {
                              - enabled         = true
                              - service_address = "http://:8888"
                              - threshold       = 5000
                            }
                          - internal = {
                              - collect_memstats = false
                              - enabled          = true
                            }
                        }
                      - nodeSelector     = {}
                      - pdb              = {
                          - create       = true
                          - minAvailable = 1
                        }
                      - podAnnotations   = {}
                      - podLabels        = {}
                      - rbac             = {
                          - clusterWide = false
                          - create      = true
                          - rules       = []
                        }
                      - replicaCount     = 1
                      - resources        = {}
                      - service          = {
                          - annotations = {}
                          - enabled     = true
                          - type        = "ClusterIP"
                        }
                      - serviceAccount   = {
                          - annotations = {}
                          - create      = true
                          - name        = null
                        }
                      - tolerations      = []
                      - updateStrategy   = {}
                    }
                )
              - version        = "1.8.55"
            },
        ] -> (known after apply)
        name                       = "telegraf"
      ~ status                     = "failed" -> "deployed"
      ~ values                     = [
          ~ (sensitive value),
        ]
        # (25 unchanged attributes hidden)
    }

Plan: 1 to add, 0 to change, 1 to destroy.

  • ▶️ To apply this plan, comment:
    • atlantis apply -d projects/dev
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d projects/dev
Plan: 1 to add, 0 to change, 1 to destroy.
  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@ikjeong
Copy link
Contributor Author

ikjeong commented Feb 4, 2025

atlantis apply

@goboolean-io
Copy link
Contributor

Ran Apply for dir: projects/dev workspace: default

module.telegraf.helm_release.telegraf: Destroying... [id=telegraf]
module.telegraf.helm_release.telegraf: Destruction complete after 1s
module.telegraf.helm_release.telegraf: Creating...
module.telegraf.helm_release.telegraf: Still creating... [10s elapsed]
module.telegraf.helm_release.telegraf: Creation complete after 14s [id=telegraf]

Apply complete! Resources: 1 added, 0 changed, 1 destroyed.

@goboolean-io
Copy link
Contributor

Automatically merging because all plans have been successfully applied.

@goboolean-io goboolean-io merged commit 87181e4 into main Feb 4, 2025
5 checks passed
@goboolean-io
Copy link
Contributor

Locks and plans deleted for the projects and workspaces modified in this pull request:

  • dir: projects/dev workspace: default

@goboolean-io goboolean-io deleted the feature/telegraf branch February 4, 2025 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

telegraf 배포
3 participants