-
Notifications
You must be signed in to change notification settings - Fork 304
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
Firewall rule required message ignores existing rules (shared VPC) #485
Comments
@bluemalkin Why are you creating your own firewall rule? The purpose of ingress-gce is that it manages that rule for you. |
@rramkumar1 it doesn't manage firewall rules for you. It simply outputs the gcloud command for you. |
@bluemalkin I'm not following... who is outputting the gcloud command? Can you paste the event you are seeing? |
Are you using ingress-gce in a Shared VPC environment? |
External load balancer: Internal load balancer: They both require the firewall rules to be strictly as expected, including the description. |
See here: ingress-gce/pkg/firewalls/firewalls.go Line 102 in b04a367
There might be difference between the existing and expected firewall rules. Could you also paste the command that we want you to run, please? |
Here's what
|
@bowei yes shared VPC |
Thanks for the event messages. If you are using custom tags, one solution to keep you from spamming firewall change events is to create a duplicate firewall rule right as suggested, meanwhile have your own firewall rule overriding it. |
The reason why I do not run the commands provided is because I automate my whole infrastructure with Terraform.
Here's the terraform code:
|
If this really bothers you, you can simply grant compute.networkAdmin and compute.securityAdmin to your GKE service account of the service project. I am trying to find a better way to tackle this issue. It may take some time. There might be a way to manually set the node-tags even before they are created. ingress-gce/deploy/glbc/gce.conf Line 7 in b04a367
|
Thanks, giving Admin permissions to the cluster is not going to go down well. Looking forward on how to silent those messages, perhaps a global flag in Ingress annotations to completely ignore firewall management ? |
Hi, I come across this while digging the same issue and have a comment, i don't think "granting compute.networkAdmin and compute.securityAdmin to your GKE service account of the service project." is the solution for this as it defeats the whole purpose of SharedVPC (separating network admin and security privileges from user privileges). IMO this creates a security loop whole, So proving a way to silence those alerts is the way to go. Cheers |
@abdelsource Yes I couldn't agree more. |
/kind bug |
Hi @grayluck. Thanks for working on this. Is it available on Has the google cloud documentation been updated too early or am I doing something wrong? Here is an example of the apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.global-static-ip-name: some-static-ip-name
networking.gke.io/suppress-firewall-xpn-error: true
name: app
namespace: some-namespace
spec:
backend:
serviceName: app
servicePort: 80
tls:
- hosts:
- some.host.com
secretName: some-tls-secret |
@m1kola Unfortunately, the docs were updated before this annotation was rolled out on GKE. Due to some delays outside of our control, this will only be rolling out next week. |
This is now available in version at or above 1.11.3-gke.18. /close |
@rramkumar1: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Unfortunately this annotation doesn't stop the service from trying to grant the firewall permission.
But in Cloud Logging, I see an error every 10 minutes Is there a way to totally stop this entirely with a shared VPC ? |
The annotation you mentioned above only suppressed the warning when you kubectl describe the ingress. The ingress controller continues to try to create the required firewall rules (Share vpc or not) there is no option to turn that off. Since the ingress controller is not getting any new features anymore i don't think we will release a way to turn off firewall rules creation anytime soon. The Good news is that the logs you see in the shared vpc host project are audit logs, you don't pay for those. But i understand they are noisy. I suggest you just filter them out when you are looking at logs |
Thanks - is there a replacement one ? |
The main focus is on the new Gateway API and Gateway Controller https://cloud.google.com/kubernetes-engine/docs/concepts/gateway-api. But it doesn't have all the features our ingress controller has yet. It's a work in progress |
I've created my own firewall rule with custom tags on the GKE node pools to allow the Google health checks.
Despite creating the rule and that everything works, I still get the event message:
gcloud compute firewall-rules create k8s-fw-l7--b1a36f0a2cbc5f47 --network xxx --description "GCE L7 firewall rule" --allow tcp:30000-32767 --source-ranges 130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16 --target-tags xxx --project xxx
It should check for any existing rule first.
The text was updated successfully, but these errors were encountered: