crossplane-contrib / provider-upjet-gcp

GCP Provider for Crossplane.
https://marketplace.upbound.io/providers/upbound/provider-family-gcp/
Apache License 2.0
66 stars 72 forks source link

[Bug]: Matching by selector doesn't work for some resources #568

Open Bluesboy opened 3 months ago

Bluesboy commented 3 months ago

Is there an existing issue for this?

Affected Resource(s)

compute.gcp.upbound.io/v1beta2 - BackendService compute.gcp.upbound.io/v1beta2 - URLMap compute.gcp.upbound.io/v1beta2 - GlobalForwardingRule

Resource MRs required to reproduce the bug

Backend Service manifest:

apiVersion: compute.gcp.upbound.io/v1beta2
kind: BackendService
metadata:
  name: example-backend-service
  labels:
    example-label: test-selector
spec:
  forProvider:
    loadBalancingScheme: EXTERNAL_MANAGED

URLMap manifest:

apiVersion: compute.gcp.upbound.io/v1beta2
kind: URLMap
metadata:
  name: example-url-map
  labels:
    example-label: test-selector
spec:
  forProvider:
    defaultServiceSelector:
      matchLabels:
        example-label: test-selector

Steps to Reproduce

Create BackendService resource, refer it in URLMap resource and apply it.

What happened?

ReconcileError in URLMap resourse

Relevant Error Output Snippet

cannot resolve references: mg.Spec.ForProvider.DefaultService: no resources matched selector

Crossplane Version

1.16.0

Provider Version

1.5.0

Kubernetes Version

v1.30.1-gke.1329003

Kubernetes Distribution

GKE

Additional Info

Same thing happening with GlobalForwardingRule, if I refer by selector to TargetHTTPProxy with targetSelector, however ipAddressSelector works fine.

If I'm trying to refer to the BackendService with defaultServiceRef, resource give me cannot resolve references: mg.Spec.ForProvider.DefaultService: cannot get referenced resource: BackendBucket.compute.gcp.upbound.io "example-backend-service" not found

github-actions[bot] commented 1 week ago

This provider repo does not have enough maintainers to address every issue. Since there has been no activity in the last 90 days it is now marked as stale. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.