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

Controller observed a panic: index out of range [0] with length 0 #191

Open
inola-ww opened this issue Feb 11, 2025 · 0 comments
Open

Controller observed a panic: index out of range [0] with length 0 #191

inola-ww opened this issue Feb 11, 2025 · 0 comments
Assignees

Comments

@inola-ww
Copy link

operator installed via kustomize from https://github.com/hyperspike/valkey-operator/releases/download/v0.0.53/install.yaml

Kubernetes Version: v1.30.5 +k3s1 (on K3s)

Error:

runtime error: index out of range [0] with length 0
at
hyperspike.io/valkey-operator/internal/controller.(*ValkeyReconciler).initCluster
internal/controller/valkey_controller.go:569

Log:

2025-02-11T06:38:22Z	ERROR	Observed a panic	{"controller": "valkey", "controllerGroup": "hyperspike.io", "controllerKind": "Valkey", "Valkey": {"name":"backoffice-cache","namespace":"backoffice"}, "namespace": "backoffice", "name": "backoffice-cache", "reconcileID": "20794660-0d69-4e06-8803-aa94c693fcc6", "panic": "runtime error: index out of range [0] with length 0", "panicGoValue": "runtime.boundsError{x:0, y:0, signed:true, code:0x0}", "stacktrace": "goroutine 80 [running]:\nk8s.io/apimachinery/pkg/util/runtime.logPanic({0x2f1f958, 0xc001106210}, {0x2b62c40, 0xc000e46258})\n\t/home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:107 +0x116\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Reconcile.func1()\n\t/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:107 +0x1fa\npanic({0x2b62c40?, 0xc000e46258?})\n\t$GOROOT/src/runtime/panic.go:785 +0x136\nhyperspike.io/valkey-operator/internal/controller.(*ValkeyReconciler).initCluster(0xc00037e810, {0x2f1f958, 0xc001106210}, 0xc000506fc0)\n\tinternal/controller/valkey_controller.go:569 +0x2fca\nhyperspike.io/valkey-operator/internal/controller.(*ValkeyReconciler).Reconcile(0xc00037e810, {0x2f1f958, 0xc001106210}, {{{0xc000529100, 0xa}, {0xc0005290f0, 0x10}}})\n\tinternal/controller/valkey_controller.go:203 +0xdd1\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Reconcile(0x2f2d9c0, {0x2f1f958, 0xc001106210}, {{{0xc000529100, 0xa}, {0xc0005290f0, 0x10}}})\n\t/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:118 +0x203\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler(0x2f2d9c0, {0x2f1f958, 0xc001106210}, {{{0xc000529100, 0xa}, {0xc0005290f0, 0x10}}})\n\t/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:328 +0x438\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem(0x2f2d9c0, {0x2f1f990, 0xc00016bd60})\n\t/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:288 +0x4e6\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.2()\n\t/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:249 +0xf4\ncreated by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2 in goroutine 67\n\t/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:245 +0xc73\n"}

my config:

apiVersion: hyperspike.io/v1
kind: Valkey
metadata:
  labels:
    app: backoffice
    app.kubernetes.io/instance: backoffice
    version: 1.4.3.2426
  name: backoffice-cache
  namespace: backoffice
spec:
  nodes: 1
  replicas: 1
  resources:
    limits:
      memory: 512Mi
    requests:
      cpu: 250m
      memory: 512Mi
  storage:
    apiVersion: v1
    kind: PersistentVolumeClaim
    spec:
      accessModes:
        - ReadWriteOnce
      resources:
        requests:
          storage: 1Gi
      storageClassName: longhorn
      volumeMode: Filesystem
  tls: false
  volumePermissions: true
@dmolik dmolik self-assigned this Feb 11, 2025
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

2 participants