Skip to content

Commit

Permalink
Merge branch 'master' of github.com:FIWARE-Ops/fiware-gitops
Browse files Browse the repository at this point in the history
  • Loading branch information
dwendland committed Jul 24, 2024
2 parents eb8c80e + fb68081 commit 57be818
Show file tree
Hide file tree
Showing 12 changed files with 234 additions and 0 deletions.
18 changes: 18 additions & 0 deletions aws/apps/didymosxr/didymosxr-mongo-db.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: didymosxr-mongo-db
namespace: argocd
spec:
destination:
namespace: didymosxr
server: https://kubernetes.default.svc
project: default
source:
path: aws/didymosxr/mongodb
repoURL: https://github.com/FIWARE-Ops/fiware-gitops
targetRevision: HEAD
syncPolicy:
automated:
prune: true
selfHeal: true
18 changes: 18 additions & 0 deletions aws/apps/didymosxr/didymosxr-nginx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: didymosxr-nginx
namespace: argocd
spec:
destination:
namespace: didymosxr
server: https://kubernetes.default.svc
project: default
source:
path: aws/didymosxr/nginx
repoURL: https://github.com/FIWARE-Ops/fiware-gitops
targetRevision: HEAD
syncPolicy:
automated:
prune: true
selfHeal: true
18 changes: 18 additions & 0 deletions aws/apps/didymosxr/didymosxr-orion-ld.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: didymosxr-orion-ld
namespace: argocd
spec:
destination:
namespace: didymosxr
server: https://kubernetes.default.svc
project: default
source:
path: aws/didymosxr/orion-ld
repoURL: https://github.com/FIWARE-Ops/fiware-gitops
targetRevision: HEAD
syncPolicy:
automated:
prune: true
selfHeal: true
12 changes: 12 additions & 0 deletions aws/didymosxr/mongodb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v2
name: mongo-db-didymosxr
description: Chart holder for argo-cd

type: application
version: 0.1.0
appVersion: "4.4.12"

dependencies:
- name: mongodb
version: 11.0.4
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
17 changes: 17 additions & 0 deletions aws/didymosxr/mongodb/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
mongodb:
auth:
enabled: true
existingSecret: mongodb-secret

architecture: standalone
podSecurityContext:
enabled: false
containerSecurityContext:
enabled: false
resources:
limits:
cpu: 200m
memory: 512Mi
persistence:
enabled: true
size: 8Gi
12 changes: 12 additions & 0 deletions aws/didymosxr/nginx/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v2
name: nginx-didymosxr
description: Chart holder for argo-cd

type: application
version: 0.1.0
appVersion: "4.4.12"

dependencies:
- name: nginx
version: 18.1.5
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
51 changes: 51 additions & 0 deletions aws/didymosxr/nginx/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "nginx.name" -}}
{{- default .Chart.Name .Values.nginx.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "nginx.fullname" -}}
{{- if .Values.nginx.fullnameOverride }}
{{- .Values.nginx.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nginx.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "nginx.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "nginx.labels" -}}
helm.sh/chart: {{ include "nginx.chart" . }}
{{ include "nginx.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "nginx.selectorLabels" -}}
app.kubernetes.io/name: {{ include "nginx.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
25 changes: 25 additions & 0 deletions aws/didymosxr/nginx/templates/route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- if .Values.nginx.route.enabled -}}
{{- $fullName := include "nginx.fullname" . -}}
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: {{ include "nginx.fullname" . }}
labels:
{{ include "nginx.labels" . | nindent 4 }}
annotations:
cert-utils-operator.redhat-cop.io/certs-from-secret: {{ include "nginx.fullname" . }}-tls-sec
{{- with .Values.nginx.route.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
host: {{ .Values.nginx.route.host }}
to:
kind: Service
name: {{ include "nginx.fullname" . }}
{{- if .Values.nginx.route.tls }}
tls:
{{- with .Values.nginx.route.tls }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
28 changes: 28 additions & 0 deletions aws/didymosxr/nginx/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
nginx:
fullnameOverride: didymosxr-nginx
service:
type: ClusterIP
route:
enabled: true
host: broker.didymosxr.fiware.dev
tls:
insecureEdgeTerminationPolicy: Redirect
termination: edge
certificate:
issuer:
kind: ClusterIssuer
name: letsencrypt-aws-prod

serverBlock: |-
server {
listen 0.0.0.0:8080;
location /* {
return 200 "hello!";
}
location /ngsi-ld/ {
limit_except GET {
deny all;
}
proxy_pass http://didymosxr-orion-ld:1026/ngsi-ld/;
}
}
12 changes: 12 additions & 0 deletions aws/didymosxr/orion-ld/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v2
name: orion-ld
description: Chart holder for argo-cd

type: application
version: 0.1.0
appVersion: "1.0.1"

dependencies:
- name: orion
version: 1.1.0
repository: https://fiware.github.io/helm-charts
19 changes: 19 additions & 0 deletions aws/didymosxr/orion-ld/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
orion:
deployment:
additionalAnnotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '8000'
broker:
db:
auth:
user: root
mech: "SCRAM-SHA-1"
hosts:
- didymosxr-mongo-db-mongodb
user: root
existingSecret:
name: mongodb-secret
key: mongodb-root-password
mongo:
# we want to use the individually deployed mongodb
enabled: false
4 changes: 4 additions & 0 deletions aws/namespaces/didymosxr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: didymosxr

0 comments on commit 57be818

Please sign in to comment.