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

fix pre-commit run #173

Merged
merged 1 commit into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions distributed-databases/cloudnative-postgres/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@
| Name | Source | Version |
|------|--------|---------|
| <a name="module_barman_backup_irsa"></a> [barman\_backup\_irsa](#module\_barman\_backup\_irsa) | github.com/aws-ia/terraform-aws-eks-blueprints-addons | ed27abc//modules/irsa |
| <a name="module_barman_restore_irsa"></a> [barman\_restore\_irsa](#module\_barman\_restore\_irsa) | github.com/aws-ia/terraform-aws-eks-blueprints-addons | ed27abc//modules/irsa |
| <a name="module_barman_s3_bucket"></a> [barman\_s3\_bucket](#module\_barman\_s3\_bucket) | terraform-aws-modules/s3-bucket/aws | ~> 3.0 |
| <a name="module_ebs_csi_driver_irsa"></a> [ebs\_csi\_driver\_irsa](#module\_ebs\_csi\_driver\_irsa) | terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks | ~> 5.14 |
| <a name="module_eks"></a> [eks](#module\_eks) | terraform-aws-modules/eks/aws | ~> 19.9 |
| <a name="module_eks_blueprints_kubernetes_addons"></a> [eks\_blueprints\_kubernetes\_addons](#module\_eks\_blueprints\_kubernetes\_addons) | github.com/aws-ia/terraform-aws-eks-blueprints-addons | ed27abc |
| <a name="module_eks_blueprints_kubernetes_addons"></a> [eks\_blueprints\_kubernetes\_addons](#module\_eks\_blueprints\_kubernetes\_addons) | github.com/aws-ia/terraform-aws-eks-blueprints-addons | 08650f |
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 3.0 |
| <a name="module_vpc_cni_irsa"></a> [vpc\_cni\_irsa](#module\_vpc\_cni\_irsa) | terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks | ~> 5.14 |

## Resources

| Name | Type |
|------|------|
| [aws_iam_policy.cnpg_buckup_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
| [helm_release.cloudnative_pg](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [kubectl_manifest.cnpg_grafana_cm](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [kubectl_manifest.cnpg_prometheus_rule](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [random_string.random](https://registry.terraform.io/providers/hashicorp/random/3.4.3/docs/resources/string) | resource |
| [aws_ami.eks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami) | data source |
Expand All @@ -58,7 +60,6 @@
| Name | Description |
|------|-------------|
| <a name="output_barman_backup_irsa"></a> [barman\_backup\_irsa](#output\_barman\_backup\_irsa) | ARN for Backup IAM ROLE |
| <a name="output_barman_restore_irsa"></a> [barman\_restore\_irsa](#output\_barman\_restore\_irsa) | ARN for Restore IAM ROLE |
| <a name="output_barman_s3_bucket"></a> [barman\_s3\_bucket](#output\_barman\_s3\_bucket) | Backup bucket |
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
18 changes: 9 additions & 9 deletions distributed-databases/cloudnative-postgres/addons.tf
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
module "eks_blueprints_kubernetes_addons" {
source = "github.com/aws-ia/terraform-aws-eks-blueprints-addons?ref=08650f"

cluster_name = module.eks.cluster_name
cluster_endpoint = module.eks.cluster_endpoint
cluster_version = module.eks.cluster_version
oidc_provider = module.eks.oidc_provider
oidc_provider_arn = module.eks.oidc_provider_arn
cluster_name = module.eks.cluster_name
cluster_endpoint = module.eks.cluster_endpoint
cluster_version = module.eks.cluster_version
oidc_provider = module.eks.oidc_provider
oidc_provider_arn = module.eks.oidc_provider_arn

#---------------------------------------
#---------------------------------------
# Amazon EKS Managed Add-ons
#---------------------------------------
eks_addons = {
aws-ebs-csi-driver = {
service_account_role_arn = module.ebs_csi_driver_irsa.iam_role_arn
preserve = true
preserve = true
}
coredns = {
preserve = true
}
vpc-cni = {
service_account_role_arn = module.vpc_cni_irsa.iam_role_arn
preserve = true
preserve = true
}
kube-proxy = {
preserve = true
}
}
enable_kube_prometheus_stack = true
enable_kube_prometheus_stack = true
kube_prometheus_stack_helm_config = {
namespace = "monitoring"
values = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ spec:
updateInterval: 300
primaryUpdateStrategy: unsupervised
serviceAccountTemplate:
# For backup and restore, we use IRSA for barman tool.
# You will find this IAM role on terraform outputs.
# For backup and restore, we use IRSA for barman tool.
# You will find this IAM role on terraform outputs.
metadata:
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::<<account_id>>:role/cnpg-on-eks-prod-irsa
eks.amazonaws.com/role-arn: arn:aws:iam::<<account_id>>:role/cnpg-on-eks-prod-irsa
postgresql:
parameters:
shared_buffers: 256MB
Expand Down Expand Up @@ -50,9 +50,9 @@ spec:
name: app-auth
backup:
barmanObjectStore:
# For backup, we S3 backet to store data.
# For backup, we S3 backet to store data.
# On this Blueprint, we create an S3 check the terraform output for it.
destinationPath: s3://<your-s3-barman-bucket> # ie: s3://xxxx-cnpg-barman-bucket
destinationPath: s3://<your-s3-barman-bucket> # ie: s3://xxxx-cnpg-barman-bucket
s3Credentials:
inheritFromIAMRole: true
wal:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:

backup:
barmanObjectStore:
destinationPath: s3://<your-s3-barman-bucket>/restore # ie: s3://xxxx-cnpg-barman-bucket
destinationPath: s3://<your-s3-barman-bucket>/restore # ie: s3://xxxx-cnpg-barman-bucket
s3Credentials:
inheritFromIAMRole: true
wal:
Expand All @@ -54,7 +54,7 @@ spec:
externalClusters:
- name: prod
barmanObjectStore:
destinationPath: s3://<your-s3-barman-bucket> # ie: s3://xxxx-cnpg-barman-bucket
destinationPath: s3://<your-s3-barman-bucket> # ie: s3://xxxx-cnpg-barman-bucket
s3Credentials:
inheritFromIAMRole: true
wal:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ allowVolumeExpansion: true
parameters:
csi.storage.k8s.io/fstype: xfs
type: gp3
encrypted: "true"
encrypted: "true"
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ parameters:
encrypted: "true"
type: io2
iopsPerGB: "50"

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--
-- PostgreSQL port of the MySQL "World" database.
--
-- The sample data used in the world database is Copyright Statistics
-- The sample data used in the world database is Copyright Statistics
-- Finland, http://www.stat.fi/worldinfigures.
--

Expand Down Expand Up @@ -5385,4 +5385,3 @@ COMMIT;
ANALYZE city;
ANALYZE country;
ANALYZE countrylanguage;

4 changes: 2 additions & 2 deletions distributed-databases/cloudnative-postgres/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ module "eks" {
}

tags = {
Name = "doeks-node-grp"
Name = "doeks-node-grp"
}
}
}
}
}
2 changes: 1 addition & 1 deletion distributed-databases/cloudnative-postgres/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ output "barman_backup_irsa" {
output "barman_s3_bucket" {
description = "Backup bucket"
value = module.barman_s3_bucket.s3_bucket_id
}
}
2 changes: 1 addition & 1 deletion distributed-databases/cloudnative-postgres/resources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ resource "aws_iam_policy" "cnpg_buckup_policy" {
description = "IAM role policy for CloudNativePG Barman Tool"
name = "${local.name}-barman-irsa"
policy = data.aws_iam_policy_document.cnpg_backup.json
}
}
8 changes: 4 additions & 4 deletions website/docs/distributed-databases/cloudnative-postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ aws eks describe-cluster --name cnpg-on-eks
Update local kubeconfig so we can access kubernetes cluster

```bash
aws eks update-kubeconfig --name cnpg-on-eks --region us-west-2
aws eks update-kubeconfig --name cnpg-on-eks --region us-west-2
```

First, lets verify that we have worker nodes running in the cluster.
Expand Down Expand Up @@ -166,8 +166,8 @@ spec:
updateInterval: 300
primaryUpdateStrategy: unsupervised
serviceAccountTemplate:
# For backup and restore, we use IRSA for barman tool.
# You will find this IAM role on terraform outputs.
# For backup and restore, we use IRSA for barman tool.
# You will find this IAM role on terraform outputs.
metadata:
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::<<account_id>>:role/cnpg-on-eks-prod-irsa #1
Expand Down Expand Up @@ -197,7 +197,7 @@ spec:
name: app-auth
backup:
barmanObjectStore:
# For backup, we S3 bucket to store data.
# For backup, we S3 bucket to store data.
# On this Blueprint, we create an S3 check the terraform output for it.
destinationPath: s3://<your-s3-barman-bucket> #2
s3Credentials:
Expand Down