Skip to content

Commit

Permalink
v 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andrevtg committed Oct 21, 2020
1 parent 10e5df2 commit dbfee0c
Show file tree
Hide file tree
Showing 76 changed files with 85 additions and 7,674 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@
Upgrades:

- cert-manager: 1.0.3
- external-dns: 3.4.6
- external-dns: 3.4.9
- nginx-ingress: REMOVED
- ingress-nginx: 3.7.1
- prometheus-operator: REMOVED
- kube-prometheus-stack: 10.1.0
- loki-stack: 0.41.2
- vault: 0.7.0
- velero: 2.13.3

Improvements:

- Several samples for local testing

## Version 0.7.2 and before

Crazy times, no record. Sorry fot that.
Crazy times, no record. Sorry for that.
59 changes: 45 additions & 14 deletions DEVELOP.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
# Development
# Development <!-- omit in toc -->

Este documento explica como montar um ambiente para desenvolvimento do chart do vtg-ipaas.

- [Pré-requisitos](#pré-requisitos)
- [Arquivo /etc/hosts](#arquivo-etchosts)
- [Ferramentas](#ferramentas)
- [Cluster k3d local](#cluster-k3d-local)
- [Local VKPR deployment](#local-vkpr-deployment)
- [Get chart dependencies](#get-chart-dependencies)
- [Helm upgrade/install](#helm-upgradeinstall)
- [Testing local app](#testing-local-app)

## Pré-requisitos

### Arquivo /etc/hosts
Expand All @@ -16,25 +25,36 @@ Insira a linha abaixo no arquivo /etc/hosts da estação de desenvolvimento:

Instale localmente as seguintes ferramentas:

- k3d
- helm
- k3d (versão 3.x ou superior)
- helm (v3 ou superior)
- kubectl

### Cluster k3d local

Crie um cluster k3d local para uso durante o desenvolvimento:
Crie um cluster k3d local para uso durante o desenvolvimento. Isto pode ser feito de duas formas:

* Usando o LB interno do k3d (forma preferida) - esta forma cria tanto um binding em `localhost:8080` quanto um IP na rede bridge para o ingress controller do VKPR:

```sh
k3d create -n vkpr-local \
--publish 8080:32080 \
--server-arg "--no-deploy=traefik"
k3d cluster create vkpr-local \
-p "8080:80@loadbalancer" \
-p "8443:443@loadbalancer" \
--k3s-server-arg "--no-deploy=traefik"
```

Os parâmetros acima desligam o Trefik (default do k3d), pois o Kong será o Ingress Controller.
Após a criação do cluster ajuste o KUBECONFIG:
* Usando NodePort - esta forma cria um binding em `localhost:8080` para o serviço que estiver no NodePort 32080 (este **não é** o defult do ingress controller do VKPR):

```sh
export KUBECONFIG="$(k3d get-kubeconfig --name='vkpr-local')"
k3d cluster create vkpr-local \
-p "8080:32080@agent[0]" --agents 1 \
--k3s-server-arg "--no-deploy=traefik" \
--k3s-server-arg "--no-deploy=servicelb"
```

Ambos os casos acima desligam o Traefik (ingress default do k3d), pois usaremos o Nginx Ingress Controller que é parte do VKPR. Após a criação do cluster ajuste o KUBECONFIG:

```sh
export KUBECONFIG=$(k3d kubeconfig write vkpr-local)
kubectl cluster-info
```

Expand All @@ -43,14 +63,25 @@ kubectl cluster-info
### Get chart dependencies

```sh
cd charts/vkpr
helm dependency update
cd ../..
helm dependency update ./charts/vkpr
```

### Helm upgrade/install

```sh
helm upgrade -i vkpr -f ./examples/values-local.yaml ./charts/vkpr
helm upgrade -i vkpr --skip-crds -f ./examples/local/values-local-minimal.yaml ./charts/vkpr
```

Check the LoadBalancer external IP (might take a few seconds):

```sh
kubectl get svc
```

### Testing local app

```sh
# both tests are the same
curl whoami.localdomain:8080
curl -H "Host: whoami.localdomain" <EXTERNAL-IP>
```
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ The **Backup Stack** is dedicated to backup and restore tools in order to migrat
| Charts | VKPR 0.8.0 |
|------------------------------------------------------------------------------------------------|------------|
| [cert-manager](https://charts.vertigo.com.br/docs/stacks#cert-manager) | `1.0.3` |
| [ExternalDNS](https://charts.vertigo.com.br/docs/stacks#externaldns) | `3.4.6` |
| [ExternalDNS](https://charts.vertigo.com.br/docs/stacks#externaldns) | `3.4.9` |
| [Loki](https://charts.vertigo.com.br/docs/stacks#loki) | `0.41.2` |
| [Keycloak](https://charts.vertigo.com.br/docs/stacks#keycloak) | `8.2.2` |
| [NGINX Ingress Controller](https://charts.vertigo.com.br/docs/stacks#nginx-ingress-controller) | `3.7.1` |
| [Kube Prometheus Stack](https://charts.vertigo.com.br/docs/stacks#prometheus-operator) | `10.1.0` |
| [Vault](https://charts.vertigo.com.br/docs/stacks#vault) | `0.7.0` |
| [Velero](https://charts.vertigo.com.br/docs/stacks#velero) | `2.7.4` |
| [Velero](https://charts.vertigo.com.br/docs/stacks#velero) | `2.13.3` |

## Requisites

Expand Down
10 changes: 7 additions & 3 deletions charts/vkpr/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
### INGRESS STACK ###
- name: external-dns
repository: https://charts.bitnami.com/bitnami
version: 3.4.6
version: 3.4.9
condition: external-dns.enabled

- name: ingress-nginx
Expand Down Expand Up @@ -105,7 +105,11 @@ dependencies:
condition: vault.enabled

### BACKUP STACK ###
# - name: velero
# repository: https://kubernetes-charts.storage.googleapis.com/
# version: 2.7.4
# condition: velero.enabled
- name: velero
repository: https://kubernetes-charts.storage.googleapis.com/
version: 2.7.4
repository: https://vmware-tanzu.github.io/helm-charts/
version: 2.13.3
condition: velero.enabled
39 changes: 0 additions & 39 deletions charts/vkpr/templates/acme.yaml

This file was deleted.

33 changes: 24 additions & 9 deletions charts/vkpr/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@
# Declare variables to be passed into your templates.

# subchart defaults
nginx-ingress:
ingress-nginx:
enabled: true
controller:
electionID: vkpr-ingress-controller-leader
publishService:
enabled: true
autoscaling:
enabled: false

# old chart (former stable repo)
# nginx-ingress:
# enabled: true
# controller:
# electionID: vkpr-ingress-controller-leader

external-dns:
enabled: false
Expand All @@ -29,13 +39,18 @@ vault:
enabled: false

loki-stack:
enabled: true
enabled: false

prometheus-operator:
enabled: true
kube-prometheus-stack:
enabled: false
prometheusOperator:
createCustomResource: false

# prometheus-operator:
# enabled: true
# prometheusOperator:
# createCustomResource: false

# dados para o CRD do ACME
acme:
email: [email protected]
Expand Down Expand Up @@ -117,10 +132,10 @@ affinity: {}
# BACKUP STACK
velero:
enabled: false
image:
repository: velero/velero
tag: v1.2.0
pullPolicy: IfNotPresent
# image:
# repository: velero/velero
# tag: v1.2.0
# pullPolicy: IfNotPresent
# Annotations to add to the Velero deployment's pod template. Optional.
#
# If using kube2iam or kiam, use the following annotation with your AWS_ACCOUNT_ID
Expand Down Expand Up @@ -167,7 +182,7 @@ velero:
enabled: true
additionalLabels: {}
# Install CRDs as a templates. Enabled by default.
installCRDs: true
installCRDs: false

##
## End of deployment-related settings.
Expand Down
35 changes: 0 additions & 35 deletions charts/vkpr/vault-helm/.circleci/config.yml

This file was deleted.

12 changes: 0 additions & 12 deletions charts/vkpr/vault-helm/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions charts/vkpr/vault-helm/.helmignore

This file was deleted.

Loading

0 comments on commit dbfee0c

Please sign in to comment.