Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
Simplified folder structure and improved logging (#51)
Browse files Browse the repository at this point in the history
* The folder structure has been simplified to easier understand which files belong to which service.
* Some settings related to logging have been changed to improve the behaviour.
dieti80 authored Feb 18, 2022
1 parent bef81d3 commit b592a89
Showing 121 changed files with 455 additions and 778 deletions.
1 change: 1 addition & 0 deletions apps/argo-cd/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

1 change: 1 addition & 0 deletions apps/argo-cd/ns.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: Namespace
metadata:
1 change: 1 addition & 0 deletions apps/argo-cd/set_image_pull_secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
config:
target: https://ingress-nginx-controller.ingress-nginx
tls:
1 change: 1 addition & 0 deletions apps/artillery/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
12 changes: 9 additions & 3 deletions apps/artillery/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../data/artillery

resources:
- deployment.yaml

generatorOptions:
disableNameSuffixHash: true

configMapGenerator:
- name: artillery-config
files:
- config/artillery.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
log:
level: info

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: iam-microgateway-data
name: iam-files
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
@@ -12,7 +13,7 @@ spec:
source:
repoURL: "{{ .Values.spec.source.repoURL }}"
targetRevision: "{{ .Values.spec.source.targetRevision }}"
path: "{{ .Values.iam.microgateway.resources.path }}"
path: data/authentication/iam/

destination:
server: https://kubernetes.default.svc
22 changes: 0 additions & 22 deletions apps/authentication/templates/iam-microgateway.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: Service
metadata:
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
@@ -32,13 +33,16 @@ spec:
image: docker.io/ergon/airlock-iam:latest-7.5
imagePullPolicy: IfNotPresent
env:
- name: IAM_LOG_LEVEL
value: INFO
- name: IAM_LOG_STRUCTURED_STDOUT_ENABLED
value: "true"
- name: IAM_MODULES
value: "adminapp,loginapp"
- name: IAM_HEALTH_ADDRESS
value: .*
- name: IAM_HEALTH_PORT
value: "9090"
envFrom:
- configMapRef:
name: iam-env-config
ports:
- name: https
containerPort: 8443
1 change: 1 addition & 0 deletions apps/authentication/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
10 changes: 10 additions & 0 deletions apps/authentication/templates/mariadb-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: iam-mariadb-sql-files
annotations:
helm.sh/hook: pre-install
helm.sh/hook-weight: "-90"
data:
{{ (.Files.Glob "config/mariadb/*").AsConfig | nindent 2 }}
19 changes: 0 additions & 19 deletions apps/authentication/templates/mariadb-data.yaml

This file was deleted.

1 change: 1 addition & 0 deletions apps/authentication/templates/mariadb-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: Secret
metadata:
18 changes: 14 additions & 4 deletions apps/authentication/templates/mariadb.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
@@ -10,12 +11,21 @@ metadata:
spec:
project: default
source:
repoURL: "{{ .Values.mariadb.spec.source.repoURL }}"
targetRevision: "{{ .Values.mariadb.spec.source.targetRevision }}"
chart: "{{ .Values.mariadb.spec.source.chart }}"
repoURL: https://charts.bitnami.com/bitnami
targetRevision: 9.4.3
chart: mariadb

helm:
values: |{{ toYaml .Values.mariadb.helm.values | nindent 8 }}
values: |
initdbScriptsConfigMap: iam-mariadb-sql-files
primary:
persistence:
size: 100M
auth:
database: iamdb
username: airlock
existingSecret: mariadb-secret
destination:
server: https://kubernetes.default.svc
10 changes: 10 additions & 0 deletions apps/authentication/templates/microgateway-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: iam-microgateway-config
annotations:
helm.sh/hook: pre-install
helm.sh/hook-weight: "-90"
data:
{{ (.Files.Glob "config/microgateway/config.yaml").AsConfig | nindent 2 }}
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: iam
name: iam-microgateway-files
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
spec:
project: default
source:
repoURL: "{{ .Values.spec.source.repoURL }}"
targetRevision: "{{ .Values.spec.source.targetRevision }}"
path: "{{ .Values.iam.resources.path }}"
path: data/authentication/microgateway/

destination:
server: https://kubernetes.default.svc
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
iam:
microgateway:
spec:
source:
repoURL: https://ergon.github.io/airlock-helm-charts
targetRevision: 3.0.5
chart: microgateway

resources:
path: data/authentication/microgateway/
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: iam-microgateway
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: https://ergon.github.io/airlock-helm-charts
targetRevision: 3.0.8
chart: microgateway

helm:
values:
values: |
image:
tag: "3.1"
@@ -67,9 +71,11 @@ iam:
useExistingSecret: true
secretName: microgateway-passphrase
{{- if .Values.microgateway.license.secretName }}
license:
useExistingSecret: true
secretName: microgateway-license
secretName: {{ .Values.microgateway.license.secretName }}
{{- end }}
env:
configbuilder:
@@ -80,3 +86,9 @@ iam:
key: COOKIE_NAME
dslConfigMap: iam-microgateway-config
destination:
server: https://kubernetes.default.svc
namespace: default

syncPolicy: {{ toYaml .Values.spec.syncPolicy | nindent 4 }}
3 changes: 0 additions & 3 deletions apps/authentication/values-iam.yaml

This file was deleted.

22 changes: 0 additions & 22 deletions apps/authentication/values-mariadb.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
log:
level: info

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
log:
level: info

3 changes: 2 additions & 1 deletion apps/backend/config/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
error_log /dev/stderr debug;
# error_log /dev/stderr debug;
error_log /dev/null emerg;
events {
worker_connections 1024;
}
4 changes: 2 additions & 2 deletions apps/backend/templates/microgateway-config.yaml
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ metadata:
helm.sh/hook-weight: "-90"
data:
{{- if .Values.authentication.enabled }}
{{ (.Files.Glob "config/echoserver-microgateway/with-iam/*").AsConfig | nindent 2 }}
{{ (.Files.Glob "config/microgateway/authentication-enabled/*").AsConfig | nindent 2 }}
{{- else }}
{{ (.Files.Glob "config/echoserver-microgateway/without-iam/*").AsConfig | nindent 2 }}
{{ (.Files.Glob "config/microgateway/authentication-disabled/*").AsConfig | nindent 2 }}
{{- end }}
41 changes: 36 additions & 5 deletions apps/backend/templates/microgateway.yaml
Original file line number Diff line number Diff line change
@@ -9,18 +9,49 @@ metadata:
spec:
project: default
source:
repoURL: "{{ .Values.echoserver.microgateway.spec.source.repoURL }}"
targetRevision: "{{ .Values.echoserver.microgateway.spec.source.targetRevision }}"
chart: "{{ .Values.echoserver.microgateway.spec.source.chart }}"
repoURL: https://ergon.github.io/airlock-helm-charts
targetRevision: 3.0.8
chart: microgateway

helm:
values: |
image:
tag: "3.1"
fullnameOverride: echoserver-microgateway
resources:
limits:
memory: 512Mi
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9102"
service:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9102"
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/backend-protocol: https
nginx.ingress.kubernetes.io/rewrite-target: /echo/
path: /echo/
pathType: Prefix
servicePortName: https
config:
passphrase:
useExistingSecret: true
secretName: microgateway-passphrase
{{- if .Values.microgateway.license.secretName }}
license:
useExistingSecret: true
secretName: microgateway-license
secretName: {{ .Values.microgateway.license.secretName }}
{{- end }}
{{- if .Values.authentication.enabled }}
@@ -49,4 +80,4 @@ spec:
server: https://kubernetes.default.svc
namespace: default

syncPolicy: "{{ toYaml .Values.spec.syncPolicy | nindent 4 }}"
syncPolicy: {{ toYaml .Values.spec.syncPolicy | nindent 4 }}
Loading

0 comments on commit b592a89

Please sign in to comment.