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 1670700: *: add support for etcd metrics proxy #517

Merged
merged 1 commit into from
Apr 3, 2019

Conversation

hexfusion
Copy link
Contributor

@hexfusion hexfusion commented Mar 1, 2019

This PR adds support for new TLS assets to support the etcd metrics proxy. This proxy will create a separate chain of trust for metrics consumer which will not give allow access to server data directly. The proxy itself is a feature of etcd called the grpc-proxy. By exposing a separate metrics port on the server and then using the proxy to listen to that port we eliminate direct gRPC transactions.

The grpc-proxy forwards only /metrics endpoint requests to the server.

/cc @brancz @abhinavdahiya

depends on: openshift/installer#1291 merged

@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 Mar 1, 2019
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 1, 2019
@runcom
Copy link
Member

runcom commented Mar 1, 2019

@hexfusion could you please also add a target for these PRs (4.0 or 4.1 or next)? We're after freeze and if this is a feature I'd love someone like Clayton or Derek or Eric or others to approve

@runcom
Copy link
Member

runcom commented Mar 1, 2019

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 1, 2019
@kikisdeliveryservice
Copy link
Contributor

Is this for 4.0 or 4.1?

@brancz
Copy link

brancz commented Mar 6, 2019

As mentioned in openshift/installer#1291, this needs to land in 4.0.

@runcom
Copy link
Member

runcom commented Mar 6, 2019

e2es are failing with starting kube though, could you take a look?

/retest

@runcom runcom added the 4.0 label Mar 6, 2019
@hexfusion
Copy link
Contributor Author

working through this now

@hexfusion
Copy link
Contributor Author

I am building

/var/opt/openshift/tls/etcd-metrics-ca-bundle.crt
/var/opt/openshift/tls/etcd-metrics-signer-client.crt
/var/opt/openshift/tls/etcd-metrics-signer-client.key
/var/opt/openshift/tls/etcd-metrics-signer-server.crt
/var/opt/openshift/tls/etcd-metrics-signer-server.key

But bootstrap wants different so back to the installer.

Mar 06 13:32:06 ip-10-0-5-133 bootkube.sh[29781]: F0306 13:32:06.133573       1 bootstrap.go:111] error rendering bootstrap manifests: open /etc/ssl/etcd/metrics-ca.crt: no such file or directory

@hexfusion hexfusion force-pushed the add_proxy branch 3 times, most recently from 935cc96 to d308d79 Compare March 6, 2019 17:34
@hexfusion
Copy link
Contributor Author

/test e2e-aws

@hexfusion
Copy link
Contributor Author

We have a little bit of a chicken and egg issue here :) as bootstrap depends on itself from the installer.

@hexfusion hexfusion changed the title [WIP] *: add support for etcd metrics proxy and deploy TLS assets. *: add support for etcd metrics proxy and deploy TLS assets. Mar 6, 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 6, 2019
RootCAData []byte `json:"rootCAData"`

// Metrics
EtcdMetricsServerCertData []byte `json:"etcdMetricsServerCertData"`
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to use objectrefs for secret object.

}
)

func init() {
rootCmd.AddCommand(bootstrapCmd)
bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.etcdCAFile, "etcd-ca", "/etc/ssl/etcd/ca.crt", "path to etcd CA certificate")
bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.etcdMetricsCAFile, "etcd-metrics-ca", "", "path to etcd metrics CA certificate")
bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.etcdMetricsServerCertFile, "etcd-metrics-server-crt", "", "path to etcd metrics server certificate")
bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.etcdMetricsServerKeyFile, "etcd-metrics-server-key", "", "path to etcd metrics server key")
Copy link
Member

@runcom runcom Mar 6, 2019

Choose a reason for hiding this comment

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

AIUI, these flags should provide a dummy/default value for this PR to not depend on the installer. After this goes in, you can land the installer PR and then create another PR here to remove the dummy/default value to always honor what bootkube gives you.

(this is not changing or adding images from the release payload so it should be an easier dance)

/cc @cgwalters

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok sounds good that was my thought as well.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 7, 2019
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 7, 2019
@brancz
Copy link

brancz commented Mar 7, 2019

I can see the metrics client cert in the e2e test artifacts 🎉 now just need to satisfy CI I guess :)

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 1, 2019
@hexfusion
Copy link
Contributor Author

@abhinavdahiya PTAL

/cc @brancz

@kikisdeliveryservice
Copy link
Contributor

@hexfusion does this have/need an exception granted?

cc: @runcom

@hexfusion
Copy link
Contributor Author

@hexfusion does this have/need an exception granted?

Yeah @kikisdeliveryservice monitoring will chime in, probably tomorrow.

@s-urbaniak
Copy link
Contributor

/approve
... if the invariants expressed in openshift/installer#1483 (review) still hold.

Note that I do not have the authority to grant exceptions though! This must be done higher level.

@runcom
Copy link
Member

runcom commented Apr 2, 2019

cc @smarterclayton

@s-urbaniak
Copy link
Contributor

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 2, 2019
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 3, 2019
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
@hexfusion
Copy link
Contributor Author

We have a confirmation on this exception from @derekwaynecarr.

/cc @runcom

@hexfusion hexfusion changed the title *: add support for etcd metrics proxy BUG 1670700: *: add support for etcd metrics proxy Apr 3, 2019
@runcom
Copy link
Member

runcom commented Apr 3, 2019

just saw that, thanks

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hexfusion, runcom, s-urbaniak

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 Apr 3, 2019
@hexfusion
Copy link
Contributor Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 3, 2019
@openshift-merge-robot openshift-merge-robot merged commit c1ba218 into openshift:master Apr 3, 2019
@s-urbaniak
Copy link
Contributor

@runcom @hexfusion awesome, thanks for the hard work ... now let's see if etcd appears in monitoring! 🎉

@hexfusion hexfusion deleted the add_proxy branch April 3, 2019 14:34
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants