Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ This template provides a full Typescript project for developing Crossplane funct
The initial [src/function.ts](src/function.ts) creates sample Deployment, Ingress, Service, and ServiceAccount resources and can be customized to
create any type of Kubernetes resource.

For an example of configuring cloud resources, refer to [configuration-aws-network-ts](https://github.com/upbound/configuration-aws-network-ts).

## Running the Example Package

The configuration and function are published to the [Upbound Marketplace](https://marketplace.upbound.io),
Expand Down Expand Up @@ -154,7 +156,7 @@ To develop Compositions using Typescript, the following is recommended:
│ └── main.ts # Entry point and server setup
├── test-cases/ # YAML-based test cases
│ ├── README.md # Test case documentation
│ └── example-full.yaml # Example test case
│ └── example.yaml # Example test case
├── examples/ # Example Crossplane resources
│ ├── apps/ # Example application resources
│ └── functions.yaml # Function pipeline configuration
Expand Down Expand Up @@ -259,7 +261,7 @@ node dist/main.js --insecure --debug
Once the function is running locally, `crossplane render` can be used to render examples:

```shell
crossplane render examples/app/example-full.yaml package-configuration/apis/apps/composition.yaml examples/functions.yaml
crossplane render examples/app/example.yaml package-configuration/apis/apps/composition.yaml examples/functions.yaml
```

### Available CLI Options
Expand Down Expand Up @@ -533,7 +535,7 @@ Create YAML test cases in the [test-cases/](test-cases/) directory. Each test ca
- Input: The observed composite resource and context
- Expected: Resource counts, types, and validation rules

See [test-cases/example-full.yaml](test-cases/example-full.yaml) for an example. Tests use [src/test-helpers.ts](src/test-helpers.ts) to load and validate YAML test cases.
See [test-cases/example.yaml](test-cases/example.yaml) for an example. Tests use [src/test-helpers.ts](src/test-helpers.ts) to load and validate YAML test cases.

## TypeScript Configuration

Expand Down
4 changes: 2 additions & 2 deletions test-cases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ name: Test Case Name
description: Optional description of what this test validates

# Load the composite resource from an external file
xrPath: examples/apps/example-full.yaml
xrPath: examples/apps/example.yaml

expected:
# Expected number of resources to be created
Expand Down Expand Up @@ -136,7 +136,7 @@ expected:
{
"name": "Test Case Name",
"description": "Optional description",
"xrPath": "examples/apps/example-full.yaml",
"xrPath": "examples/apps/example.yaml",
"expected": {
"resourceCount": 4,
"resourceTypes": ["Deployment", "Service", "ServiceAccount", "Ingress"]
Expand Down