Skip to content

Commit

Permalink
add frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
wistefan committed Mar 12, 2024
1 parent 29e6f32 commit 38f3cd9
Show file tree
Hide file tree
Showing 8 changed files with 187 additions and 0 deletions.
21 changes: 21 additions & 0 deletions aws/apps/fiware/fiware-wallet-driving.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: fiware-wallet-driving
namespace: argocd
spec:
destination:
namespace: fiware
server: https://kubernetes.default.svc
project: default
source:
helm:
valueFiles:
- values.yaml
path: aws/fiware/dome-wallet/wallet-driving
repoURL: https://github.com/FIWARE-Ops/fiware-gitops
targetRevision: HEAD
syncPolicy:
automated:
prune: true
selfHeal: true
7 changes: 7 additions & 0 deletions aws/fiware/dome-wallet/wallet-driving/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v2
name: wallet-driving
description: wallet-driving Helm-Chart

type: application
version: 0.1.0
appVersion: "v1.0.0-SNAPSHOT"
45 changes: 45 additions & 0 deletions aws/fiware/dome-wallet/wallet-driving/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "wallet-driving.name" -}}
{{- default .Chart.Name .Values.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 "wallet-driving.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.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 "wallet-driving.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}


{{/*
Common labels
*/}}
{{- define "wallet-driving.labels" -}}
app.kubernetes.io/name: {{ include "wallet-driving.name" . }}
helm.sh/chart: {{ include "wallet-driving.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
14 changes: 14 additions & 0 deletions aws/fiware/dome-wallet/wallet-driving/templates/certificate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: dome-wallet
spec:
## secret the certificate should be stored to, will be referenced by the route
secretName: dome-wallet
issuerRef:
## certificate issuer, as created in the cert-manager installation step
kind: ClusterIssuer
name: letsencrypt-aws-prod
commonName: "dome-wallet.fiware.dev"
dnsNames:
- "dome-wallet.fiware.dev"
52 changes: 52 additions & 0 deletions aws/fiware/dome-wallet/wallet-driving/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "wallet-driving.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{ include "wallet-driving.labels" . | nindent 4 }}
spec:
replicas: 1
revisionHistoryLimit: 3
selector:
matchLabels:
app.kubernetes.io/name: {{ include "wallet-driving.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
{{ include "wallet-driving.labels" . | nindent 8 }}
spec:
containers:
- name: {{ .Chart.Name }}
imagePullPolicy: {{ .Values.deployment.image.pullPolicy }}
image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}"
env:
- name: WCA_URL
value: {{ .Values.deployment.walletServer.http | quote }}
- name: DATA_URL
value: {{ .Values.deployment.walletServer.http | quote }}
- name: LOGIN_URL
value: {{ .Values.deployment.keycloakUrl | quote }}
- name: EXECCONT_URI
value: "/api/v2/execute-content"
- name: VP_URL
value: "api/v2/verifiable-presentation"
- name: CRED_URI
value: "/api/v2/credentials"
- name: CREDID_URI
value: "/api/v2/credentials?credentialId="
- name: USER_URI
value: "/api/v2/users"
- name: WEBSOCKET_URL
value: {{ .Values.deployment.walletServer.ws | quote }}
- name: WEBSOCKET_URI
value: "/api/v2/pin"
ports:
- containerPort: {{ .Values.service.port}}
name: http
protocol: TCP
16 changes: 16 additions & 0 deletions aws/fiware/dome-wallet/wallet-driving/templates/route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: route.openshift.io/v1
kind: Route
metadata:
annotations:
cert-utils-operator.redhat-cop.io/certs-from-secret: dome-wallet
name: dome-wallet
spec:
host: dome-wallet.fiware.dev
port:
targetPort: 4200
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
to:
kind: Service
name: {{ include "wallet-driving.fullname" . }}
18 changes: 18 additions & 0 deletions aws/fiware/dome-wallet/wallet-driving/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "wallet-server.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{ include "wallet-server.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
# same as scorpio, makes other config easier
- port: {{ .Values.service.port }}
targetPort: {{ .Values.service.port }}
protocol: TCP
name: http
selector:
app.kubernetes.io/name: {{ include "wallet-server.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
14 changes: 14 additions & 0 deletions aws/fiware/dome-wallet/wallet-driving/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
deployment:
image:
repository: in2kizuna/wallet-driving-application
# -- tag of the image to be used
tag: v1.0.0-SNAPSHOT
# -- specification of the image pull policy
pullPolicy: IfNotPresent
walletServer:
http: http://dome-wallet-server:8080
ws: ws://dome-wallet-server:8080
keycloakUrl: http://fiware-wallet-keycloak:8080/realms/wallet
service:
port: 4200
type: ClusterIP

0 comments on commit 38f3cd9

Please sign in to comment.