Skip to content

Commit

Permalink
feat: Fixed the readme.yaml (#15)
Browse files Browse the repository at this point in the history
* feat: Fixed the readme.yaml

* feat: Added description for variables

* feat: Modified ingress discription

* feat: Added example in README.yaml

* feat: Added examples in each addon
  • Loading branch information
AshutoshAM2002 authored Jan 25, 2024
1 parent 4101559 commit d681127
Show file tree
Hide file tree
Showing 9 changed files with 181 additions and 33 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ permissions: write-all
on:
push:
branches:
- feat/addons
- master
paths-ignore:
- '**/*README.md'
workflow_dispatch:

jobs:

readme-create:
uses: clouddrove/github-shared-workflows/.github/workflows/readme.yml@master
secrets:
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/terraform.yml

This file was deleted.

58 changes: 56 additions & 2 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,61 @@ prerequesties:

# description of this project
description: |-
A Terraform Addons module to customize & install widely used helmchart during or after creation of your AWS EKS cluster.
A Terraform Addons module to customize & install widely used helmchart during or after creation of your Google GKE cluster.
# extra content
include:
- "terraform.md"
- "terraform.md"

# How to use this project
# How to use this project
usage: |-
Here are some examples of how you can use this module in your inventory structure:
### addons basic example
```hcl
module "addons" {
source = "git::https://github.dev/clouddrove/terraform-google-gke-addons"
depends_on = [module.gke]
gke_cluster_name = module.gke.name
project_id = local.gcp_project_id
region = local.region
cluster_autoscaler = true
reloader = true
ingress_nginx = true
certification_manager = true
keda = true
}
```
### addons complete example
```hcl
module "addons" {
source = "git::https://github.dev/clouddrove/terraform-google-gke-addons"
gke_cluster_name = module.gke.name
project_id = local.gcp_project_id
region = local.region
cluster_autoscaler = false
reloader = false
ingress_nginx = false
certification_manager = false
keda = false
# -- Path of override-values.yaml file
cluster_autoscaler_helm_config = { values = [file("./config/override-cluster-autoscaler.yaml")] }
reloader_helm_config = { values = [file("./config/reloader/override-reloader.yaml")] }
ingress_nginx_helm_config = { values = [file("./config/override-ingress-nginx.yaml")] }
certification_manager_helm_config = { values = [file("./config/override-certification-manager.yaml")] }
keda_helm_config = { values = [file("./config/keda/override-keda.yaml")] }
# -- Override Helm Release attributes
cluster_autoscaler_extra_configs = var.cluster_autoscaler_extra_configs
reloader_extra_configs = var.reloader_extra_configs
ingress_nginx_extra_configs = var.ingress_nginx_extra_configs
certification_manager_extra_configs = var.certification_manager_extra_configs
keda_extra_configs = var.keda_extra_configs
}
```
20 changes: 20 additions & 0 deletions addons/cert-manager/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Certification Manager Helm Chart

Certification Manager is a Kubernetes addon to automate the management and issuance of TLS certificates from various issuing sources.
It will ensure certificates are valid and up to date periodically, and attempt to renew certificates at an appropriate time before expiry..

## Installation
Below terraform script shows how to use Certification Manager Terraform Addon, A complete example is also given [here](https://github.com/clouddrove/terraform-google-gke-addons/blob/master/_examples/complete/main.tf).

```hcl
module "addons" {
source = "git::https://github.dev/clouddrove/terraform-google-gke-addons"
depends_on = [module.gke]
gke_cluster_name = module.gke.name
project_id = local.gcp_project_id
region = local.region
certification_manager = true
```

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

Expand Down
22 changes: 22 additions & 0 deletions addons/cluster-autoscaler/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# Cluster Autoscaler Helm Chart

Cluster Autoscaler is a tool that automatically adjusts the size of the Kubernetes cluster when one of the following conditions is true:
- there are pods that failed to run in the cluster due to insufficient resources.
- there are nodes in the cluster that have been underutilized for an extended period of time and their pods can be placed on other existing nodes.

## Installation
Below terraform script shows how to use Cluster Autoscaler Terraform Addon, A complete example is also given [here](https://github.com/clouddrove/terraform-google-gke-addons/blob/master/_examples/complete/main.tf).

```hcl
module "addons" {
source = "git::https://github.dev/clouddrove/terraform-google-gke-addons"
depends_on = [module.gke]
gke_cluster_name = module.gke.name
project_id = local.gcp_project_id
region = local.region
cluster_autoscaler = true
}
```

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

Expand Down
34 changes: 34 additions & 0 deletions addons/ingress-nginx/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
# Ingress Nginx Helm Chart

ingress-nginx is an Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer.

## Installation
Below terraform script shows how to use Ingress Nginx Terraform Addon, A complete example is also given [here](https://github.com/clouddrove/terraform-google-gke-addons/blob/master/_examples/complete/main.tf).

- By default it will create 2 network load balancers 1 is internal type and 1 is internet facing type.
user can change this behaviour according to their need. They just have to change values in `/_example/complete/config/override-ingress-nginx.yaml` file. User can also add annotations according to their need or they can add their own config file by the same name.

- if user wants to change `namespace`, `chart version`, `timeout`, `atomic` and other helm artributes, A complete list of artributes is also given here [here](https://github.com/clouddrove/terraform-google-gke-addons/blob/master/addons/helm/main.tf#L3-L32). then they can change this in `/_example/complate/variable.tf` at
```bash
#--------------INGRESS NGINX------------
variable "ingress_nginx_extra_configs" {
type = any
default = {}
}
```

```bash
module "addons" {
source = "git::https://github.dev/clouddrove/terraform-google-gke-addons"

depends_on = [module.gke]
gke_cluster_name = module.gke.name
project_id = local.gcp_project_id
region = local.regio

ingress_nginx = true
ingress_nginx_extra_configs = var.ingress_nginx_extra_configs
ingress_nginx_helm_config = { values = ["${file("./config/override-ingress-nginx.yaml")}"] }
}
```
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements
Expand Down
20 changes: 20 additions & 0 deletions addons/keda/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Keda Helm Chart

KEDA allows for fine grained autoscaling (including to/from zero) for event driven Kubernetes workloads.

## Installation
Below terraform script shows how to use Keda Terraform Addon, A complete example is also given [here](https://github.com/clouddrove/terraform-google-gke-addons/blob/master/_examples/complete/main.tf).

```bash
module "addons" {
source = "git::https://github.dev/clouddrove/terraform-google-gke-addons"

depends_on = [module.gke]
gke_cluster_name = module.gke.name
project_id = local.gcp_project_id
region = local.region

keda = true
}
```

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

Expand Down
21 changes: 21 additions & 0 deletions addons/reloader/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# Reloader Helm Chart

Reloader manages the following AWS resources
- A Kubernetes controller to watch changes in ConfigMap and Secrets and do rolling upgrades on Pods with their associated Deployment, StatefulSet, DaemonSet and DeploymentConfig

## Installation
Below terraform script shows how to use Reloader Terraform Addon, A complete example is also given [here](https://github.com/clouddrove/terraform-google-gke-addons/blob/master/_examples/complete/main.tf).

```bash
module "addons" {
source = "git::https://github.dev/clouddrove/terraform-google-gke-addons"

depends_on = [module.gke]
gke_cluster_name = module.gke.name
project_id = local.gcp_project_id
region = local.region

reloader = true
}
```

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

Expand Down
12 changes: 7 additions & 5 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ variable "project_id" {
}

variable "gke_cluster_name" {
type = string
default = ""
description = "gke cluster name"
type = string
default = ""
}

variable "region" {
type = string
default = ""
description = "cluster region"
type = string
default = ""
}

#-----------CLUSTER AUTOSCALER------------------
Expand Down Expand Up @@ -66,7 +68,7 @@ variable "ingress_nginx_helm_config" {
}

variable "ingress_nginx" {
description = "Enable Reloader add-on"
description = "Enable Nginx ingress add-on"
type = bool
default = false
}
Expand Down

0 comments on commit d681127

Please sign in to comment.