Commit Graph

111 Commits

Author SHA1 Message Date
Philippe Scorsolini af4e6d7b73
Merge pull request #32 from crossplane/renovate/github-codeql-action-digest
Update github/codeql-action digest to ddccb87
2023-09-28 10:20:37 +02:00
Philippe Scorsolini 55c6e20f80
chore: make root NewLogger proxy logging.NewLogger
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
2023-09-28 08:49:26 +02:00
renovate[bot] 2516690130
Update github/codeql-action digest to ddccb87 2023-09-27 15:29:18 +00:00
Philippe Scorsolini 5b013ffc4d
feat: introduce logging and errors packages
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
2023-09-27 12:24:57 +02:00
Nic Cope 4fd5cc3d7a
Merge pull request #30 from negz/pointy
Make NewDesiredComposedResource return a pointer
2023-09-26 20:38:48 -07:00
Nic Cope d1dfe75ec7 Make NewDesiredComposedResource return a pointer
You're most likely going to want to add this to the map returned by
request.GetDesiredComposedResources then later pass that to
response.SetDesiredComposedResources. The map in question is a map of
resource name to *resource.DesiredComposed, so it's easiest if this
returns that type.

Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-09-26 19:39:38 -07:00
Nic Cope 2dfdc0a08f
Merge pull request #29 from crossplane/renovate/actions-checkout-digest
Update actions/checkout digest to 8ade135
2023-09-22 16:38:56 -07:00
renovate[bot] 326e629d76
Update actions/checkout digest to 8ade135 2023-09-22 19:34:20 +00:00
Philippe Scorsolini f53ddfff25
Merge pull request #28 from crossplane/renovate/google.golang.org-grpc-1.x
Update module google.golang.org/grpc to v1.58.2
2023-09-22 12:30:31 +02:00
renovate[bot] e7ca68b27d
Update module google.golang.org/grpc to v1.58.2 2023-09-22 01:53:16 +00:00
Nic Cope a4ada4f934
Merge pull request #27 from negz/dir-me-maybe
Allow falling through to the Insecure option
2023-09-20 15:55:43 -07:00
Nic Cope 51c94be4fc Allow falling through to the Insecure option
If --tls-certs-dir is the empty string (i.e. not specified), we try see
whether --insecure was supplied. If both are supplied, whichever was
supplied last wins. If neither are supplied, you'll get an error that
you didn't setup any credentials.

Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-09-20 15:50:59 -07:00
Philippe Scorsolini d5438afca9
Merge pull request #26 from crossplane/renovate/github-codeql-action-digest
Update github/codeql-action digest to 6a28655
2023-09-20 09:41:57 +02:00
renovate[bot] 222679f1b7
Update github/codeql-action digest to 6a28655 2023-09-19 11:09:13 +00:00
Nic Cope 1c15c0202e
Merge pull request #25 from negz/readyready
Load readiness from RunFunctionRequest
2023-09-18 13:50:31 -07:00
Nic Cope 5ca5c34a7f
Merge pull request #19 from crossplane/renovate/go.uber.org-zap-1.x
Update module go.uber.org/zap to v1.26.0
2023-09-18 13:48:48 -07:00
renovate[bot] e1f8bbe132
Update module go.uber.org/zap to v1.26.0 2023-09-18 20:27:18 +00:00
Nic Cope b845107b0e
Merge pull request #24 from negz/stringy
Make Ready enum a string
2023-09-18 13:26:33 -07:00
Nic Cope c6f16a9dca
Merge pull request #17 from crossplane/renovate/google.golang.org-grpc-1.x
Update module google.golang.org/grpc to v1.58.1
2023-09-18 13:04:35 -07:00
Nic Cope af486fa2d0
Merge pull request #23 from negz/maps-how-do-they-work
Improvements to `DesiredComposedResources` and `ObservedComposedResources`
2023-09-18 11:45:14 -07:00
Nic Cope 073167e7c6 Load readiness from RunFunctionRequest
Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-09-17 19:23:30 -07:00
Nic Cope 2b44902a15 Make Ready enum a string
This lets us print it (e.g. in logs) in a human-readable way. I
considered using stringer to generate String() methods, but I don't
think we really care about the size/perf benefits of this enum being an
integer.

Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-09-17 18:49:01 -07:00
Nic Cope fce65c0f3f Make desired resources map values pointers to struct
This makes it possible to mutate struct values while iterating over the
map of composed resources. I found myself naturally wanting to do this
while writing a Function. e.g.:

desired, _ = request.GetDesiredComposedResources(req)

for _, dr := range desired {
	dr.Ready = resource.ReadyTrue
}

_ = response.SetDesiredComposedResources(desired)

I haven't made the same change for observed resources, since they're
supposed to be read-only to a Function.

Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-09-15 19:01:21 -07:00
Nic Cope ef3a2e04d3 Remove DesiredComposedResources and ObserveComposedResources types
These just served to obfuscate what the types actually were - a map of
resource name to observed/desired composed resource structs.

Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-09-15 18:59:34 -07:00
renovate[bot] 4c1a59ba8a
Update module google.golang.org/grpc to v1.58.1 2023-09-14 21:44:56 +00:00
Nic Cope 245eb193dc
Merge pull request #18 from negz/bootstrap
Add the beginnings of a Function SDK
2023-09-14 14:44:11 -07:00
Nic Cope efbc0c116e
Merge pull request #16 from crossplane/renovate/codecov-codecov-action-4.x
Update codecov/codecov-action action to v4
2023-09-14 12:57:32 -07:00
Nic Cope bb50824c66
Merge pull request #15 from crossplane/renovate/docker-login-action-3.x
Update docker/login-action action to v3
2023-09-14 12:57:08 -07:00
Nic Cope 320f452e5e
Merge pull request #14 from crossplane/renovate/github-codeql-action-digest
Update github/codeql-action digest to 04daf01
2023-09-14 12:56:43 -07:00
renovate[bot] 083a870d62
Update codecov/codecov-action action to v4 2023-09-14 17:26:27 +00:00
renovate[bot] 6fe7d94e6c
Update github/codeql-action digest to 04daf01 2023-09-14 17:26:23 +00:00
Nic Cope 052329725e
Merge pull request #7 from crossplane/renovate/actions-checkout-4.x
Update actions/checkout action to v4
2023-09-13 16:05:31 -07:00
renovate[bot] d3901bd7ca
Update docker/login-action action to v3 2023-09-13 23:05:22 +00:00
Nic Cope 538a2b731b
Merge pull request #12 from crossplane/renovate/actions-cache-digest
Update actions/cache digest to 704facf
2023-09-13 16:05:16 -07:00
Nic Cope 8a61efee14
Merge pull request #10 from crossplane/renovate/google.golang.org-grpc-1.x
Update module google.golang.org/grpc to v1.58.0
2023-09-13 16:05:07 -07:00
Nic Cope fb2b40f8c6
Merge pull request #9 from crossplane/renovate/golang-1.x
Update dependency golang to v1.21.1
2023-09-13 16:04:58 -07:00
Nic Cope aa14712691
Merge pull request #6 from crossplane/renovate/aquasecurity-trivy-action-0.x
Update aquasecurity/trivy-action action to v0.12.0
2023-09-13 16:04:39 -07:00
Nic Cope ed7793c3cd
Merge pull request #13 from negz/bump
Replicate run_function.proto from c/c master
2023-09-13 16:03:42 -07:00
Nic Cope 8dd124b7a5 Add the beginnings of a Function SDK
I'm sure this won't be close to the end shape of this SDK, but I want to
start somewhere. This is essentially a few utilities I found I wanted
when writing https://github.com/crossplane-contrib/function-patch-and-transform

Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-09-12 05:45:19 -07:00
Nic Cope 14e07d23ed Replicate run_function.proto from c/c master
Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-09-11 17:34:09 -07:00
renovate[bot] 269ae96d66
Update actions/cache digest to 704facf 2023-09-08 15:58:00 +00:00
Nic Cope b88eb4ea43
Merge pull request #11 from negz/main
Sync with latest version of WIP c/c PR
2023-09-07 22:02:00 -07:00
Nic Cope 21ef1a8d4a Use the correct Go package name while we're at it
Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-09-07 06:32:22 -07:00
renovate[bot] 2c62fccbd4
Update module google.golang.org/grpc to v1.58.0 2023-09-06 22:51:35 +00:00
renovate[bot] 8ab6da211b
Update dependency golang to v1.21.1 2023-09-06 20:51:52 +00:00
Nic Cope fb50b8ac83 Sync with latest version of WIP c/c PR
https://github.com/crossplane/crossplane/pull/4500

Signed-off-by: Nic Cope <nicc@rk0n.org>
2023-09-06 08:00:38 -07:00
renovate[bot] 427e6dc79e
Update actions/checkout action to v4 2023-09-04 12:49:53 +00:00
renovate[bot] 87e8cb3f25
Update aquasecurity/trivy-action action to v0.12.0 2023-09-03 04:21:11 +00:00
Nic Cope 68555c3f1e
Merge pull request #3 from crossplane/renovate/github-codeql-action-digest
Update github/codeql-action digest to 00e563e
2023-09-02 17:55:07 -07:00
Nic Cope b71fe36b34
Merge pull request #2 from crossplane/renovate/actions-checkout-digest
Update actions/checkout digest to f43a0e5
2023-09-02 17:54:47 -07:00