Skip to content

Commit

Permalink
Adding Tags to the module.
Browse files Browse the repository at this point in the history
  • Loading branch information
VaijanathB committed Jan 9, 2019
1 parent 9a5363c commit 602c9b9
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 1 deletion.
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@

# Contributing
The Application Gateway Ingress Controller allows the [Azure Application Gateway](https://azure.microsoft.com/en-us/services/application-gateway/) to be used as the ingress for an [Azure Kubernetes Service](https://azure.microsoft.com/en-us/services/kubernetes-service/) aka AKS cluster. As shown in the figure below, the ingress controller runs as a pod within the AKS cluster. It consumes [Kubernetes Ingress Resources](https://kubernetes.io/docs/concepts/services-networking/ingress/) and converts them to an Azure Application Gateway configuration which allows the gateway to load-balance traffic to Kubernetes pods.

This module helps in deploying the necessary resources for the greenfield deployment of necessary resources for AKS cluster with Application Gateway as ingress controller.

![Azure Application Gateway + AKS](https://github.com/Azure/application-gateway-kubernetes-ingress/blob/master/docs/images/architecture.png)

## Setup
* **Greenfield Deployment**: If you are starting from scratch, refer to these [installation](docs/install-new.md) instructions which outlines steps to deploy an AKS cluster with Application Gateway and install application gateway ingress controller on the AKS cluster.

## Usage
Refer to the [tutorials](https://github.com/Azure/application-gateway-kubernetes-ingress/blob/master/docs/tutorial.md) to understand how you can expose an AKS service over HTTP or HTTPS, to the internet, using an Azure Application Gateway.

## Usage of the module
```hcl
module "appgw-ingress-k8s-cluster" {
source = "Azure/appgw-ingress-k8s-cluster/azurerm"
version = "0.1.0"
resource_group_name = "myapp"
location = "westus"
aks_service_principal_app_id = "<App ID of the service principal>"
aks_service_principal_client_secret = "<Client secret of the service principal>"
aks_service_principal_object_id = "<Object ID of the service principal>"
tags = {
environment = "dev"
costcenter = "it"
}
}
```

## Authors
Originally created by [Vaijanath Angadihiremath](http://github.com/VaijanathB)
# Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.
Expand Down
55 changes: 55 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
variable "resource_group_name" {
description = "Name of the resource group."
default = "aksrg1"
}

variable "location" {
description = "Location of the cluster."
default = "Central US"
}

variable "aks_service_principal_app_id" {
description = "Application ID/Client ID of the service principal. Used by AKS to manage AKS related resources on Azure like vms, subnets."
default = ""
Expand All @@ -13,11 +23,21 @@ variable "aks_service_principal_object_id" {
default = ""
}

variable "virtual_network_name" {
description = "Virtual network name"
default = "aksVirtualNetwork"
}

variable "virtual_network_address_prefix" {
description = "Containers DNS server IP address."
default = "15.0.0.0/8"
}

variable "aks_subnet_name" {
description = "AKS Subnet Name."
default = "kubesubnet"
}

variable "aks_subnet_address_prefix" {
description = "Containers DNS server IP address."
default = "15.0.0.0/16"
Expand All @@ -28,11 +48,33 @@ variable "app_gateway_subnet_address_prefix" {
default = "15.1.0.0/16"
}

variable "app_gateway_name" {
description = "Name of the Application Gateway."
default = "ApplicationGateway1"
}

variable "app_gateway_sku" {
description = "Name of the Application Gateway SKU."
default = "Standard_v2"
}


variable "app_gateway_tier" {
description = "Tier of the Application Gateway SKU."
default = "Standard_v2"
}


variable "aks_name" {
description = "Name of the AKS cluster."
default = "aks-cluster1"
}
variable "aks_dns_prefix" {
description = "Optional DNS prefix to use with hosted Kubernetes API server FQDN."
default = "aks"
}


variable "aks_agent_os_disk_size" {
description = "Disk size (in GB) to provision for each of the agent pool nodes. This value ranges from 0 to 1023. Specifying 0 will apply the default disk size for that agentVMSize."
default = 40
Expand Down Expand Up @@ -73,7 +115,20 @@ variable "aks_enable_rbac" {
default = "false"
}

variable "vm_user_name" {
description = "User name for the VM"
default = "vmuser1"
}

variable "public_ssh_key_path" {
description = "Public key path for SSH."
default = "~/.ssh/id_rsa.pub"
}

variable "tags" {
type = "map"

default = {
source = "terraform"
}
}

0 comments on commit 602c9b9

Please sign in to comment.