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 4, 2023
2 parents 8b9215e + 4aa1a74 commit c92a611
Show file tree
Hide file tree
Showing 25 changed files with 665 additions and 723 deletions.
16 changes: 16 additions & 0 deletions aws/apps/fiware/fiware-ebis-wallet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: fiware-ebsi-wallet
namespace: argocd
spec:
destination:
namespace: fiware
server: https://kubernetes.default.svc
project: default
source:
path: aws/fiware/ebsi-wallet
repoURL: https://github.com/FIWARE-Ops/fiware-gitops
targetRevision: HEAD
syncPolicy:
automated: {}
16 changes: 16 additions & 0 deletions aws/apps/fiware/fiware-waltid-wallet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: fiware-waltid-wallet
namespace: argocd
spec:
destination:
namespace: fiware
server: https://kubernetes.default.svc
project: default
source:
path: aws/fiware/waltid-wallet
repoURL: https://github.com/FIWARE-Ops/fiware-gitops
targetRevision: HEAD
syncPolicy:
automated: {}
26 changes: 10 additions & 16 deletions aws/dome/tm-forum-api/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
apiVersion: v2
name: tm-forum-api
version: 0.0.1
appVersion: 0.4.1
kubeVersion: '>= 1.19-0'
home: https://github.com/FIWARE/tmforum-api
description: A Helm chart for running the FIWARE TMForum-APIs
icon: https://fiware.github.io/catalogue/img/fiware.png
keywords:
- fiware
- tmforum
sources:
- https://github.com/FIWARE/tmforum-api
maintainers:
- name: wistefan
email: [email protected]
annotations:
charts.openshift.io/name: tm-forum-api
description: Chart holder for argo-cd

type: application
version: 0.1.0
appVersion: "0.4.1"

dependencies:
- name: tm-forum-api
version: 0.0.1
repository: https://fiware.github.io/helm-charts
95 changes: 0 additions & 95 deletions aws/dome/tm-forum-api/README.md

This file was deleted.

14 changes: 3 additions & 11 deletions aws/dome/tm-forum-api/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create the name of the service account to use
*/}}
{{- define "tmforum.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "tmforum.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

{{/*
Common labels
Expand All @@ -51,4 +41,6 @@ helm.sh/chart: {{ include "tmforum.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{- end -}}


158 changes: 158 additions & 0 deletions aws/dome/tm-forum-api/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
{{- $url := index .Values "tm-forum-api" "route" "host"}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "tmforum.fullname" $ }}-api-doc
labels:
{{ include "tmforum.labels" $ | nindent 4 }}
data:
download.sh: |
#!/bin/sh
{{- range $key, $value := index .Values "tm-forum-api" "apis" }}
{{- if $value.specUrl }}
curl {{ $value.specUrl }} > /spec/{{ $value.name }}.json
{{- end }}
{{- end }}
docker-run.sh: |
#!/bin/sh
set -e
nginx -g 'daemon off;'
index.html: |
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Deployed APIs</title>
<link rel="icon" href="favicon.png">
<style>
/* Dropdown Button */
.dropbtn {
background-color: #04AA6D;
color: white;
padding: 16px;
font-size: 16px;
border: none;
}
/* The container <div> - needed to position the dropdown content */
.dropdown {
position: relative;
display: inline-block;
}
/* Dropdown Content (Hidden by Default) */
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
/* Links inside the dropdown */
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
/* Change color of dropdown links on hover */
.dropdown-content a:hover {background-color: #ddd;}
/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {display: block;}
/* Change the background color of the dropdown button when the dropdown content is shown */
.dropdown:hover .dropbtn {background-color: #3e8e41;}
</style>
</head>
<body >
<script src="rapidoc-min.js"></script>
<script>
function getRapiDoc(){
return document.getElementById("thedoc");
}
function setApi(url, name, path) {
getRapiDoc().setAttribute("spec-url", url);
{{- if $url }}
getRapiDoc().setAttribute("server-url", path);
{{- end }}
}
</script>
{{- if $url }}
<rapi-doc id="thedoc" spec-url="spec/{{ .Values.doc.defaultApi }}.json" server-url="https://{{ $url }}{{ .Values.doc.defaultPath }}" allow-spec-url-load="false" allow-spec-file-load="false" >
{{- else }}
<rapi-doc id="thedoc" spec-url="spec/{{ .Values.doc.defaultApi }}.json" allow-spec-url-load="false" allow-spec-file-load="false" >
{{- end }}
<div style="display:flex; margin:10px; justify-content:left;flex-wrap: wrap;">
<div class="dropdown">
<button id="dropdown-btn" class="dropbtn">Select API</button>
<div class="dropdown-content">
{{- range $key, $value := index .Values "tm-forum-api" "apis" }}
{{- if $value.specUrl }}
<a href="#" onclick="setApi('spec/{{ $value.name }}.json', '{{ $value.name }}', 'https://{{ $url }}{{ $value.basePath }}')">{{ $value.name }}</a>
{{- end }}
{{- end }}
</div>
</div>
</div>
</rapi-doc>
</body>
</html>
nginx.conf: |
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
index index.html index.htm;
location / {
alias /usr/share/nginx/html/;
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
#
# Custom headers and headers various browsers *should* be OK with but aren't
#
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
#
# Tell client that this pre-flight info is valid for 20 days
#
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
if ($request_method = 'POST') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
}
if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
}
}
}
}
Loading

0 comments on commit c92a611

Please sign in to comment.