Skip to content

Instantly share code, notes, and snippets.

View nicosingh's full-sized avatar

Nico Singh nicosingh

View GitHub Profile
@nicosingh
nicosingh / .env
Last active March 31, 2024 04:39
MySQL cluster using docker
MYSQL_ROOT_PASSWORD=rootpass
@nicosingh
nicosingh / .gitignore
Last active March 18, 2024 08:34
ECS using Terraform sample
*.tfbackup
.terraform/
*.tfstate
.terraform.tfstate.lock.info
@nicosingh
nicosingh / alert-manager.md
Last active February 27, 2024 23:46
A small and local configuration for Prometheus + AlertManager + Slack notifications + Unsee

TL;DR

Clone this repo:

git clone https://gist.github.com/08be6d6e7605a43fe52d1f201c2b47d8.git
cd 08be6d6e7605a43fe52d1f201c2b47d8

Start the docker stack:

provider "acme" {
server_url = "https://acme-staging-v02.api.letsencrypt.org/directory"
#server_url = "https://acme-v02.api.letsencrypt.org/directory"
}
data "aws_route53_zone" "base_domain" {
name = "test.singh.cl" # TODO put your own DNS in here!
}
resource "tls_private_key" "private_key" {
@nicosingh
nicosingh / .gitignore
Last active December 1, 2023 03:04
Run docker daemon with self-signed TLS certificates
volumes/
@nicosingh
nicosingh / lipsum_chile.txt
Created December 5, 2017 18:27
Lorem Ipsum Chileno
Lorem ipsum dolor sit cuchuflí barquillo bacán jote gamba listeilor po cahuín, luca melón con vino pichanga coscacho ni ahí peinar la muñeca chuchada al chancho achoclonar. Chorrocientos pituto ubicatex huevo duro bolsero cachureo el hoyo del queque en cana huevón el año del loly hacerla corta impeque de miedo quilterry la raja longi ñecla. Hilo curado rayuela carrete quina guagua lorea piola ni ahí.
# create some variables
variable "namespaces" {
type = list(string)
description = "List of namespaces to be created in our EKS Cluster."
}
# create all Namespaces into EKS
resource "kubernetes_namespace" "eks_namespaces" {
for_each = toset(var.namespaces)
external_dns_iam_role = "external-dns"
external_dns_chart_name = "external-dns"
external_dns_chart_repo = "https://kubernetes-sigs.github.io/external-dns/"
external_dns_chart_version = "1.9.0"
external_dns_values = {
"image.repository" = "k8s.gcr.io/external-dns/external-dns",
"image.tag" = "v0.11.0",
"logLevel" = "info",
"logFormat" = "json",
# create some variables
variable "external_dns_iam_role" {
type = string
description = "IAM Role Name associated with external-dns service."
}
variable "external_dns_chart_name" {
type = string
description = "Chart Name associated with external-dns service."
}
dns_base_domain = "eks.singh.cl"
ingress_gateway_name = "aws-load-balancer-controller"
ingress_gateway_iam_role = "load-balancer-controller"
ingress_gateway_chart_name = "aws-load-balancer-controller"
ingress_gateway_chart_repo = "https://aws.github.io/eks-charts"
ingress_gateway_chart_version = "1.4.1"