-
Notifications
You must be signed in to change notification settings - Fork 0
Feature upgrade docs #2
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b341335
Upgrade to latest versions
mcgin314 e40b99f
Created simple example for local testing/validation
mcgin314 322083b
Strate documentation in README
mcgin314 127f9e8
Terraform fmt, should be a hook
mcgin314 d5d7e55
Add changelog to README
mcgin314 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,77 @@ | ||
| # tfmod-prometheus | ||
|
|
||
| Prometheus is an open source monitoring and alerting tool designed for dynamic cloud systems and especially well suited for monitoring microservice architectures. Prometheus collects and stores metrics as time series data. Metrics are a key means in understanding an applications behavior and a critical facet of operations support. Collectively, "it collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true." - [prometheus.io](https://prometheus.io/) | ||
|
|
||
| This modules uses Helm to deploy Prometheus to a cluster using the official chart. By default this will install dependent charts/components: | ||
| - [alertmanager](https://github.com/prometheus-community/helm-charts/tree/main/charts/alertmanager) | ||
| - [kube-state-metrics](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics) | ||
| - [prometheus-node-exporter](https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-node-exporter) | ||
| - [prometheus-pushgateway](https://github.com/walker-tom/helm-charts/tree/main/charts/prometheus-pushgateway) | ||
|
|
||
| Versions are module variables, but latest versions are intended to be be reflected in the default values. | ||
|
|
||
| # CHANGELOG | ||
|
|
||
| * 0.0.1 -- 2024-07-23 | ||
| - updated to latest versions for all components and helm chart (defined in default variables) | ||
| - created content in the README | ||
| - created changelog | ||
|
|
||
| <!-- BEGIN_TF_DOCS --> | ||
| ## Requirements | ||
|
|
||
| | Name | Version | | ||
| |------|---------| | ||
| | <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13 | | ||
| | <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.14.0 | | ||
| | <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 2.11.0 | | ||
| | <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | >= 2.23.0 | | ||
| | <a name="requirement_null"></a> [null](#requirement\_null) | >= 3.2.1 | | ||
|
|
||
| ## Providers | ||
|
|
||
| | Name | Version | | ||
| |------|---------| | ||
| | <a name="provider_helm"></a> [helm](#provider\_helm) | >= 2.11.0 | | ||
| | <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | >= 2.23.0 | | ||
|
|
||
| ## Modules | ||
|
|
||
| | Name | Source | Version | | ||
| |------|--------|---------| | ||
| | <a name="module_images"></a> [images](#module\_images) | git@github.e.it.census.gov:terraform-modules/aws-ecr-copy-images.git/ | 2.0.2 | | ||
|
|
||
| ## Resources | ||
|
|
||
| | Name | Type | | ||
| |------|------| | ||
| | [helm_release.prometheus](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource | | ||
| | [kubernetes_namespace.ns](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace) | resource | | ||
| | [kubernetes_namespace.existing-ns](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/data-sources/namespace) | data source | | ||
|
|
||
| ## Inputs | ||
|
|
||
| | Name | Description | Type | Default | Required | | ||
| |------|-------------|------|---------|:--------:| | ||
| | <a name="input_alertmanager_tag"></a> [alertmanager\_tag](#input\_alertmanager\_tag) | The image tag of the alertmanager image. | `string` | `"v0.27.0"` | no | | ||
| | <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | The name of the cluster into which prometheus will be installed. | `string` | n/a | yes | | ||
| | <a name="input_create_namespace"></a> [create\_namespace](#input\_create\_namespace) | Indicates whether the `namespace` needs to be created ('true') or already exists (not `true`) | `bool` | `true` | no | | ||
| | <a name="input_kube_state_metrics_tag"></a> [kube\_state\_metrics\_tag](#input\_kube\_state\_metrics\_tag) | The image tag of the kube-state-metrics image. | `string` | `"v2.13.0"` | no | | ||
| | <a name="input_namespace"></a> [namespace](#input\_namespace) | The namespace to install the prometheus components. Defaults to 'prometheus' | `string` | `"prometheus"` | no | | ||
| | <a name="input_node_exporter_tag"></a> [node\_exporter\_tag](#input\_node\_exporter\_tag) | The image tag of the node-exporter image. | `string` | `"v1.8.2"` | no | | ||
| | <a name="input_profile"></a> [profile](#input\_profile) | AWS\_PROFILE to use to apply the terraform script. | `string` | `""` | no | | ||
| | <a name="input_prometheus_chart_version"></a> [prometheus\_chart\_version](#input\_prometheus\_chart\_version) | The version of prometheus to install into the cluster. | `string` | `"25.24.1"` | no | | ||
| | <a name="input_prometheus_config_reloader_tag"></a> [prometheus\_config\_reloader\_tag](#input\_prometheus\_config\_reloader\_tag) | The image tag of the prometheus-config-reloader image. | `string` | `"v0.75.1"` | no | | ||
| | <a name="input_prometheus_server_tag"></a> [prometheus\_server\_tag](#input\_prometheus\_server\_tag) | The image tag of prometheus server to install into the cluster. | `string` | `"v2.53.1"` | no | | ||
| | <a name="input_pushgateway_tag"></a> [pushgateway\_tag](#input\_pushgateway\_tag) | The image tag of the pushgateway image. | `string` | `"v1.9.0"` | no | | ||
| | <a name="input_rwo_storage_class"></a> [rwo\_storage\_class](#input\_rwo\_storage\_class) | Specify the storage class for read/write/once persistent volumes. | `string` | `"gp3-encrypted"` | no | | ||
|
|
||
| ## Outputs | ||
|
|
||
| | Name | Description | | ||
| |------|-------------| | ||
| | <a name="output_alertmanager_headless_internal_endpoint"></a> [alertmanager\_headless\_internal\_endpoint](#output\_alertmanager\_headless\_internal\_endpoint) | n/a | | ||
| | <a name="output_alertmanager_internal_endpoint"></a> [alertmanager\_internal\_endpoint](#output\_alertmanager\_internal\_endpoint) | n/a | | ||
| | <a name="output_prometheus_server_internal_endpoint"></a> [prometheus\_server\_internal\_endpoint](#output\_prometheus\_server\_internal\_endpoint) | n/a | | ||
| | <a name="output_pushgateway_internal_endpoint"></a> [pushgateway\_internal\_endpoint](#output\_pushgateway\_internal\_endpoint) | n/a | | ||
| <!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| provider "aws" { | ||
| profile = local.profile | ||
| region = local.region | ||
| } | ||
|
|
||
| provider "helm" { | ||
| kubernetes { | ||
| host = data.aws_eks_cluster.cluster.endpoint | ||
|
|
||
| cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority[0].data) | ||
| token = data.aws_eks_cluster_auth.cluster.token | ||
| } | ||
| } | ||
|
|
||
| provider "kubernetes" { | ||
| host = data.aws_eks_cluster.cluster.endpoint | ||
|
|
||
| cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority[0].data) | ||
| token = data.aws_eks_cluster_auth.cluster.token | ||
| } | ||
|
|
||
| data "aws_eks_cluster" "cluster" { | ||
| name = local.cluster_name | ||
| } | ||
|
|
||
| data "aws_eks_cluster_auth" "cluster" { | ||
| name = local.cluster_name | ||
| } | ||
|
|
||
| locals { | ||
| region = "us-gov-east-1" | ||
| profile = "terraform" | ||
| cluster_name = "platform-test-1" | ||
| namespace = "prometheus" | ||
| create_namespace = "true" | ||
|
Comment on lines
+31
to
+35
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. bad juju |
||
|
|
||
| # tags = { | ||
| # project_number = "fs0000000078" | ||
| # project_name = "csvd_platformbaseline" | ||
| # project_role = "csvd_platformbaseline_app" | ||
| # organization = "census:ocio:csvd" | ||
| # created_by = "luther.coleman.mcginty@census.gov" | ||
| # created_for = "luther.coleman.mcginty@census.gov" | ||
| # created_reason = "Testing eks module operation" | ||
| # Terraform = "true" | ||
| # Terragrunt = "true" | ||
| # test_adjustment = "testing adding tags" | ||
| # } | ||
| } | ||
|
|
||
| module "prometheus" { | ||
| source = "../.." | ||
|
|
||
| profile = local.profile | ||
| cluster_name = local.cluster_name | ||
| namespace = local.namespace | ||
| create_namespace = local.create_namespace | ||
| } | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
if we are writing the sample for TG, then we should use provider generate in the terragrunt.hcl?
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.
I didn't really imagine ever trying the sample with Terragrunt. What I've been doing is testing each module just in pure Terraform with one of these examples and cover Terragrunt in another pass. I could be adding an additional step, but in my head I've wanted to be certain everything is right with the module in TF before introducing TG. If you think it's extra work, could save ourselves some time by skipping.