Skip to content

[Question]: I am getting error while calling slack webhook - tls: handshake faliure #607

@anikm1987

Description

@anikm1987

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've included steps to reproduce the behavior

Affected Components

  • K8sGPT (CLI)
  • K8sGPT Operator

K8sGPT Version

k8sgpt-operator-0.2.6

Kubernetes Version

v1.32.0

Host OS and its Version

Ubuntu 20.04

Steps to reproduce

  1. created incoming webhook in slack.
  2. Tested using postman and ablet o send message to channel using webhook
  3. Updated k8sgpt-resource.yaml with webhook url and deployed
apiVersion: core.k8sgpt.ai/v1alpha1
kind: K8sGPT
metadata:
  name: k8sgpt-sample
spec:
  ai:
    model: mistral-nemo:latest
    backend: localai
    baseUrl: http://host.minikube.internal:11434/v1
    enabled: true
    secret:
      name: k8sgpt-sample-secret
      key: ollama-api-key
  noCache: false
  repository: ghcr.io/k8sgpt-ai/k8sgpt
  version: v0.3.41
  sink:
    type: slack
    webhook: https://hooks.slack.com/services/T08BBMM6X0B/B08B5C1TJMC/KXXXXXXXXXXXXX # use the sink secret if you want to keep your webhook url private

  1. Getting below error in k8sgpt-operator-system/release-k8sgpt-operator-controller-manager-7647859d44-4xn9l:manager
Finished Reconciling k8sGPT with error: Post "https://hooks.slack.com/services/T08BBMM6X0B/B08B5C1TJMC/KXXXXXXXXXXXXX": remote error: tls: handshake failure   ││ 2025-02-02T00:06:57Z    ERROR    Reconciler error    {"controller": "k8sgpt", "controllerGroup": "core.k8sgpt.ai", "controllerKind": "K8sGPT", "K8sGPT": {"name":"k8sgpt ││ sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler                                                                                    ││     /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:324                                                                         ││ sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem                                                                                 ││     /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:265                                                                         ││ sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2                                                                                       ││     /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:226

Expected behaviour

It should be able to send the message to slack webhook.

Actual behaviour

No meesage received in slack but seeing error in the log

Getting below error in k8sgpt-operator-system/release-k8sgpt-operator-controller-manager-7647859d44-4xn9l:manager

Finished Reconciling k8sGPT with error: Post "https://hooks.slack.com/services/T08BBMM6X0B/B08B5C1TJMC/KXXXXXXXXXXXXX": remote error: tls: handshake failure   ││ 2025-02-02T00:06:57Z    ERROR    Reconciler error    {"controller": "k8sgpt", "controllerGroup": "core.k8sgpt.ai", "controllerKind": "K8sGPT", "K8sGPT": {"name":"k8sgpt ││ sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler                                                                                    ││     /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:324                                                                         ││ sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem                                                                                 ││     /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:265                                                                         ││ sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2                                                                                       ││     /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:226

Additional Information

I can curl the webhook url fine if I do minikube ssh and then perform curl -v <webhook_url>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions