generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 266
Closed
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
Description
Creation of the instance leads to controller panic. Using ${...}${...} works fine.
Observed Behavior:
Controller panics
Expected Behavior:
Instance successfully created
Reproduction Steps (Please include ResourceGraphDefinition and Instances files):
# ResourceGraphDefinition
---
apiVersion: kro.run/v1alpha1
kind: ResourceGraphDefinition
metadata:
name: test-format
spec:
schema:
apiVersion: v1alpha1
kind: TestFormat
resources:
- id: serviceAccount
template:
apiVersion: v1
kind: ServiceAccount
metadata:
name: ${schema.metadata.name}
- id: configMap
template:
apiVersion: v1
kind: ConfigMap
metadata:
name: ${schema.metadata.name}
data:
key: ${"%s:%s".format([schema.metadata.namespace, serviceAccount.metadata.name])}# Instance
---
apiVersion: kro.run/v1alpha1
kind: TestFormat
metadata:
name: test-format
namespace: default
Versions:
- kro version: 0.6.3
- Kubernetes Version (
kubectl version): 1.33.2
Error Logs (if applicable)**:
2025-11-20T17:32:40.738Z INFO dynamic-controller Starting dynamic controller
2025-11-20T17:32:40.895Z INFO rgd-controller Starting workers {"controller": "ResourceGraphDefinition", "controllerGroup": "kro.run", "controllerKind": "ResourceGraphDefinition", "worker count": 1}
2025-11-20T17:32:40.899Z DEBUG rgd-controller setting resourcegraphdefinition as managed {"controller": "ResourceGraphDefinition", "controllerGroup": "kro.run", "controllerKind": "ResourceGraphDefinition", "name": "test-format", "reconcileID": "c49b9d46-3c71-499e-bbd9-ef53a9534a35"}
2025-11-20T17:32:40.899Z DEBUG rgd-controller reconciling resource graph definition graph {"controller": "ResourceGraphDefinition", "controllerGroup": "kro.run", "controllerKind": "ResourceGraphDefinition", "name": "test-format", "reconcileID": "c49b9d46-3c71-499e-bbd9-ef53a9534a35"}
2025-11-20T17:32:41.513Z DEBUG rgd-controller reconciling resource graph definition CRD {"controller": "ResourceGraphDefinition", "controllerGroup": "kro.run", "controllerKind": "ResourceGraphDefinition", "name": "test-format", "reconcileID": "c49b9d46-3c71-499e-bbd9-ef53a9534a35"}
2025-11-20T17:32:41.523Z INFO rgd-controller Updating existing CRD {"controller": "ResourceGraphDefinition", "controllerGroup": "kro.run", "controllerKind": "ResourceGraphDefinition", "name": "test-format", "reconcileID": "c49b9d46-3c71-499e-bbd9-ef53a9534a35", "name": "testformats.kro.run"}
2025-11-20T17:32:41.535Z INFO rgd-controller Waiting for CRD to become ready {"controller": "ResourceGraphDefinition", "controllerGroup": "kro.run", "controllerKind": "ResourceGraphDefinition", "name": "test-format", "reconcileID": "c49b9d46-3c71-499e-bbd9-ef53a9534a35", "name": "testformats.kro.run"}
2025-11-20T17:32:41.612Z DEBUG rgd-controller reconciling resource graph definition micro controller {"controller": "ResourceGraphDefinition", "controllerGroup": "kro.run", "controllerKind": "ResourceGraphDefinition", "name": "test-format", "reconcileID": "c49b9d46-3c71-499e-bbd9-ef53a9534a35"}
2025-11-20T17:32:41.616Z DEBUG dynamic-controller Enqueueing object {"objectIdentifiers": {"name":"test-format","namespace":"default"}, "eventType": "add"}
2025-11-20T17:32:41.616Z DEBUG dynamic-controller handler for gvr no longer exists, dropping item {"item": {"name":"test-format","namespace":"default"}}
2025-11-20T17:32:41.714Z DEBUG dynamic-controller Attached parent {"gvr": "kro.run/v1alpha1, Resource=testformats"}
2025-11-20T17:32:41.814Z DEBUG dynamic-controller Attached child {"parent": "kro.run/v1alpha1/testformats", "gvr": "/v1/serviceaccounts"}
2025-11-20T17:32:41.915Z DEBUG dynamic-controller Attached child {"parent": "kro.run/v1alpha1/testformats", "gvr": "/v1/configmaps"}
2025-11-20T17:32:41.915Z DEBUG dynamic-controller Enqueueing object {"objectIdentifiers": {"name":"test-format","namespace":"default"}, "eventType": "update"}
2025-11-20T17:32:41.915Z DEBUG dynamic-controller Successfully registered GVR {"gvr": "kro.run/v1alpha1/testformats"}
2025-11-20T17:32:41.915Z DEBUG rgd-controller calculating resource graph definition status and conditions {"controller": "ResourceGraphDefinition", "controllerGroup": "kro.run", "controllerKind": "ResourceGraphDefinition", "name": "test-format", "reconcileID": "c49b9d46-3c71-499e-bbd9-ef53a9534a35"}
2025-11-20T17:32:41.915Z DEBUG rgd-controller updating resource graph definition status {"controller": "ResourceGraphDefinition", "controllerGroup": "kro.run", "controllerKind": "ResourceGraphDefinition", "name": "test-format", "reconcileID": "c49b9d46-3c71-499e-bbd9-ef53a9534a35", "state": "Active", "conditions": 4}
2025-11-20T17:32:41.915Z DEBUG dynamic-controller Syncing object {"gvr": "kro.run/v1alpha1/testformats", "key": {"name":"test-format","namespace":"default"}}
2025-11-20T17:32:41.923Z LEVEL(-2) testformats-controller reconciling instance {"controller": "testformats", "controllerGroup": "kro.run", "controllerKind": "TestFormat", "namespace": "default", "name": "test-format"}
2025-11-20T17:32:41.925Z DEBUG dynamic-controller Finished syncing object {"gvr": "kro.run/v1alpha1/testformats", "key": {"name":"test-format","namespace":"default"}, "duration": "9.665027ms"}
E1120 17:32:41.925670 1 panic.go:262] "Observed a panic" panic="runtime error: invalid memory address or nil pointer dereference" panicGoValue="\"invalid memory address or nil pointer dereference\"" stacktrace=<
goroutine 91 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic({0x1ec7738, 0xc000a9e150}, {0x18d6020, 0x2ba6960})
k8s.io/[email protected]/pkg/util/runtime/runtime.go:132 +0xbc
k8s.io/apimachinery/pkg/util/runtime.handleCrash({0x1ec7770, 0xc000541c20}, {0x18d6020, 0x2ba6960}, {0x0, 0x0, 0xc000111478?})
k8s.io/[email protected]/pkg/util/runtime/runtime.go:107 +0x116
k8s.io/apimachinery/pkg/util/runtime.HandleCrashWithContext({0x1ec7770, 0xc000541c20}, {0x0, 0x0, 0x0})
k8s.io/[email protected]/pkg/util/runtime/runtime.go:78 +0x5a
panic({0x18d6020?, 0x2ba6960?})
runtime/panic.go:783 +0x132
github.com/kubernetes-sigs/kro/pkg/controller/instance.(*instanceGraphReconciler).getResolvedStatus(0xc0001118f8)
github.com/kubernetes-sigs/kro/pkg/controller/instance/controller_status.go:174 +0xa8
github.com/kubernetes-sigs/kro/pkg/controller/instance.(*instanceGraphReconciler).prepareStatus(0xc0001118f8)
github.com/kubernetes-sigs/kro/pkg/controller/instance/controller_status.go:142 +0x27
github.com/kubernetes-sigs/kro/pkg/controller/instance.(*Controller).Reconcile.func1()
github.com/kubernetes-sigs/kro/pkg/controller/instance/controller.go:148 +0x145
github.com/kubernetes-sigs/kro/pkg/controller/instance.(*Controller).Reconcile(0xc000d5a120, {0x1ec7770, 0xc000541c20}, {{{0xc000d41688?, 0x4816ce?}, {0xc000d416c0?, 0x4e35b3?}}})
github.com/kubernetes-sigs/kro/pkg/controller/instance/controller.go:157 +0x694
github.com/kubernetes-sigs/kro/pkg/dynamiccontroller.(*DynamicController).syncFunc(0xc000508620, {0x1ec7770, 0xc000541c20}, {{{0xc000d41688, 0x6}, {0xc000d416c0, 0xb}}, {{0xc0004eed78, 0x7}, {0xc0004eed70, ...}, ...}}, ...)
github.com/kubernetes-sigs/kro/pkg/dynamiccontroller/dynamic_controller.go:326 +0x2c6
github.com/kubernetes-sigs/kro/pkg/dynamiccontroller.(*DynamicController).processNextWorkItem(0xc000508620, {0x1ec7770, 0xc000541c20})
github.com/kubernetes-sigs/kro/pkg/dynamiccontroller/dynamic_controller.go:272 +0x293
github.com/kubernetes-sigs/kro/pkg/dynamiccontroller.(*DynamicController).worker(...)
github.com/kubernetes-sigs/kro/pkg/dynamiccontroller/dynamic_controller.go:250
k8s.io/apimachinery/pkg/util/wait.BackoffUntilWithContext.func1({0x1ec7770?, 0xc000541c20?}, 0xc00040d4d0?)
k8s.io/[email protected]/pkg/util/wait/backoff.go:255 +0x51
k8s.io/apimachinery/pkg/util/wait.BackoffUntilWithContext({0x1ec7770, 0xc000541c20}, 0xc000613a00, {0x1ea9c80, 0xc00040d4d0}, 0x1)
k8s.io/[email protected]/pkg/util/wait/backoff.go:256 +0xe5
k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext({0x1ec7770, 0xc000541c20}, 0xc000613a00, 0x3b9aca00, 0x0, 0x1)
k8s.io/[email protected]/pkg/util/wait/backoff.go:223 +0x8f
k8s.io/apimachinery/pkg/util/wait.UntilWithContext(...)
k8s.io/[email protected]/pkg/util/wait/backoff.go:172
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Which option describes the most your issue?
Common Expression Language (CEL)
sk31337
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.