Comments (11)
ok, looks like it's latest
docker image from github doesn't have darwin/arm64, I guess that's why it can't start that image in container. I wasn't able to build docker images locally for that arch, but I was able to build function with go, so I can play locally 👍
from function-kcl.
ah, so it was just non existing user in the image? crossplane beta render
works now with the docker image 👍 I guess using USER 1000:1000
instead of non-root should be fine as well.
from function-kcl.
yeah, with docker image that finally works, thank you!
from function-kcl.
@Peefy any idea how to try that in actual cluster?
➜ k get functions kcl-function -o yaml
apiVersion: pkg.crossplane.io/v1beta1
kind: Function
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"pkg.crossplane.io/v1beta1","kind":"Function","metadata":{"annotations":{},"name":"kcl-function"},"spec":{"package":"kcllang/crossplane-kcl"}}
creationTimestamp: "2024-01-19T10:10:20Z"
generation: 1
name: kcl-function
resourceVersion: "2785136"
uid: 4a280956-4c0b-491b-bad8-9a0349a7509e
spec:
ignoreCrossplaneConstraints: false
package: kcllang/crossplane-kcl
packagePullPolicy: IfNotPresent
revisionActivationPolicy: Automatic
revisionHistoryLimit: 1
runtimeConfigRef:
apiVersion: pkg.crossplane.io/v1beta1
kind: DeploymentRuntimeConfig
name: default
skipDependencyResolution: false
status:
conditions:
- lastTransitionTime: "2024-01-19T10:47:32Z"
message: 'cannot initialize parser backend: couldn''t find "package.yaml" file
after checking 6429 files in the archive (annotated layer: false): EOF'
reason: UnhealthyPackageRevision
status: "False"
type: Healthy
- lastTransitionTime: "2024-01-19T10:10:21Z"
reason: ActivePackageRevision
status: "True"
type: Installed
currentIdentifier: kcllang/crossplane-kcl
currentRevision: kcl-function-e81ab068ba03
from function-kcl.
Can this document help you? https://kcl-lang.io/docs/user_docs/guides/working-with-k8s/mutate-manifests/crossplane-kcl-function
from function-kcl.
I don't think I got anything wrong with my setup actually, but rather smth is wrong with the kcllang/crossplane-kcl
docker image. Could you please check if you can get it running locally in docker image with crossplane beta render
and without render.crossplane.io/runtime: Development
annotation on function?
Right now I see these in events in k8s:
20m Warning ParsePackage functionrevision/kcl-function-e81ab068ba03 cannot initialize parser backend: couldn't find "package.yaml" file after checking 1061 files in the archive (annotated layer: false): context deadline exceeded
17m Warning ParsePackage functionrevision/kcl-function-61c608dacb13 (combined from similar events): cannot initialize parser backend: couldn't find "package.yaml" file after checking 1915 files in the archive (annotated layer: false): context deadline exceeded
17m Warning ParsePackage functionrevision/kcl-function-61c608dacb13 (combined from similar events): cannot initialize parser backend: couldn't find "package.yaml" file after checking 1915 files in the archive (annotated layer: false): context deadline exceeded
11m Warning ParsePackage functionrevision/kcl-function-e81ab068ba03 (combined from similar events): cannot initialize parser backend: couldn't find "package.yaml" file after checking 179 files in the archive (annotated layer: false): context deadline exceeded
11m Warning ParsePackage functionrevision/kcl-function-e81ab068ba03 (combined from similar events): cannot initialize parser backend: couldn't find "package.yaml" file after checking 179 files in the archive (annotated layer: false): context deadline exceeded
I don't think that could be related to any config I have on my side?
from function-kcl.
My message is as follows:
$ kubectl get functions kcl-function -o yaml
apiVersion: pkg.crossplane.io/v1beta1
kind: Function
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"pkg.crossplane.io/v1beta1","kind":"Function","metadata":{"annotations":{},"name":"kcl-function"},"spec":{"package":"kcllang/crossplane-kcl"}}
creationTimestamp: "2024-01-19T12:54:47Z"
generation: 1
name: kcl-function
resourceVersion: "980"
uid: fab2cdbf-d3f9-45be-9626-9103fa9ad36c
spec:
ignoreCrossplaneConstraints: false
package: kcllang/crossplane-kcl
packagePullPolicy: IfNotPresent
revisionActivationPolicy: Automatic
revisionHistoryLimit: 1
runtimeConfigRef:
apiVersion: pkg.crossplane.io/v1beta1
kind: DeploymentRuntimeConfig
name: default
skipDependencyResolution: false
status:
conditions:
- lastTransitionTime: "2024-01-19T12:55:02Z"
reason: UnknownPackageRevisionHealth
status: Unknown
type: Healthy
- lastTransitionTime: "2024-01-19T12:55:02Z"
reason: ActivePackageRevision
status: "True"
type: Installed
currentIdentifier: kcllang/crossplane-kcl
currentRevision: kcl-function-e81ab068ba03
My version is
$ crossplane --version
v1.14.4
from function-kcl.
I don't think it means function actually works, looks like your function Healthy
status is uknown as well
status: Unknown
type: Healthy
could you check events in default namespace?
k get events --sort-by=.metadata.creationTimestamp -n default
mine function:
➜ k get functions
NAME INSTALLED HEALTHY PACKAGE AGE
kcl-function True Unknown kcllang/crossplane-kcl 114m
from function-kcl.
Sorry, I've pushed a new commit 2dce197 Could you pls help to build a local image to test it? I'm sorry, I currently don't have a computer ai this time.
from function-kcl.
I see you pushed docker image, but function still doesn't work in-cluster, healthy status is unknown and I see events like these:
84s Warning ComposeResources xapplication/xxx-xxxxxxx-vz5kk cannot compose resources: cannot run Composition pipeline step "normal": cannot get gRPC client connection for Function "kcl-function": cannot determine gRPC target: active FunctionRevision "kcl-function-95373156cb4d" has an empty status.endpoint
27s Warning ParsePackage functionrevision/kcl-function-95373156cb4d cannot initialize parser backend: couldn't find "package.yaml" file after checking 6429 files in the archive (annotated layer: false): EOF
for me it seems image is missing some config, which crossplane expecting to find from it?
from function-kcl.
Can you try this image? docker.io/kcllang/crossplane-kcl
from function-kcl.
Related Issues (20)
- Ability to decouple `metadata.name` from `crossplane.io/composition-resource-name` and `crossplane.io/external-name` annotations HOT 2
- DatabaseInstance wrong value type HOT 3
- Write to Composite Resource HOT 2
- [Enhancement] Support function-kcl to obtain parameters from external ConfigMaps HOT 2
- Container uses 5GB of ram sitting mostly idle HOT 3
- Kind not considered in Items list HOT 11
- Meta type error when building the package HOT 2
- [Track] Crossplane KCL Provider HOT 1
- Extract data from a specific resource HOT 2
- KCLInput vs KCLRun HOT 2
- arm64 architecture support HOT 4
- Function Pod High memory usage / Leak HOT 1
- Unable to match desired object HOT 4
- Missing desired resources when metadata.name is missing or same for multiple resources HOT 5
- Multiple resources HOT 9
- Clearer variable names HOT 2
- Support writing to Context HOT 1
- Support requesting extra resources
- Memory leak on the function-kcl pod HOT 4
- Adding Elements in with conditional does not work as expected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from function-kcl.