diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b1284e3..a9af013 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,9 +29,9 @@ env: #XPKG_REPO: xpkg.upbound.io/${{ github.repository_owner }} # Names for the Configuration and corresponding Function Packages - XPKG_NAME: ${{ github.event.repository.name }} - # The function package - XPKG_FN_NAME: ${{ github.event.repository.name }}-function + XPKG_NAME: configuration-template-typescript + # The function package name. We can use the repo name. + XPKG_FN_NAME: ${{ github.event.repository.name }} jobs: # Compute the package version once and share it with all jobs that need it diff --git a/env b/env index c099df8..4221eca 100644 --- a/env +++ b/env @@ -1,6 +1,6 @@ VERSION=$(npm pkg get version | tr -d '"') -CONFIGURATION_NAME=$(npm pkg get name | tr -d '"') -FN_NAME=${CONFIGURATION_NAME}-function +CONFIGURATION_NAME=$(npm pkg get name | tr -d '"' | sed -e s/function/configuration/) +FN_NAME=$(npm pkg get name | tr -d '"') # Change this to your docker repo XPKG_REPO=ghcr.io/crossplane diff --git a/examples/functions.yaml b/examples/functions.yaml index 674d91a..4781c06 100644 --- a/examples/functions.yaml +++ b/examples/functions.yaml @@ -2,12 +2,13 @@ apiVersion: pkg.crossplane.io/v1beta1 kind: Function metadata: - name: upbound-function-template-typescript-function + name: crossplane-function-template-typescript annotations: # This tells crossplane beta render to connect to the function locally. + # "npm run local" will run a local version of the function. render.crossplane.io/runtime: Development spec: - package: xpkg.upbound.io/crossplane/function-template-typescript:v0.1.0 + package: ghcr.io/crossplane/function-template-typescript:v0.2.0 --- apiVersion: pkg.crossplane.io/v1beta1 kind: Function diff --git a/package-configuration/apis/apps/composition.yaml b/package-configuration/apis/apps/composition.yaml index 2227b21..dc5d940 100644 --- a/package-configuration/apis/apps/composition.yaml +++ b/package-configuration/apis/apps/composition.yaml @@ -9,7 +9,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: upbound-function-template-typescript-function + name: crossplane-function-template-typescript step: app - functionRef: name: crossplane-contrib-function-auto-ready diff --git a/package-configuration/crossplane.yaml b/package-configuration/crossplane.yaml index 4a873aa..95a1d55 100644 --- a/package-configuration/crossplane.yaml +++ b/package-configuration/crossplane.yaml @@ -2,7 +2,7 @@ apiVersion: meta.pkg.crossplane.io/v1 kind: Configuration metadata: - name: function-template-typescript + name: configuration-template-typescript annotations: meta.crossplane.io/maintainer: Crossplane Maintainers meta.crossplane.io/source: https://github.com/crossplane/function-template-typescript @@ -18,17 +18,19 @@ spec: crossplane: version: ">=v1.17.0-0" dependsOn: + # Make this match your function + - apiVersion: pkg.crossplane.io/v1 + kind: Function + package: ghcr.io/crossplane/function-template-typescript + version: ">=v0.2.0" + # Automatically set ready status for resources + - apiVersion: pkg.crossplane.io/v1 + kind: Function + package: xpkg.upbound.io/crossplane-contrib/function-auto-ready + version: ">=v0.6.0" # Example provider dependency # - apiVersion: pkg.crossplane.io/v1 # kind: Provider # package: xpkg.upbound.io/upbound/provider-aws-ec2 # version: v2 - - apiVersion: pkg.crossplane.io/v1 - kind: Function - package: xpkg.upbound.io/crossplane-contrib/function-auto-ready - version: ">=v0.6.0" - # Make this match your function - - apiVersion: pkg.crossplane.io/v1 - kind: Function - package: xpkg.upbound.io/upbound/function-template-typescript-function - version: ">=v0.1.0" +