application

cloudcommons/application/kubernetes

Terraform Module HCL KUBERNETES

Terraform module to deploy an application in Kubernetes. Equivalent to a Helm chart, but relaying purely on Terraform.

Install
module "application" {
source = "cloudcommons/application/kubernetes"
version = "0.1.10"
}
plain text: /constructs/tfmod-cloudcommons-application-kubernetes/install.txt
⭐ Source on GitHub 📦 Registry page
README

Kubernetes application This Terraform module mimics (most) the Helm chart out of the box features and behaviours that you can find when ``helm create mychart`, but relaying purely and solely on Terraform. Features Creates a new namespace for the application+environment Creates deployment for one or more Docker container deploymens. Ingress rules are used to route traffic to the right service Possiblity of configure liveness and readiness probe Possibility of mounting secrets as volues One service per deployment is created. Intended to use ClusterIP + Nginx-ingress One ingress for all services is deployed, including the rules to route the traffic to the right service Additional features You can add the following features by creating your own terraform modules and referencing to module outpu

Inputs (26)
NameTypeDescriptionDefault
UIDstring(Required) A unique identifier to attach to the namespace required
LIVENESS_PROBEobject({ initial_delay (Optional) Application liveness probe required
DEPLOYMENT_IMAGE_PULL_SECRETstring (Optional) ImagePullSecrets is an optional list of references to secrets in the required
DEPLOYMENT_LIVENESS_PROBEobject({ path = string (Optional) Deployment liveness probe required
ENVIRONMENTstring(Optional) Application environment required
SERVICE_PORTnumber(Required) The port that will be exposed by this service. required
SERVICE_LOAD_BALANCER_IPstring(Optional) Only applies to type = LoadBalancer. LoadBalancer will get created wi required
READINESS_PROBEobject({ initial_delay (Optional) Application readyness probe required
APP_NAMEstring(Required) Application name required
SERVICE_TARGET_PORTnumber(Optional) Number or name of the port to access on the pods targeted by the serv required
ENVmap(string)(Optional) Deployment environment variables{}
ANNOTATIONSmap(string)(Optional) Application annotations{}
DEPLOYMENTSlist(object({ hostname (Required) List of backends to deploy, and routes to get to them[ { "docker_image": null, "doc
DEPLOYMENT_RESOURCE_REQUESTSobject({ cpu = string (Optional) Deployment resource requests. Defaults to cpu (250m) and memory (50Mi{ "cpu": 0, "memory": 0 }
SERVICE_SESSION_AFFINITYstring(Optional) Used to maintain session affinity. Supports ClientIP and None. Defaul"None"
SERVICE_ENABLEDbool(Optional) Creates a service for this deployment. Defaults to truetrue
INGRESS_TLSlist(object({ hosts (Optional) TLS configuration for the Ingress. Default to null[]
INGRESS_DEFAULT_BACKEND_ENABLEDbool(Optional) Disables the default back-end for the ingress. Defaults to false. If false
DEPLOYMENT_IMAGE_PULL_POLICYstring(Optional) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Al"Always"
DEPLOYMENT_REPLICASnumber(Optional) Number of deployment replicas. Defaults to 11
DEPLOYMENT_RESOURCE_LIMITSobject({ cpu = string (Optional) Deployment resource limits. Defaults to cpu (0.5) and memory (512Mi){ "cpu": 0, "memory": 0 }
SERVICE_PROTOCOLstring(Optional) The IP protocol for this port. Supports TCP and UDP. Default is TCP."TCP"
SERVICE_TYPEstring(Optional) Determines how the service is exposed. Defaults to ClusterIP. Valid o"ClusterIP"
INGRESS_ANNOTATIONSmap(string)(Optional) Namespace annotations{}
LABELSmap(string)(Optional) Application labels{}
NAMESPACE_ANNOTATIONSmap(string)(Optional) Namespace annotations{}
Outputs (5)
services — List of service names created
ingress — Ingress name creates
name — Application full name
namespace — Namespace created for this application
deployments — List of deployment names created
Resources (4)
kubernetes_deploymentkubernetes_ingresskubernetes_namespacekubernetes_service
Details
FrameworkTerraform Module
LanguageHCL
Version0.1.10
Cloud KUBERNETES
★ Stars2
Forks2
Total downloads6.1k
Inputs26
Outputs5
Resources4
Namespacecloudcommons
Updated