Skip to content

Commit

Permalink
Merge pull request #23 from GOD-mbh/update
Browse files Browse the repository at this point in the history
Bump & Update
  • Loading branch information
timurgaleev authored Oct 26, 2020
2 parents 77ab4c5 + 76f6f39 commit 5c31464
Show file tree
Hide file tree
Showing 12 changed files with 170 additions and 62 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Terraform and helm charts to provide deployment of the full EKS cluster

```bash
brew update
brew install kubectl
brew install kubernetes-cli
brew install python3
easy_install pip
pip install awscli — upgrade — user
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.1.x
v1.2.x
22 changes: 11 additions & 11 deletions charts/00-variable.tf.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"variable": {
"bitnami_external_dns": {
"default": "3.3.0",
"default": "3.4.1",
"description": "bitnami/external-dns"
},
"codecentric_keycloak": {
"default": "8.3.0",
"default": "8.3.0",
"description": "codecentric/keycloak"
},
"gabibbo97_keycloak_gatekeeper": {
"default": "3.3.1",
"description": "gabibbo97/keycloak-gatekeeper"
},
"jetstack_cert_manager": {
"default": "v0.16.1",
"default": "v1.0.2",
"description": "jetstack/cert-manager"
},
"oteemo_sonarqube": {
"default": "6.6.0",
"default": "6.8.0",
"description": "oteemo/sonarqube"
},
"oteemo_sonatype_nexus": {
"default": "2.7.0",
"default": "2.8.0",
"description": "oteemo/sonatype-nexus"
},
"stable_chartmuseum": {
"default": "2.13.2",
"default": "2.13.3",
"description": "stable/chartmuseum"
},
"stable_grafana": {
Expand All @@ -37,7 +37,7 @@
"description": "stable/jenkins"
},
"stable_metrics_server": {
"default": "2.11.1",
"default": "2.11.2",
"description": "stable/metrics-server"
},
"stable_nginx_ingress": {
Expand All @@ -53,19 +53,19 @@
"description": "stable/prometheus-operator"
},
"argo_argo": {
"default": "0.9.8",
"default": "0.12.1",
"description": "argo/argo"
},
"argo_argo_cd": {
"default": "2.6.0",
"default": "2.7.4",
"description": "argo/argo-cd"
},
"argo_argo_events": {
"default": "0.17.0",
"default": "1.0.0",
"description": "argo/argo-events"
},
"argo_argo_rollouts": {
"default": "0.3.4",
"default": "0.3.6",
"description": "argo/argo-rollouts"
},
"stable_weave_scope": {
Expand Down
31 changes: 0 additions & 31 deletions charts/00-variables-modules.tf

This file was deleted.

34 changes: 34 additions & 0 deletions charts/00-variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,37 @@ variable "domains" {
description = "domain name for ingress"
default = ""
}

######### Charts

variable "jenkins_enabled" {
default = false
}

variable "chartmuseum_enabled" {
default = false
}

variable "archiva_enabled" {
default = false
}

variable "nexus_enabled" {
default = false
}

variable "sonarqube_enabled" {
default = false
}

variable "kiali_gatekeeper_enabled" {
default = false
}

variable "tracing_gatekeeper_enabled" {
default = false
}

variable "argo_enabled" {
default = false
}
2 changes: 1 addition & 1 deletion charts/04-backend.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
terraform {
required_version = ">= 0.12"
backend "s3" {
bucket = "tfstate-demo-infra"
key = "terraform/states/charts.tfstate"
region = "eu-central-1"
encrypt = true
dynamodb_table = "tfstate_god_charts"
}
required_version = ">= 0.12.0"
}
49 changes: 36 additions & 13 deletions charts/modules/argo/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,46 @@ resource "helm_release" "argo" {
]
}

# resource "helm_release" "argo-events" {
# count = var.argo_count ? 1 : 0
# repository = "https://argoproj.github.io/argo-helm"
# chart = "argo-events"
# version = var.argo_argo_events_version
resource "helm_release" "argo-events" {
count = var.argo_count ? 1 : 0
repository = "https://argoproj.github.io/argo-helm"
chart = "argo-events"
version = var.argo_argo_events_version

namespace = "argo-events"
name = "argo-events"

values = [
file("./modules/argo/values/argo-events.yaml")
]

# namespace = "argo-events"
# name = "argo-events"
wait = false

create_namespace = true
}

resource "helm_release" "argo-events-webhook" {
count = var.argo_count ? 1 : 0

# values = [
# file("./modules/argo/values/argo-events.yaml")
# ]
repository = "https://kubernetes-charts-incubator.storage.googleapis.com"
chart = "raw"

# wait = false
namespace = "argo-events"
name = "argo-events-webhook"

# create_namespace = true
# }
values = [
file("./modules/argo/values/argo-webhook.yaml")
]

wait = false

create_namespace = true

depends_on = [
helm_release.argo,
helm_release.argo-events,
]
}

resource "helm_release" "argo-gatekeeper" {
count = var.argo_count ? 1 : 0
Expand Down
62 changes: 62 additions & 0 deletions charts/modules/argo/values/argo-events-webhook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
resources:
- apiVersion: argoproj.io/v1alpha1
kind: EventSource
metadata:
name: webhook
spec:
service:
ports:
- port: 12000
targetPort: 12000
webhook:
example:
port: "12000"
endpoint: /example
method: POST

- apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: webhook
spec:
template:
serviceAccountName: argo-events-sa
dependencies:
- name: test-dep
eventSourceName: webhook
eventName: example
triggers:
- template:
name: webhook-workflow-trigger
k8s:
group: argoproj.io
version: v1alpha1
resource: workflows
operation: create
source:
resource:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: webhook-
spec:
entrypoint: whalesay
arguments:
parameters:
- name: message
# the value will get overridden by event payload from test-dep
value: hello world
templates:
- name: whalesay
serviceAccountName: argo-events-sa
inputs:
parameters:
- name: message
container:
image: docker/whalesay:latest
command: [cowsay]
args: ["{{inputs.parameters.message}}"]
parameters:
- src:
dependencyName: test-dep
dest: spec.arguments.parameters.0.value
3 changes: 1 addition & 2 deletions charts/modules/argo/values/argo-rollouts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ nameOverride: argo-rollouts
installCRDs: true

controller:
image:
tag: v0.8.3

2 changes: 1 addition & 1 deletion charts/modules/ingress/values/ingress-nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ controller:
service:
annotations:
external-dns.alpha.kubernetes.io/hostname: "*.godapp.de"
external-dns.alpha.kubernetes.io/ttl: "300"
# external-dns.alpha.kubernetes.io/ttl: "300"
# service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http"
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "3600"
Expand Down
21 changes: 21 additions & 0 deletions charts/modules/keycloak/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ resource "kubernetes_namespace" "keycloak" {
}
}

resource "kubernetes_secret" "keycloak-admin" {
count = var.keycloak_enabled ? 1 : 0

metadata {
namespace = "keycloak"
name = "keycloak-admin"
}

type = "Opaque"

data = {
"username" = "admin"
"password" = "password"
}

depends_on = [
kubernetes_namespace.keycloak,
]
}

resource "kubernetes_secret" "keycloak-realm" {
metadata {
namespace = "keycloak"
Expand Down Expand Up @@ -51,6 +71,7 @@ resource "helm_release" "keycloak" {
}

depends_on = [
kubernetes_secret.keycloak-admin,
kubernetes_secret.keycloak-realm,
var.module_depends_on
]
Expand Down
2 changes: 1 addition & 1 deletion eks-vpc/04-backend.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
terraform {
required_version = ">= 0.12"
backend "s3" {
bucket = "tfstate-demo-infra"
key = "terraform/states/eks.tfstate"
region = "eu-central-1"
encrypt = true
dynamodb_table = "tfstate_god"
}
required_version = ">= 0.12.0"
}

0 comments on commit 5c31464

Please sign in to comment.