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

pkg/asset/tls: add etcd metrics assets #1291

Merged
merged 2 commits into from
Mar 5, 2019

Conversation

hexfusion
Copy link
Contributor

@hexfusion hexfusion commented Feb 21, 2019

This PR is to start a conversation about using etcd grpc-proxy to provide TLS trust separation between etcd server and monitoring. The idea here is to provide monitoring a root CA which they can own giving access to etcd metrics but not etcd server directly. etcd grpc-proxy will only forward GET requests to etcd server /metrics endpoint.

/cc @abhinavdahiya

Blocking: openshift/machine-config-operator#517.

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 21, 2019
@hexfusion hexfusion force-pushed the etcd_metrics branch 5 times, most recently from 593858d to ae0953a Compare February 25, 2019 15:04
@hexfusion
Copy link
Contributor Author

/test e2e-aws

)

// EtcdMetricsProxyCA is the asset that generates the etcd-metrics-proxy-ca key/cert pair.
// [DEPRECATED]
Copy link
Contributor

Choose a reason for hiding this comment

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

a new asset is already deprecated? ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah started with your template but I see where you are going now will clean that up, thanks for the feedback!

@abhinavdahiya
Copy link
Contributor

we are moving towards dropping root-ca from all chains. some examples #1232

@hexfusion hexfusion force-pushed the etcd_metrics branch 2 times, most recently from 60926f0 to d20c0d3 Compare February 26, 2019 16:20
@hexfusion
Copy link
Contributor Author

@abhinavdahiya does this look more inline with what you are expecting?

@hexfusion hexfusion changed the title [WIP] pkg/asset/tls: add etcd metrics proxy assets pkg/asset/tls: add etcd metrics assets Feb 26, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 26, 2019
@hexfusion
Copy link
Contributor Author

/test e2e-aws

@hexfusion hexfusion changed the title pkg/asset/tls: add etcd metrics assets [WIP] pkg/asset/tls: add etcd metrics assets Feb 28, 2019
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 28, 2019
@hexfusion hexfusion changed the title [WIP] pkg/asset/tls: add etcd metrics assets pkg/asset/tls: add etcd metrics assets Mar 1, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 1, 2019
@hexfusion
Copy link
Contributor Author

@abhinavdahiya PTAL

security_group_id = "${aws_security_group.master.id}"

protocol = "tcp"
from_port = 23790
Copy link
Contributor

Choose a reason for hiding this comment

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

can you get approval to use that port openshift/origin#21520

@@ -145,6 +153,9 @@ func (m *Manifests) generateBootKubeManifests(dependencies asset.Parents) []*ass
EtcdCaCert: string(etcdCA.Cert()),
EtcdClientCert: base64.StdEncoding.EncodeToString(etcdClientCertKey.Cert()),
EtcdClientKey: base64.StdEncoding.EncodeToString(etcdClientCertKey.Key()),
EtcdMetricsCaCert: string(etcdMetricsSignerCertKey.Cert()),
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@abhinavdahiya I would like to keep it like this if possible. It feels like we could drop the CA Bundle config but maybe I am missing something?

Copy link
Contributor

Choose a reason for hiding this comment

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

this seems to used for https://github.com/openshift/installer/pull/1291/files#diff-626d6cfa425c30cb6c099ebc5324d25b
I think we should use the CABundle asset for this for consistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack will adjust

@abhinavdahiya
Copy link
Contributor

@hexfusion this is LGTM.

@hexfusion
Copy link
Contributor Author

@abhinavdahiya rebased commits. WRT openshift/origin#21520 would it preferred to drop into the 9xxx port range or just wait for verification. I have no strong feeling on the port.

Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
@hexfusion
Copy link
Contributor Author

[root@ip-10-0-172-22 ~]# ss -ltn | grep -Eo ':[9][0-9]{3}' | sort --unique
:9100
:9101
:9537

@hexfusion
Copy link
Contributor Author

/cc @brancz

@brancz
Copy link
Contributor

brancz commented Mar 5, 2019

Generally 👍 from me as not having etcd metrics is a regression from 3.11, and it's by far the most important component to be monitored. This must be in 4.0.

Copy link
Contributor

@abhinavdahiya abhinavdahiya left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 5, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, hexfusion

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 5, 2019
@openshift-merge-robot openshift-merge-robot merged commit c91cdbc into openshift:master Mar 5, 2019
@hexfusion hexfusion deleted the etcd_metrics branch March 5, 2019 16:10
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. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants