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

Error calling ne: incompatible types for comparison #1241

Open
Archer-Li opened this issue Feb 13, 2025 · 6 comments
Open

Error calling ne: incompatible types for comparison #1241

Archer-Li opened this issue Feb 13, 2025 · 6 comments

Comments

@Archer-Li
Copy link

Archer-Li commented Feb 13, 2025

template: k8s-monitoring/templates/validations.yaml:5:4: executing "k8s-monitoring/templates/validations.yaml" at <include "destinations.validate" .>: error calling include: template: k8s-monitoring/templates/destinations/_destination_validations.tpl:40:46: executing "destinations.validate" at <ne $destination.protocol "http">: error calling ne: incompatible types for comparison

I think (ne $destination.protocol "http") will be evaluated for every destination item (including loki, prometheus...etc.). Without protocol set will immediately causing mismatch type error.

{{- if and (eq $destination.type "otlp") (ne $destination.protocol "http") (regexMatch "otlp-gateway-.+grafana\\.net" $destination.url) }}

Helm version: 2.0.10
Helm value.yaml:

destinations:
  - name: my-prom
    type: prometheus
    auth:
      type: basic
  - name: my-logs
    type: loki
    auth:
      type: basic
clusterMetrics:
  enabled: true
clusterEvents:
  enabled: true
podLogs:
  enabled: true
integrations:
  alloy:
    instances:
      - name: alloy
        labelSelectors:
          app.kubernetes.io/name:
            - alloy-metrics
            - alloy-singleton
            - alloy-logs
alloy-metrics:
  enabled: true
alloy-singleton:
  enabled: true
alloy-logs:
  enabled: true
@Archer-Li
Copy link
Author

Also is there a way to disable all validation? Thanks for answering!

@petewall
Copy link
Collaborator

Please try updating your Helm cli. At minimum, we use helm version 3.14.

@jewbetcha
Copy link
Collaborator

jewbetcha commented Feb 18, 2025

@Archer-Li just checking in if you were able to update helm CLI, and if that helped

@Archer-Li
Copy link
Author

Hello, We are using Terraform to installing K8s-helm charts. Here's the list of versions we were using:

required_providers {
    aws        = "~> 3.72.0"
    kubernetes = "~> 2.7.1"
    helm       = "~> 2.4.1"
    kubectl = {
      source  = "gavinbunney/kubectl"
      version = ">= 1.13.1"
    }
  }

We have attempted to update helm version with latest: 3.0.0-pre1, but not getting any luck yet

@petewall
Copy link
Collaborator

Let me check with my own terraform deployed instance. Can you share the helm_resource definition?

@Archer-Li
Copy link
Author

Sure, here's the definition:

resource "helm_release" "grafana-k8s-monitoring" {
  name             = "grafana-k8s-monitoring"
  repository       = "https://grafana.github.io/helm-charts"
  chart            = "k8s-monitoring"
  namespace        = var.namespace
  create_namespace = true
  atomic           = true
  timeout          = 900
  force_update     = true
  recreate_pods    = false
  cleanup_on_fail  = true

  values = [file("${path.module}/values.yaml")]

  set {
    name  = "cluster.name"
    value = var.cluster_name
  }
  
  More set blocks for secrets only...
}

We do have the helm with same definition deployed successfully on our linux/arm64 cluster. But linux/amd64 is keeps giving us type check issues.

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

No branches or pull requests

3 participants