-
Notifications
You must be signed in to change notification settings - Fork 103
feat: transition from standalone prometheus to kube-prometheus-stack #70
Changes from all commits
3b9b97d
269efa1
39ce4f5
178f8cf
63c4837
263aed6
ca5d32a
dcc9617
2cf217d
646977f
6686f48
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,9 +28,8 @@ vpc - defines and installs the VPC and subnets to use with EKS | |
| └─logagent - deploys a logging agent (filebeat) to the EKS cluster | ||
| └─certmgr - deploys the open source cert-manager.io helm chart to the EKS cluster | ||
| └─prometheus - deploys prometheus server, node exporter, and statsd collector for metrics | ||
| └─grafana - deploys the grafana visualization platform | ||
| └─observability - deploys the OTEL operator and instantiates a simple collector | ||
| └─sirius - deploys the Bank of Sirus application to the EKS cluster | ||
| └─observability - deploys the OTEL operator and instantiates a simple collector | ||
| └─sirius - deploys the Bank of Sirus application to the EKS cluster | ||
|
|
||
| ``` | ||
|
|
||
|
|
@@ -146,15 +145,40 @@ deployment. | |
| ### Prometheus | ||
|
|
||
| Prometheus is deployed and configured to enable the collection of metrics for all components that have | ||
| properties `prometheus.io:scrape: true` set in the annotations | ||
| (along with any other connection information). This includes the prometheus `node-exporter` | ||
| daemonset which is deployed in this step as well. | ||
| a defined service monitor. At installation time, the deployment will instantiate: | ||
| - Node Exporters | ||
| - Kubernetes Service Monitors | ||
| - Grafana preloaded with dashboards and datasources for Kubernetes management | ||
| - The NGINX Ingress Controller | ||
| - Statsd receiver | ||
|
|
||
| The former behavior of using the `prometheus.io:scrape: true` property set in the annotations | ||
| indicating pods where metrics should be scraped has been deprecated, and these annotations will | ||
| be removed in the near future. | ||
|
|
||
| Also, the standalone Grafana deployment has been removed from the standard deployment scripts, but has been left as | ||
| a project in the event someone wishes to run this standalone. | ||
|
|
||
| Finally, this namespace will hold service monitors created by other projects, for example the Bank of Sirius | ||
| deployment currently deploys a service monitor for each of the postgres monitors that are deployed. | ||
|
|
||
| Notes: | ||
| 1. The NGINX IC needs to be configured to expose prometheus metrics; this is currently done by default. | ||
| 2. The default address binding of the `kube-proxy` component is set to `127.0.0.1` and as such will cause errors when the | ||
| canned prometheus scrape configurations are run. The fix is to set this address to `0.0.0.0`. An example manifest | ||
| has been provided in [prometheus/extras](./prometheus/extras) that can be applied against your installation with | ||
| `kubectl apply -f ./filename`. Please only apply this change once you have verified that it will work with your | ||
| version of Kubernetes. | ||
| 3. The _grafana_ namespace has been maintained in the conifugration file to be used by the prometheus operator deployed | ||
| version of Grafana. This version only accepts a password; you can still specify a username for the admin account but it | ||
| will be silently ignored. | ||
|
|
||
| This also pulls data from the NGINX KIC, provided the KIC is configured to allow prometheus access (which is enabled by | ||
| default). | ||
|
|
||
| ### Grafana | ||
|
|
||
| **NOTE:** This deployment has been deprecated but the project has been left as an example on how to deploy Grafana in this | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's just delete and point folks to the git history. We don't want to carry this forward. Thoughts?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I went back and forth on this. Part of me wanted to delete it, but then another part started down the "well, what if the user wants to swap out prometheus for something else and still wants grafana?" If we go to a modular approach where the user runs a script and answers prompts as to what they want / don't want, I feel that just keeping it in place (preferably with a few tests around it to make sure it works) would be fine - since I'm pulling from the mainline grafana builds, we could just manage it like the other dependencies. That said, I'm not married to this idea - so let me know what you think in light of that.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I say, let's delete it. It will always be in the source history and we can always come back and add it again after we have better support for multiple options.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deleted in last commit. |
||
| architecture. | ||
|
|
||
| Grafana is deployed and configured with a connection to the prometheus datasource installed above. At the time of this | ||
| writing, the NGINX Plus KIC dashboard is installed as part of the initial setup. Additional datasources and dashboards | ||
| can be added by the user either in the code, or via the standard Grafana tooling. | ||
|
|
@@ -188,7 +212,10 @@ As part of the Bank of Sirius deployment, we deploy a cluster-wide | |
| [self-signed](https://cert-manager.io/docs/configuration/selfsigned/) | ||
| issuer using the cert-manager deployed above. This is then used by the Ingress object created to enable TLS access to | ||
| the application. Note that this Issuer can be changed out by the user, for example to use the | ||
| [ACME](https://cert-manager.io/docs/configuration/acme/) issuer. | ||
| [ACME](https://cert-manager.io/docs/configuration/acme/) issuer. The use of the ACME issuer has been tested and works | ||
| without issues, provided the FQDN meets the length requirements. As of this writing the AWS ELB hostname is too long | ||
| to work with the ACME server. Additional work in this area will be undertaken to provide dynamic DNS record creation | ||
| as part of this process so legitimate certificates can be issued. | ||
|
|
||
| In order to provide visibility into the Postgres databases that are running as part of the application, the Prometheus | ||
| Postgres data exporter will be deployed into the same namespace as the application and will be configured to be scraped | ||
|
|
@@ -204,4 +231,6 @@ provides better tools for hierarchical configuration files. | |
|
|
||
| In order to help enable simple load testing, a script has been provided that uses the | ||
| `kubectl` command to port-forward monitoring and management connections to the local workstation. This command | ||
| is [`test-foward.sh`](./extras/test-forward.sh) and is located in the [`extras`](./extras) directory. | ||
| is [`test-foward.sh`](./extras/test-forward.sh) and is located in the [`extras`](./extras) directory. | ||
|
|
||
| **NOTE:** This script has been modified to use the new Prometheus Operator based deployment. | ||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be a security issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on everything I read, no, because:
So, I view it as most likely safe - but I'm leaving it as something that everyone can decide for themselves if they want to run or not. I suppose once we get more of an automated process in place we can have this as a 'do you want to run this y/n" prompt.