Skip to content

Commit

Permalink
feat: Formatted all the code and added addons (#12)
Browse files Browse the repository at this point in the history
* feat-created file structure

* feat-added Networking,GKE.Addons code

* feat-created Network & GKE template and added addons

* feat- Created module for GKE

* feat- Create module for GKE addons

* feat- added terraform module for cluster autoscaler

* feat- added ingress code

* feat: update version.tf

* feat: Initial setup

* feat: modified cluster autoscaler

* feat: Removed unnessessary attributes

* feat: Created module for Ingress-Nginx

* feat: remove unneccessary data from main.tf

* feat: Added cert-manager addon

* feat: Modified as per review

* feat: Modified as per review

* feat: Modified as per review

* feat: Modified as per review comments

* feat: Modified as per review comments

* feat: Modified folder names

* feat: Modified keda addon

* feat: Added required workflows

* feat: Added tags and cluster version

* feat: Added tags to cluster

* feat: Resolved tfcheck

* feat: Resolved tfcheck

* feat: Resolved warnings

* feat: Resolved warnings

* feat: Resolved warnings

* feat: Resolved warnings

* feat: Resolved warnings

* feat: Resolved warnings

* feat: Resolved warnings

* feat: Resolved warnings

* feat: Resolved tfchecks

* feat: Resolved tfchecks

* feat: Resolved warnings

* feat: Resolved warnings

* feat: Modified readme.yaml

* feat: Checking readme workflow

* feat: Resolved readme github workflow

* feat: Modified readme workflow

* readme: Update add-on's readme

* feat: Checking readme.yaml

* feat: Testing readme.yaml

* feat: Added readme.yaml file

* feat: Modified REAME.yaml file

---------

Co-authored-by: clouddrove-ci <[email protected]>

* Testing readme

---------

Co-authored-by: Tanveer <[email protected]>
Co-authored-by: clouddrove-ci <[email protected]>
  • Loading branch information
3 people authored Jan 22, 2024
1 parent 75ec306 commit c4e496c
Show file tree
Hide file tree
Showing 71 changed files with 5,227 additions and 95 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Auto merge
on:
pull_request:
jobs:
auto-merge:
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected]
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
tfcheck: 'tf-checks-complete-example / Check code format'
...
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- "*"
workflow_dispatch:
jobs:
changelog:
call-workflow-changelog:
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@master
secrets: inherit
with:
branch: 'master'
branch: 'master'
80 changes: 38 additions & 42 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,50 @@
name: 'Create README.md file'
permissions: write-all

on:
push:
branches:
- master
- feat/addons
paths-ignore:
- '**/*README.md'
workflow_dispatch:

jobs:
readme:
name: 'readme-create'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@master

- name: 'Set up Python 3.7'
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: 'create readme'
uses: 'clouddrove/[email protected]'
with:
actions_subcommand: 'readme'
github_token: '${{ secrets.GITHUB }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- name: 'pre-commit check errors'
uses: pre-commit/[email protected]
continue-on-error: true
readme-create:
uses: clouddrove/github-shared-workflows/.github/workflows/readme.yml@master
secrets:
TOKEN: ${{ secrets.GITHUB }}
SLACK_WEBHOOK_TERRAFORM: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }}

- name: 'pre-commit fix erros'
uses: pre-commit/[email protected]
continue-on-error: true
# Create README for each Submodules
readme-create-addon:
name: 'Addon readme-create'
runs-on: ubuntu-latest
steps:
- name: Updating GitHub Token
env:
GITHUB_TOKEN: ${{ secrets.GITHUB }}
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV

- name: 'push readme'
uses: 'clouddrove/[email protected]'
continue-on-error: true
- name: checkout
uses: actions/checkout@master
with:
actions_subcommand: 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
ref: ${{ github.head_ref }}
token: ${{ env.GH_TOKEN }}

- name: 'Slack Notification'
uses: clouddrove/action-slack@v2
- name: Generate TF Docs
uses: terraform-docs/[email protected]
with:
status: ${{ job.status }}
fields: repo,author
author_name: 'CloudDrove'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
if: always()
working-dir: addons/cluster-autoscaler,addons/cert-manager,addons/ingress-nginx,addons/keda,addons/reloader
git-push: true
template: |-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
{{ .Content }}
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
git-push-user-name: "clouddrove-ci"
git-push-user-email: [email protected]
git-commit-message: "readme: Update add-on's readme"


15 changes: 15 additions & 0 deletions .github/workflows/tf-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: tf-checks
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
tf-checks-complete-example:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
with:
working_directory: './_examples/complete/'
tf-checks-basic-example:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
with:
working_directory: './_examples/basic/'
11 changes: 11 additions & 0 deletions .github/workflows/tflint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: tf-lint
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
tf-lint:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-lint.yml@master
secrets:
GITHUB: ${{ secrets.GITHUB }}
11 changes: 11 additions & 0 deletions .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: tfsec
permissions: write-all
on:
pull_request:
workflow_dispatch:
jobs:
tfsec:
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@master
secrets: inherit
with:
working_directory: '.'
25 changes: 8 additions & 17 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,23 @@
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#

# Name of this project
name : Terraform Module Template

name: Terraform GOOGLE GKE ADDONS
# License of this project
license: "APACHE"

# Canonical GitHub repo
github_repo: clouddrove/terraform-module-template
github_repo: clouddrove/terraform-google-gke-addons

# Badges to display
badges:
- name: "Latest Release"
image: "https://img.shields.io/github/release/clouddrove/terraform-module-template.svg"
url: "https://github.com/clouddrove/terraform-module-template/releases/latest"
image: "https://img.shields.io/github/release/clouddrove/terraform-google-gke-addons.svg"
url: "https://github.com/clouddrove/terraform-google-gke-addons/releases/latest"
- name: "tfsec"
image: "https://github.com/clouddrove/terraform-module-template/actions/workflows/tfsec.yml/badge.svg"
url: ""
image: "https://github.com/clouddrove/terraform-google-gke-addons/actions/workflows/tfsec.yml/badge.svg"
url: "https://github.com/clouddrove/terraform-google-gke-addons/actions/workflows/tfsec.yml"
- name: "Licence"
image: "https://img.shields.io/badge/License-APACHE-blue.svg"
url: "LICENSE.md"
Expand All @@ -31,14 +29,7 @@ prerequesties:

# description of this project
description: |-
Terraform module template to create new modules using this as baseline
A Terraform Addons module to customize & install widely used helmchart during or after creation of your AWS EKS cluster.
# extra content
include:
- "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:
```hcl
```
- "terraform.md"
14 changes: 14 additions & 0 deletions _examples/basic/locals.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
locals {
name = "helm-addons-test"
environment = "test"
region = "us-central1"
cluster_version = "1.28.3-gke.1203001"
gcp_project_id = "dev-env-3b53"
cluster_name = "test-cluster"
tags = {
Name = local.name
Environment = local.environment
GithubRepo = "terraform-helm-gke-addons"
GithubOrg = "clouddrove"
}
}
Loading

0 comments on commit c4e496c

Please sign in to comment.