Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Error Ensuring Firewall rules when running on Clusters in a Shared VPC #217

@boredabdel

Description

@boredabdel

Hi,

I'm having an issue with kubemci trying to create a multi cluster ingress across two clusters that are attached to a sharedvpc.

Shared VPC in project A. This is the Host project
Cluster 1 in project B Attached to the Shared VPC in project A
Cluster 2 in project B Attached to the Shared VPC in project A

Same service running on both clusters listening to the same node port.

I0227 15:24:45.316852 52427 gen.go:5430] GCEFirewalls.Insert(context.Background, Key{"mci1-fr--nginx-mci"}, ...): projectID = PROJECT_B, rk = &{ProjectID:PROJECT_B Operation:Insert Version:ga Service:Firewalls}
I0227 15:24:45.408566 52427 gen.go:5441] GCEFirewalls.Insert(context.Background, Key{"mci1-fr--nginx-mci"}, ...) = googleapi: Error 400: Invalid value for field 'resource.network': 'https://www.googleapis.com/compute/v1/projects/PROJECT_A/global/networks/PROJECT_A'. Cross project referencing is not allowed for this resource., invalid
Error ensuring firewall rule: Error googleapi: Error 400: Invalid value for field 'resource.network': 'https://www.googleapis.com/compute/v1/projects/PROJECT_A/global/networks/PROJECT_A
. Cross project referencing is not allowed for this resource., invalid in ensuring firewall rule
Error: Error in creating load balancer: 1 error occurred:

What i think happens is the following

1 - kubemci check the project hosting the cluster (PROJECT_B in my case) for a specific firewall rule.
2 - The call fails, so it calls the EnsureFirewallRule function to create those.
3 - The call fails because the API called behind apparently doesn't support creating a firewall rule in a different project then the one where the call is made. hence the error "Cross project referencing is not allowed for this resource"

I understand that kubemci is trying to create fw rules for the LB Health Check and Backend Service IP Ranges. But we could create those in the shared VPC project manually or via a script. will it be possible to have a flag to kubemci to skip trying to create firewall rules ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions