generated from crossplane/function-template-go
-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
Not sure if this has always been happening but just noticed that my local registry is being hammered by function-kcl to download oci packages for the function-kcl's KCLRun. This happens every reconciliation loop.
Something like this composition using an OCI will show repeated downloading logs (and I can see the requests in the registry log too):
apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
name: workloadidentity-composite
labels:
version: "0.0.1"
spec:
compositeTypeRef:
apiVersion: example.com/v1alpha1
kind: WorkloadIdentityComposite
writeConnectionSecretsToNamespace: crossplane-system
mode: Pipeline
pipeline:
- step: normal
functionRef:
name: kcl-function
input:
apiVersion: krm.kcl.dev/v1alpha1
kind: KCLRun
metadata:
name: basic
annotations:
krm.kcl.dev/allow-insecure-source: "true"
spec:
source: oci://host.docker.internal:7900/example/workloadidentity-default-composition-kcl:0.0.1
- step: automatically-detect-ready-composed-resources
functionRef:
name: function-auto-ready
downloading 'example/workloadidentity-default-composition-kcl:0.0.1:0.0.1' from 'host.docker.internal:7900/example/workloadidentity-default-composition-kcl:0.0.1:0.0.1'
{"level":"info","ts":1748866533.3905637,"caller":"fn/fn.go:250","msg":"Successfully processed crossplane KCL function resources","tag":"71f4485b88307f560ae2aae420936e8ed3050ab8b8affe78d5c5f42b2c40d419","xr-ver{"level":"info","ts":1748866538.7413683,"caller":"fn/fn.go:38","msg":"Running Function","tag":"40b349010e688fefd6272e8d921b5e7f9b84b084209f2d10eda3d3a351e6cd32"}
the latest version '0.0.1' will be downloadedI would have expected the function to cache the oci somewhere?
How can we reproduce it?
Create some KCL code to create a resource and package it into an OCI and push to a local registry:2. Write a composition that makes use of the OCI source and deploy to a crossplane cluster.
What environment did it happen in?
Function version: xpkg.crossplane.io/crossplane-contrib/function-kcl:v0.11.2
Crossplane: v1.20.0
KinD: 0.29.0
Kubernetes: 1.32.0
fhopfensperger, karlderkaefer, tng-daniel-haehnke, kptranum and paulorfjesus
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working