-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
I should be able to serve metrics over https #396
Comments
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: 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. |
@lilic Do we need to reopen this? Don't think we have this yet. |
I am working on this right now. /reopen |
@lilic: Reopened 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. |
/remove-lifecycle rotten |
TLS metrics for operators deployed in Open Shift 4.xThe following is based on how kube-state-metrics secures TLS metrics endpoint in Open Shift. For Kubernetes we will add documentation to describe how to secure the metrics endpoints, this is because there is no native solution for this in kubernetes itself. kubebuilder suggests using kube-rbab-proxy and cert-manager for this, and they do not enable this by default but you have to opt in. We can provide docs and example manifests how to do this and users can follow that. TLS in Open Shift 4.xWe need to add the annotation to the service object before the operator is deployed, as we reference the created secret in the deployment itself. So all of these reasources need to be created before the operator starts. So the Service, ServiceMonitor objects will be created using manifest files instead of programitcly as we do right now, this is just for openshift right now. We need a new subcommand The content of the deploy-openshift directory:
Content of operator.yaml - deployment manifest file:
content of the service.yaml file:
content of the service-monitor.yaml file:
Those are the only changes to the files we need to make. Open questions
|
cc @estroz @shawn-hurley @hasbro17 @AlexNPavel @joelanford Can you let me know if you have any objections, otherwise will start implementing the above. Thanks! |
A deployment can reference a non-existent secret in a volume mount, and if/when the secret does exist, the replica containers will successfully create. Given that, the secret and deployment creation order should be fundamentally irrelevant (modulo any peripheral concerns, e.g. backoff time re-creating the container if there are initial failures due to the absence of the secret). It wasn't clear to me from your statement whether we agree on that assumption. I'm not sure if it would affect your design one way or another, but it's something that stood out to me. |
Yes it can reference it, but currently, we create the |
@lilic I think your elaboration on the current behavior completed the picture for me. Thank you! Your proposal sounds good to me. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
/lifecycle frozen |
If I am not misunderstanding the goal of this task, is not it solved with https://github.com/brancz/kube-rbac-proxy which is used by default in the new layout? See https://github.com/operator-framework/operator-sdk-samples/blob/master/go/kubebuilder/memcached-operator/config/rbac/auth_proxy_service.yaml. |
This will be done once the ansible plugin is complete: #3488. |
The ansible plugin is merged 👍 Closing this one. |
Currently the
ExposeMetricsPort()
does not allow us to serve metrics over https.I propose that we add an options struct, this will allow a user to specify the certs (maybe even they can generate with the TLS certs?) or if nothing is set, then this happens as it currently works.
We would need to introduce a breaking change to this function. We could just introduce a new function but my vote would be to break the API and have it accept an options struct.
The text was updated successfully, but these errors were encountered: