Skip to content

Commit f20f1a6

Browse files
Merge pull request #66 from stevendborrelli/v0.5.0
update README.md
2 parents 9f80d86 + 7cbef42 commit f20f1a6

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

README.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
`function-tag-manager` is a [Crossplane](https://crossplane.io) function that allows
44
Platform Operators to manage Cloud tags on managed resources.
55

6-
Currently only AWS resources that support tags are managed.
6+
Currently only AWS resources that support tags are managed, and starting with
7+
version v0.5.0 v2 Namespace and Cluster-scoped resources are supported.
78

89
There several use cases for this Function:
910

@@ -23,7 +24,7 @@ kind: Function
2324
metadata:
2425
name: crossplane-contrib-function-tag-manager
2526
spec:
26-
package: xpkg.upbound.io/crossplane-contrib/function-tag-manager:v0.4.0
27+
package: xpkg.upbound.io/crossplane-contrib/function-tag-manager:v0.5.0
2728
```
2829
2930
## Using this Function in a Composition
@@ -36,14 +37,14 @@ created Desired State. Below is an example pipeline step:
3637
functionRef:
3738
name: crossplane-contrib-function-tag-manager
3839
input:
39-
apiVersion: tag-manger.fn.crossplane.io/v1beta1
40+
apiVersion: tag-manager.fn.crossplane.io/v1beta1
4041
kind: ManagedTags
4142
addTags:
4243
- type: FromValue
4344
policy: Replace
4445
tags:
45-
from: value
46-
add: tags
46+
key1: value1
47+
key2: value2
4748
- type: FromCompositeFieldPath
4849
fromFieldPath: spec.parameters.additionalTags
4950
policy: Replace
@@ -79,8 +80,8 @@ The `FromCompositeField` type indicates that the tags will be imported from the
7980
- type: FromValue
8081
policy: Replace
8182
tags:
82-
from: value
83-
add: tags
83+
key1: value1
84+
key2: value2
8485
- type: FromCompositeFieldPath
8586
fromFieldPath: spec.parameters.additionalTags
8687
policy: Replace
@@ -156,8 +157,10 @@ metadata:
156157

157158
This function currently supports a subset of AWS that allow setting of tags.
158159

159-
A scan of the 1.14 AWS provider shows that 475 resources support tags and 482 do not.
160-
The Provider CRDs were scanned to generate the list in [filter.go](filter.go).
160+
A scan of the v2.2.0 AWS provider shows that 498 resources support tags and 477 do not. Starting with the 2.x provider both Cluster
161+
and Namespace-scoped resources are supported, so for each resource there are two Custom Resource Definitions.
162+
163+
The Provider CRDs were scanned using [`cmd/generator/main.go`](cmd/generator/main.go) to generate the list in [filter.go](filters/zz_provider-upjet-aws.go).
161164

162165
## Developing this Function
163166

@@ -167,11 +170,15 @@ $ go generate ./...
167170
168171
# Run tests
169172
$ go test -cover ./...
170-
ok github.com/stevendborrelli/function-tag-manager 0.398s coverage: 67.9% of statements
171-
github.com/stevendborrelli/function-tag-manager/input/v1beta1 coverage: 0.0% of statements
173+
ok github.com/crossplane-contrib/function-tag-manager 0.542s coverage: 68.6% of statements
174+
ok github.com/crossplane-contrib/function-tag-manager/cmd/generator 1.035s coverage: 43.2% of statements
175+
github.com/crossplane-contrib/function-tag-manager/cmd/generator/render coverage: 0.0% of statements
176+
github.com/crossplane-contrib/function-tag-manager/filters coverage: 0.0% of statements
177+
github.com/crossplane-contrib/function-tag-manager/input/v1beta1 coverage: 0.0% of statements
172178
173179
# Lint the code
174-
$ docker run --rm -v $(pwd):/app -v ~/.cache/golangci-lint/v1.61.0:/root/.cache -w /app golangci/golangci-lint:v1.61.0 golangci-lint run
180+
$ docker run --rm -v $(pwd):/app -v ~/.cache/golangci-lint/v2.6.1:/root/.cache -w /app golangci/golangci-lint:v2.6.1 golangci-lint run
181+
0 issues.
175182
176183
# Build a Docker image - see Dockerfile
177184
$ docker build .
@@ -212,5 +219,5 @@ crossplane xpkg build -f package --embed-runtime-image=function-tag-manager -o f
212219
I use the `up` binary to push to the [Upbound Marketplace](https://marketplace.upbound.io)
213220

214221
```shell
215-
up xpkg push xpkg.upbound.io/crossplane-contrib/function-tag-manager:v0.4.0 -f function-tag-manager.xpkg
222+
up xpkg push xpkg.upbound.io/crossplane-contrib/function-tag-manager:v0.5.0 -f function-tag-manager.xpkg
216223
```

0 commit comments

Comments
 (0)