feat: Initial fap(r) stubs with for prod/staging

This commit is contained in:
2026-05-07 17:24:14 +02:00
parent f50851c775
commit 9a5f2b8fea
25 changed files with 670 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
fapr:
enabled: true
+4
View File
@@ -0,0 +1,4 @@
fapr:
enabled: true
autosync: {{ if or (eq .Environment.Name "prod") (eq .Environment.Name "beta") }}false{{ else }}true{{ end }}
env: {{ .Environment.Name }}
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- _manifest.yaml
@@ -0,0 +1,20 @@
{
"appName": "fapr",
"appEnv": "prod",
"logLevel": "Information",
"aromeOutputDir": "/data/hdd/data/AROME",
"aromeStartDate": "2026-04-24",
"nveOutputDir": "/data/hdd/data/river-data/Data",
"nveNdays": 5000,
"nveApiUrl": "https://chartserver.nve.no/ShowData.aspx?req=getchart&ver=1.0",
"riverrunBinary": "/app/riverrun",
"norshelfOutputDir": "/data/hdd/data/norshelf/sea_norshelf_files",
"norshelfStartDate": "2026-03-01",
"nemoOutputDir": "/data/hdd/data/NEMO",
"copernicusmarineBinary": "/usr/local/bin/copernicusmarine",
"copernicusUsername": "",
"copernicusPassword": "",
"murOutputDir": "/data/hdd/data/river-data/MUR/MUR_SST_nc",
"netrcPath": "/root/.netrc",
"norkystOutputDir": "/data/hdd/data/norkyst"
}
@@ -0,0 +1,77 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: cron-arome
spec:
type: bindings.cron
version: v1
metadata:
- name: schedule
value: "0 6 * * *"
scopes:
- prod-fapr
---
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: cron-nve
spec:
type: bindings.cron
version: v1
metadata:
- name: schedule
value: "0 8 * * *"
scopes:
- prod-fapr
---
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: cron-norshelf
spec:
type: bindings.cron
version: v1
metadata:
- name: schedule
value: "0 13 * * *"
scopes:
- prod-fapr
---
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: cron-nemo
spec:
type: bindings.cron
version: v1
metadata:
- name: schedule
value: "0 13 * * *"
scopes:
- prod-fapr
---
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: cron-mur
spec:
type: bindings.cron
version: v1
metadata:
- name: schedule
value: "0 6 * * *"
scopes:
- prod-fapr
---
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: cron-norkyst
spec:
type: bindings.cron
version: v1
metadata:
- name: schedule
value: "0 13 * * *"
scopes:
- prod-fapr
@@ -0,0 +1,3 @@
- op: add
path: /spec/template/spec/containers/0/envFrom
value: []
@@ -0,0 +1,21 @@
generatorOptions:
disableNameSuffixHash: true
configMapGenerator:
- name: prod-fapr-appsettings
files:
- appsettings.json
patches:
- target:
group: apps
version: v1
kind: Deployment
path: deployment_patch.yaml
resources:
- ../base
- pv.yaml
- pvc.yaml
- secrets.yaml
- secretstore.yaml
- statestore.yaml
- tracing.yaml
- cron-bindings.yaml
+22
View File
@@ -0,0 +1,22 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-prod-fapr-ceph-data
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 1Gi
csi:
driver: rook-ceph.cephfs.csi.ceph.com
nodeStageSecretRef:
name: rook-csi-cephfs-node
namespace: rook-ceph
volumeAttributes:
clusterID: rook-ceph
fsName: data
rootPath: /
staticVolume: "true"
volumeHandle: pv-prod-fapr-ceph-data
persistentVolumeReclaimPolicy: Retain
volumeMode: Filesystem
+13
View File
@@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: prod-fapr-ceph-data
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
storageClassName: ""
volumeMode: Filesystem
volumeName: pv-prod-fapr-ceph-data
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Secret
metadata:
name: prod-fapr-redis
type: Opaque
data:
@@ -0,0 +1,12 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: secretstore
spec:
type: secretstores.kubernetes
version: v1
metadata:
- name: defaultNamespace
value: prod-fapr
scopes:
- prod-fapr
@@ -0,0 +1,22 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: statestore
spec:
type: state.redis
version: v1
metadata:
- name: redisHost
value: prod-fapr-redis:6379
- name: redisUsername
value: default
- name: redisPassword
secretKeyRef:
name: prod-fapr-redis
key: redis-password
- name: actorStateStore
value: "true"
- name: redisDB
value: "0"
scopes:
- prod-fapr
@@ -0,0 +1,11 @@
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: tracing
spec:
tracing:
samplingRate: "1"
otel:
endpointAddress: "10.255.241.12:4317"
protocol: grpc
isSecure: false
+42
View File
@@ -0,0 +1,42 @@
{{ if .Values.clusterConfig.argo.enabled }}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: {{ .Values.fapr.env }}-fapr
namespace: argocd
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
argocd.argoproj.io/compare-options: ServerSideDiff=true
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: {{ .Values.fapr.env }}-fapr
server: https://kubernetes.default.svc
project: atlantis
sources:
- repoURL: {{ .Values.clusterConfig.manifests }}
targetRevision: HEAD
path: helmfile.d
plugin:
name: helmfile-cmp
env:
- name: CLUSTER_NAME
value: {{ .Values.clusterConfig.cluster }}
- name: HELMFILE_ENVIRONMENT
value: {{ .Values.fapr.env }}
- name: HELMFILE_FILE_PATH
value: fapr.yaml.gotmpl
- repoURL: https://git.oceanbox.io/platform/manifests.git
targetRevision: main
ref: values
syncPolicy:
syncOptions:
- CreateNamespace=true
- ApplyOutOfSyncOnly=true
{{- if .Values.fapr.autosync }}
automated:
prune: true
selfHeal: false
{{- end }}
{{- end }}
+55
View File
@@ -0,0 +1,55 @@
replicaCount: 1
podAnnotations:
dapr.io/enabled: "true"
dapr.io/app-id: "prod-fapr"
dapr.io/app-port: "8080"
dapr.io/api-token-secret: "dapr-api-token"
dapr.io/config: "tracing"
dapr.io/app-protocol: "http"
dapr.io/log-as-json: "true"
dapr.io/sidecar-cpu-request: "10m"
dapr.io/sidecar-memory-request: "50Mi"
env:
- name: APP_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: APP_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: DAPR_API_TOKEN
valueFrom:
secretKeyRef:
name: dapr-api-token
key: token
persistence:
enabled: true
existingClaim: prod-fapr-ceph-data
redis:
enabled: true
replicas: 1
backup:
enabled: true
size: 2Gi
storageClass: "ceph-rbd"
secret:
name: "prod-fapr-redis"
key: "redis-password"
resources:
cpu: 100m
memory: 128Mi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "topology.kubernetes.io/group"
operator: In
values:
- srv
+1
View File
@@ -0,0 +1 @@
# Base values for fapr - overridden per environment