Skip to content

Inspektor Gadget not loading in the UI for in-cluster headlamp setup #4334

@Rammurthy5

Description

@Rammurthy5

Describe the bug

We have Inspektor gadget pods running successfully and also Headlamp is deployed in-cluster. Exposed as a SVC via Loadbalancer. All tabs are working fine except the gadget.

To Reproduce

Steps to reproduce the bug:

  1. kubectl krew install gadget
    kubectl label ns gadget pod-security.kubernetes.io/enforce=privileged pod-security.kubernetes.io/audit=privileged pod-security.kubernetes.io/warn=privileged --overwrite

kubectl gadget deploy

helm install my-headlamp headlamp/headlamp --namespace kube-system -f headlamp-values.yaml

replicaCount: 1
image:
  registry: ghcr.io
  repository: headlamp-k8s/headlamp
  pullPolicy: IfNotPresent
  tag: ""
config:
  inCluster: true
  useLocalKubeconfig: false
  pluginsDir: "/build/plugins"
  enableHelm: false
  watchPlugins: false
env:
  - name: HEADLAMP_USE_LOCAL_KUBECONFIG
    value: "false"
initContainers:
  - name: headlamp-plugins
    image: ghcr.io/inspektor-gadget/headlamp-plugin:0.1.0-beta.2
    imagePullPolicy: Always
    command:
      - /bin/sh
      - -c
      - |
        mkdir -p /build/plugins && cp -r /plugins/* /build/plugins/
    volumeMounts:
      - name: plugins-dir
        mountPath: /build/plugins
volumeMounts:
  - name: plugins-dir
    mountPath: /build/plugins
persistentVolumeClaim:
  enabled: true
  accessModes:
    - ReadWriteOnce
  size: 1Gi
  storageClassName: openebs-hostpath
volumes:
  - name: plugins-dir
    persistentVolumeClaim:
      claimName: my-headlamp
serviceAccount:
  create: true
  name: my-headlamp
  annotations: {}
clusterRoleBinding:
  create: true
  clusterRoleName: cluster-admin
pluginsManager:
  enabled: false
extraManifests:
  - |
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: my-headlamp-plugin-config
      namespace: kube-system
    data:
      plugin.yml: |
        name: inspektor-gadget
        version: latest
        url: https://github.com/kinvolk/headlamp-plugin-inspektor-gadget/releases/latest/download/plugin.yaml

  1. click all tabs work and verify they show up alright.
  2. Click "Gadget" tab and screen is just loading.

Environment (please provide info about your environment):

  • Installation type: in-Cluster via helm
  • Headlamp Version: 0.39

Are you able to fix this issue?

NO

Do you want to help fix this issue? Please see our [contribution docs]
I am happy to help in any way i can to resolve this.

Additional Context

attached the screenshot for reference. above are my headlamp values yaml. Headlamp pod or gadget pods show no issues.

Image

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions