Skip to content

Commit 6be1c99

Browse files
committed
fix: align KCLInput apiVersion with examples
Resolves #250
1 parent 21623e5 commit 6be1c99

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

fn.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"github.com/crossplane/function-sdk-go/request"
1919
"github.com/crossplane/function-sdk-go/response"
2020

21-
"github.com/crossplane-contrib/function-kcl/input/v1beta1"
21+
fkcl "github.com/crossplane-contrib/function-kcl/input/v1alpha1"
2222
pkgresource "github.com/crossplane-contrib/function-kcl/pkg/resource"
2323
"sigs.k8s.io/yaml"
2424
)
@@ -39,7 +39,7 @@ func (f *Function) RunFunction(_ context.Context, req *fnv1.RunFunctionRequest)
3939
log.Info("Running Function")
4040

4141
rsp := response.To(req, response.DefaultTTL)
42-
in := &v1beta1.KCLInput{}
42+
in := &fkcl.KCLInput{}
4343
if err := request.GetInput(req, in); err != nil {
4444
response.Fatal(rsp, errors.Wrapf(err, "cannot get Function input from %T", req))
4545
return rsp, nil
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// Package v1beta1 contains the input type for this Function
1+
// Package v1alpha1 contains the input type for this Function
22
// +kubebuilder:object:generate=true
3-
// +groupName=template.fn.crossplane.io
4-
// +versionName=v1beta1
5-
package v1beta1
3+
// +groupName=krm.kcl.dev
4+
// +versionName=v1alpha1
5+
package v1alpha1
66

77
import (
88
"fmt"
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package/input/template.fn.crossplane.io_kclinputs.yaml renamed to package/input/krm.kcl.dev_kclinputs.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ kind: CustomResourceDefinition
44
metadata:
55
annotations:
66
controller-gen.kubebuilder.io/version: v0.19.0
7-
name: kclinputs.template.fn.crossplane.io
7+
name: kclinputs.krm.kcl.dev
88
spec:
9-
group: template.fn.crossplane.io
9+
group: krm.kcl.dev
1010
names:
1111
categories:
1212
- crossplane
@@ -16,7 +16,7 @@ spec:
1616
singular: kclinput
1717
scope: Namespaced
1818
versions:
19-
- name: v1beta1
19+
- name: v1alpha1
2020
schema:
2121
openAPIV3Schema:
2222
description: KCLInput can be used to provide input to this Function.

0 commit comments

Comments
 (0)