Skip to content

Commit

Permalink
Migrate from github.com/avarei/function-pkl to github.com/crossplane-…
Browse files Browse the repository at this point in the history
…contrib/function-pkl
  • Loading branch information
Avarei committed Jun 17, 2024
1 parent fef78e8 commit e690927
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
REPO := github.com/avarei/function-pkl
CONTAINER_IMAGE := ghcr.io/avarei/function-pkl
REPO := github.com/crossplane-contrib/function-pkl
CONTAINER_IMAGE := ghcr.io/crossplane-contrib/function-pkl
TAG := v0.0.1

# Branch used for Pkl Package Releases
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ kind: Function
metadata:
name: function-pkl
spec:
package: ghcr.io/avarei/function-pkl:v0.0.1
package: ghcr.io/crossplane-contrib/function-pkl:v0.0.1
```
## Usage
Expand All @@ -35,7 +35,7 @@ spec:
spec:
type: uri
# This pkl file is at `pkl/crossplane-example/full.pkl` in this repo
uri: "package://pkg.pkl-lang.org/github.com/avarei/function-pkl/[email protected]#/full.pkl"
uri: "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]#/full.pkl"
```
### Example
Expand All @@ -49,8 +49,8 @@ A Pkl Package can be built in the following steps:
* Make sure that `\(baseUri)@\(version)` is the url where the package metadata can be downloaded from
* Likewise `\(baseUri)@\(version).zip` is the path where the content will be expected.
> Note: The PklProjects in this repository use pkg.pkl-lang.org, as they redirect to the download
* the path https://pkg.pkl-lang.org/github.com/avarei/function-pkl/[email protected]
* redirects to https://github.com/avarei/function-pkl/releases/download/[email protected]/[email protected]
* the path https://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]
* redirects to https://github.com/crossplane-contrib/function-pkl/releases/download/[email protected]/[email protected]
1. Run `pkl project resolve` to resolve the dependencies of the PklProject
1. Run `pkl project package` to package the Project into the files and make them ready for the upload.
1. Publish the Package
Expand Down Expand Up @@ -108,7 +108,7 @@ $ docker build . --tag=runtime
$ crossplane xpkg build -f package --embed-runtime-image=runtime
# Push the Package to a registry
$ crossplane xpkg push -f function-pkl*.xpkg ghcr.io/avarei/function-pkl
$ crossplane xpkg push -f function-pkl*.xpkg ghcr.io/crossplane-contrib/function-pkl
# Resolve Pkl Project Dependencies
$ pkl project resolve
Expand Down
2 changes: 1 addition & 1 deletion example/full/composition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ spec:
spec:
type: uri
# This pkl file is at `pkl/crossplane-example/full.pkl` in this repo
uri: "package://pkg.pkl-lang.org/github.com/avarei/function-pkl/[email protected]#/full.pkl"
uri: "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]#/full.pkl"
10 changes: 5 additions & 5 deletions example/inline/composition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ spec:
type: inline
# This pkl file is at `pkl/crossplane-example/full.pkl` in this repo
inline: |
amends "package://pkg.pkl-lang.org/github.com/avarei/function-pkl/[email protected]#/CompositionResponse.pkl"
import "package://pkg.pkl-lang.org/github.com/avarei/function-pkl/[email protected]#/Resource.pkl"
import "package://pkg.pkl-lang.org/github.com/avarei/function-pkl/[email protected]#/Crossplane.pkl"
amends "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]#/CompositionResponse.pkl"
import "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]#/Resource.pkl"
import "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]#/Crossplane.pkl"
import "package://pkg.pkl-lang.org/github.com/avarei/function-pkl/[email protected]#/crds/XR.pkl"
import "package://pkg.pkl-lang.org/github.com/avarei/function-pkl/[email protected]#/crds/Object.pkl"
import "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]#/crds/XR.pkl"
import "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]#/crds/Object.pkl"
import "package://pkg.pkl-lang.org/pkl-k8s/[email protected]#/api/core/v1/ConfigMap.pkl"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/avarei/function-pkl
module github.com/crossplane-contrib/function-pkl

go 1.22.1

Expand Down
6 changes: 3 additions & 3 deletions internal/function/fn.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"

"github.com/apple/pkl-go/pkl"
"github.com/avarei/function-pkl/input/v1beta1"
"github.com/avarei/function-pkl/internal/helper"
"github.com/avarei/function-pkl/internal/pkl/reader"
"github.com/crossplane-contrib/function-pkl/input/v1beta1"
"github.com/crossplane-contrib/function-pkl/internal/helper"
"github.com/crossplane-contrib/function-pkl/internal/pkl/reader"
"github.com/crossplane/crossplane-runtime/pkg/errors"
"github.com/crossplane/crossplane-runtime/pkg/logging"
fnv1beta1 "github.com/crossplane/function-sdk-go/proto/v1beta1"
Expand Down
4 changes: 2 additions & 2 deletions internal/function/fn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

"github.com/apple/pkl-go/pkl"
"github.com/avarei/function-pkl/input/v1beta1"
"github.com/crossplane-contrib/function-pkl/input/v1beta1"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"google.golang.org/protobuf/testing/protocmp"
Expand All @@ -18,7 +18,7 @@ import (
)

var (
pklPackage = "package://pkg.pkl-lang.org/github.com/avarei/function-pkl/[email protected]"
pklPackage = "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]"
)

func TestRunFunction(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/pkl/reader/crossplane_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/url"

"github.com/apple/pkl-go/pkl"
"github.com/avarei/function-pkl/internal/helper"
"github.com/crossplane-contrib/function-pkl/internal/helper"
"github.com/crossplane/function-sdk-go/logging"
"sigs.k8s.io/yaml"
)
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/crossplane/function-sdk-go"

fn "github.com/avarei/function-pkl/internal/function"
"github.com/avarei/function-pkl/internal/pkl/reader"
fn "github.com/crossplane-contrib/function-pkl/internal/function"
"github.com/crossplane-contrib/function-pkl/internal/pkl/reader"
)

// CLI of this Function.
Expand Down
4 changes: 2 additions & 2 deletions pkl/crossplane-example/PklProject
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package {
"Tim Geimer <[email protected]>"
}
version = "0.1.19"
baseUri = "package://pkg.pkl-lang.org/github.com/avarei/function-pkl/\(name)"
baseUri = "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/\(name)"
packageZipUrl = "https://github.com/Avarei/function-pkl/releases/download/\(name)@\(version)/\(name)@\(version).zip"
sourceCode = "https://github.com/Avarei/function-pkl"
license = "Apache-2.0"
Expand All @@ -36,6 +36,6 @@ dependencies {
uri = "package://pkg.pkl-lang.org/pkl-k8s/[email protected]"
}
["crossplane"] {
uri = "package://pkg.pkl-lang.org/github.com/avarei/function-pkl/[email protected]"
uri = "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]"
}
}
4 changes: 2 additions & 2 deletions pkl/crossplane-example/PklProject.deps.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"schemaVersion": 1,
"resolvedDependencies": {
"package://pkg.pkl-lang.org/github.com/avarei/function-pkl/crossplane@0": {
"package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/crossplane@0": {
"type": "remote",
"uri": "projectpackage://pkg.pkl-lang.org/github.com/avarei/function-pkl/[email protected]",
"uri": "projectpackage://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]",
"checksums": {
"sha256": "1e0c1917b0dfe0390d11954e0417c6e41c8a4bdbea23d36db5cb6dc2671c9027"
}
Expand Down
2 changes: 1 addition & 1 deletion pkl/crossplane/PklProject
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package {
"Tim Geimer <[email protected]>"
}
version = "0.0.29"
baseUri = "package://pkg.pkl-lang.org/github.com/avarei/function-pkl/\(name)"
baseUri = "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/\(name)"
packageZipUrl = "https://github.com/Avarei/function-pkl/releases/download/\(name)@\(version)/\(name)@\(version).zip"
sourceCode = "https://github.com/Avarei/function-pkl"
license = "Apache-2.0"
Expand Down

0 comments on commit e690927

Please sign in to comment.