crossplane / upjet

A code generation framework and runtime for Crossplane providers
Apache License 2.0
319 stars 89 forks source link

add crossplane-external-name tag to external resources #409

Open LCaparelli opened 6 months ago

LCaparelli commented 6 months ago

Description of your changes

Ensures a new tag containing the value set to the external-name annotation exists in external resources.

Fixes #408

I kinda didn't wait for discussion to pan out on the issue, and I understand if this is not at all the direction we want to take. Just thought it'd be nice to present a problem along with a possible solution. If you have concerns about the direction, please feel free to chime in at the issue or ping me directly on Crossplane's Slack.

I have:

How has this code been tested

I have pulled provider-aws-upjet locally, checked out at the v1.5.0 tag, pointed the dependency to this branch using go.mod replace, built the EC2 provider and deployed it in our development environments. All EC2 managed resources now have this additional tag.

LCaparelli commented 6 months ago

In order to make my fork work, I had to manually assign RBAC permissions to the generated ServiceAccount:

rules:
- apiGroups:
  - aws.upbound.io
  resources:
  - providerconfigs
  - providerconfigs/status
  - providerconfigusages
  - providerconfigusages/status
  - storeconfigs
  - storeconfigs/status
  verbs:
  - '*'

I think it might be because I only built the EC2 provider, and not the entire family. Honestly I'm not sure. I don't see how this change could interfere with that, so I'm guessing this is unrelated, but appreciate any pointers.

ulucinar commented 5 months ago

Hi @LCaparelli, Would you like to discuss this proposal in the next sig-upjet meeting, which is scheduled for Wednesday, June 5 at 3:00pm GMT?

LCaparelli commented 5 months ago

@ulucinar thanks, I would love to, but at that time I'll be on a holiday trip. Maybe o the next one?

I'm able to discuss async at #408 until then.

jbw976 commented 5 months ago

@ulucinar feel free to checkout the recording of @LCaparelli presenting on this topic: https://github.com/crossplane/upjet/issues/408#issuecomment-2145458535

LCaparelli commented 5 months ago

@ulucinar I added/suggested a discussion topic to SIG Upjet's meeting backlog