Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Some resources not available with kubectl get ... (Client.Timeout exceeded while awaiting headers) #590

Closed
1 task done
Bluesboy opened this issue Jul 24, 2024 · 2 comments
Labels
bug Something isn't working needs:triage

Comments

@Bluesboy
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

  • compute.gcp.upbound.io/v1beta1 - Subnetwork

maybe some others

Resource MRs required to reproduce the bug

Subnetwork

Steps to Reproduce

apiVersion: compute.gcp.upbound.io/v1beta1
kind: Subnetwork
metadata:
  name: cloudrun-eu
  annotations:
    crossplane.io/external-name: cloudrun
    region: europe-west1
  labels:
    example.com/subnet: cloudrun
    example.com/region: europe-west1
spec:
  forProvider:
    ipCidrRange: 172.21.0.0/23
    network: "example-net"
    region: europe-west1

What happened?

I'm trying to deploy Cloud Run service with Direct VPC Access enabled. Working with fresh Crossplane installation. To enable VPC Access Cloud Run needs VPC subnetwork, so I'm trying to create Subnet with Crossplane. When there is no Subnetwork manifests present in the cluster kubectl get subnetworks gives me:

No resources found

which is fine, but if I apply any Subnetwork MR to the cluster kubectl get subnetworks returns error:

Error from server: conversion webhook for compute.gcp.upbound.io/v1beta1, Kind=Subnetwork failed: Post "https://upbound-provider-gcp-compute.crossplane-system.svc:9443/convert?timeout=30s": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

resource itself is created, but I can't see its status and, which is more concerning, Argo CD can't determine it as well.

I turned on debug log for upbound-provider-gcp-compute and sometimes it's throwing bunch of errors like this

k8s.io/[email protected]/tools/cache/reflector.go:229: failed to list *v1beta1.Subnetwork: subnetworks.compute.gcp.upbound.io is forbidden: User "system:serviceaccount:crossplane-system:upbound-provider-gcp-compute-dcb094af7952" cannot list resource "subnetworks" in API group "compute.gcp.upbound.io" at the cluster scope

k8s.io/[email protected]/tools/cache/reflector.go:229: Failed to watch *v1beta1.Subnetwork: failed to list *v1beta1.Subnetwork: subnetworks.compute.gcp.upbound.io is forbidden: User "system:serviceaccount:crossplane-system:upbound-provider-gcp-compute-dcb094af7952" cannot list resource "subnetworks" in API group "compute.gcp.upbound.io" at the cluster scope

not only for subnets, actually all CRDs of the provider are mentioned

I have other GKE cluster for testing purposes in other GCP project and everything works completely fine there.

Relevant Error Output Snippet

No response

Crossplane Version

1.16.0

Provider Version

1.5.0

Kubernetes Version

v1.29.6-gke.1038001

Kubernetes Distribution

GKE

Additional Info

No response

@Bluesboy Bluesboy added bug Something isn't working needs:triage labels Jul 24, 2024
@Bluesboy
Copy link
Author

Sorted out the issue — for some reason GKE Control Plane was blocked by firewall on this particular cluster. Added firewall rule to allow ingress traffic from GKE Control Plane network to Crossplane webhook port (9443) in cluster network. Now everything seems fine. Though I still not understand why I haven't had this issue for other MRs (GlobalAddress for example always was fine)

@turkenf
Copy link
Collaborator

turkenf commented Jul 24, 2024

I'm glad your problem was solved. I didn't look at it in detail, but the answer to your question may be that there is only the v1beta1 version of the GlobalAddress resource, and there is no need for conversion webhook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs:triage
Projects
None yet
Development

No branches or pull requests

2 participants