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

add node-exporter to allowed ports #6944

Merged
merged 1 commit into from
May 14, 2019

Conversation

zetaab
Copy link
Member

@zetaab zetaab commented May 13, 2019

The problem what we currently have in openstack is that node-exporter does not work correctly. The default behaviour in kube-prometheus is that it will expose node-exporter using hostnetwork https://github.com/coreos/kube-prometheus/blob/master/manifests/node-exporter-daemonset.yaml#L68 this means that port 9100 should be open to prometheus itself (running in normal nodes).

Screenshot 2019-05-13 at 13 00 06

After I opened 9100 port ingress in both master+node SG it works

/sig openstack
/kind feature

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 13, 2019
@k8s-ci-robot k8s-ci-robot requested review from drekle and robinpercy May 13, 2019 10:18
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zetaab

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 13, 2019
PortRangeMax: i(9100),
}
// allow 9100 port from nodeSG
addDirectionalGroupRule(c, masterSG, nodeSG, nodeExporterIngress)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drekle is this correct? so I want that 9100 port in master security group is open when connecting from nodeSG

Copy link
Contributor

@drekle drekle May 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is correctly interpreted. Perhaps you can find better wording for the function.

@k8s-ci-robot k8s-ci-robot added area/provider/openstack Issues or PRs related to openstack provider kind/feature Categorizes issue or PR as related to a new feature. labels May 13, 2019
@@ -294,6 +294,26 @@ func (b *FirewallModelBuilder) addKubeletRules(c *fi.ModelBuilderContext, sgMap
return nil
}

// addNodeExporterRules - Allow 9100 TCP port from nodesg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe that Kops can be responsible for deploying prometheus, or prometheus-operator. Kops cant be responsible for the security groups of applications it's not also responsible for managing.

I think we can use additionalSecurityGroups as defined in the instance group spec to enable this, though it seems more manual. Additionally we might provide a way to declare in the spec that you need additional security groups created.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this same deployment (kube-prometheus) works fine in aws kops clusters. @chrisz100 @mikesplain do you have idea should we allow this or not? Should openstack behave in similar way than aws?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually need this too. Still interested in thoughts from @chrisz100 and @mikesplain, however I think I will approve this for now and come up with any other solutions I feel might be more appropriate as needed.

We still have the flexibility of changing things as this is still labeled alpha.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 14, 2019
@k8s-ci-robot k8s-ci-robot merged commit f2bd5a5 into kubernetes:master May 14, 2019
@zetaab zetaab deleted the allow_node_exporter branch May 14, 2019 17:41
k8s-ci-robot added a commit that referenced this pull request May 14, 2019
k8s-ci-robot added a commit that referenced this pull request May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/openstack Issues or PRs related to openstack provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants