Skip to content

Commit

Permalink
feat: add dpr mockup
Browse files Browse the repository at this point in the history
  • Loading branch information
nleconte-csgroup committed Apr 19, 2024
1 parent e6b8fd3 commit 17d3c30
Show file tree
Hide file tree
Showing 9 changed files with 248 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ The catalog's database is a PostgreSQL database with the PostGIS extension. It i

The frontend is a simple FastAPI interface based on Swagger exposing the endpoints. A user can use it to interact with the rs-server backends (CADIP, ADGS, catalog, etc).

## [mockup-station-adgs](charts/mockup-station-adgs)

A simple mock for ADGS station.

## [mockup-station-cadip](charts/mockup-station-cadip)

A simple mock for CADIP station.

## [mockup-processor-dpr](charts/mockup-processor-dpr)

A simple mock for DPR processor.

---

Find more documentation on the [rs-server repository](https://github.com/RS-PYTHON/rs-server).
Expand Down
23 changes: 23 additions & 0 deletions charts/mockup-processor-dpr/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
8 changes: 8 additions & 0 deletions charts/mockup-processor-dpr/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
appVersion: {{APP_VERSION}}
description: MOCKUP PROCESSOR DPR
name: mockup-processor-dpr
version: {{CHART_VERSION}}
maintainers:
- name: CS GROUP
url: https://github.com/RS-PYTHON/rs-helm
63 changes: 63 additions & 0 deletions charts/mockup-processor-dpr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# rs-server-adgs

![Version: 0.0.1-a7](https://img.shields.io/badge/Version-0.0.1--a7-informational?style=flat-square) ![AppVersion: v0.1a7](https://img.shields.io/badge/AppVersion-v0.1a7-informational?style=flat-square)

RS SERVER ADGS

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| CS GROUP | | <https://github.com/RS-PYTHON/rs-helm> |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| app.confDir | string | `"/app/conf"` | Config directory for the application |
| app.eodagConfigFile | string | `"adgs_ws_config.yaml"` | EODAG configuration file for the application |
| app.port | int | `8000` | Port for the application |
| app.station.endpoint.secret.password | string | `"test"` | Password to authenticate with the ADGS endpoint |
| app.station.endpoint.secret.username | string | `"test"` | Username to authenticate with the ADGS endpoint |
| app.station.endpoint.url | string | `"http://mockup-station-adgs-svc.processing.svc.cluster.local:8080/Products"` | ADGS URL |
| app.stationConfigFile | string | `"stations_cfg.json"` | Station configuration file for the application |
| app.uacURL | string | `"http://apikeymanager.processing.svc.cluster.local:8000/check/api_key"` | URL of the API Key Manager service |
| app.workDir | string | `"/app"` | Working directory for the application |
| image.PullPolicy | string | `"Always"` | Image pull policy |
| image.name | string | `"rs-server-adgs"` | Image name |
| image.registry | string | `"ghcr.io"` | Image registry |
| image.repository | string | `"rs-python"` | Image repository |
| image.tag | string | `"latest"` | Image tag version |
| ingress.host | string | `"subdomain.example.com"` | Ingress host name |
| ingress.issuer.name | string | `"letsencrypt-prod"` | Ingress Issuer name |
| ingress.issuer.type | string | `"cluster-issuer"` | Ingress Issuer type |
| ingress.path | string | `"/adgs"` | Ingress path |
| namespace | string | `"processing"` | Namespace for the deployment |
| obs.endpoint | string | `"http://minio.minio.svc.cluster.local:9000"` | URL of the object storage service endpoint |
| obs.region | string | `"sbg"` | Region of the object storage service |
| obs.secret.ak | string | `"TDr8foJqSygBQ9YFmWDy"` | Access Key to authenticate with the object storage service |
| obs.secret.sk | string | `"z2RaqjFttnVZRTsLLqmy4PE6PzJOKzPsE47alDBs"` | Secret Key to authenticate with the object storage service |
| postgres.db | string | `"rspydemo"` | PostgreSQL database name |
| postgres.host | string | `"postgresql-cluster-rw.database.svc.cluster.local"` | PostgreSQL service URL |
| postgres.port | string | `"5432"` | PostgreSQL port |
| postgres.secret.pass | string | `"test"` | Password to authenticate with the PostgreSQL service |
| postgres.secret.user | string | `"test"` | Username to authenticate with the PostgreSQL service |
| probe.liveness.initialDelaySeconds | int | `30` | InitialDelaySeconds for the liveness probe |
| probe.liveness.path | string | `"/health"` | Path for the liveness probe |
| probe.liveness.periodSeconds | int | `30` | periodSeconds for the liveness probe |
| probe.liveness.port | int | `8000` | Port for the liveness probe |
| probe.liveness.timeoutSeconds | int | `5` | timeoutSeconds for the liveness probe |
| probe.readiness.initialDelaySeconds | int | `30` | InitialDelaySeconds for the readiness probe |
| probe.readiness.path | string | `"/health"` | Path for the readiness probe |
| probe.readiness.periodSeconds | int | `30` | periodSeconds for the readiness probe |
| probe.readiness.port | int | `8000` | Port for the readiness probe |
| probe.readiness.timeoutSeconds | int | `5` | timeoutSeconds for the readiness probe |
| replicaCount | int | `1` | Number of replicas for the deployment |
| resources.limit.cpu | string | `"500m"` | Pod CPU limit |
| resources.limit.ram | string | `"1000Mi"` | Pod memory limit |
| resources.request.cpu | string | `"100m"` | Pod CPU request |
| resources.request.ram | string | `"256Mi"` | Pod memory request |
| service.port | int | `8080` | Port for the service |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0)
4 changes: 4 additions & 0 deletions charts/mockup-processor-dpr/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ .Chart.Name }}
======

This is a chart for the installation of {{ .Release.Name }} in version {{ .Chart.Version}}
65 changes: 65 additions & 0 deletions charts/mockup-processor-dpr/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: {{ .Release.Name }}
namespace: {{ .Values.namespace }}
generation: 1
labels:
app: {{ .Release.Name }}
annotations:
deployment.kubernetes.io/revision: '1'
spec:
selector:
matchLabels:
app: {{ .Release.Name }}
replicas: {{ .Values.replicaCount }}
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 100%
maxUnavailable: 50%
template:
metadata:
name: {{ .Release.Name }}
labels:
app: {{ .Release.Name }}
type: {{ .Values.namespace }}
spec:
terminationGracePeriodSeconds: 30
containers:
- name: {{ .Release.Name }}
image: {{ .Values.image.registry }}/{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.PullPolicy }}
resources:
requests:
memory: {{ .Values.resources.request.ram }}
cpu: {{ .Values.resources.request.cpu }}
limits:
memory: {{ .Values.resources.limit.ram }}
cpu: {{ .Values.resources.limit.cpu }}
ports:
- name: web
protocol: TCP
containerPort: {{ .Values.app.port }}
env:
- name: S3_ENDPOINT
value: {{ .Values.obs.endpoint }}
- name: S3_REGION
value: {{ .Values.obs.region }}
- name: S3_ACCESSKEY
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-obs
key: ak
- name: S3_SECRETKEY
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-obs
key: sk
securityContext:
privileged: false
#imagePullSecrets:
#- name: {{ .Values.image.imagePullSecrets }}
restartPolicy: Always
securityContext: {}
revisionHistoryLimit: 10
9 changes: 9 additions & 0 deletions charts/mockup-processor-dpr/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-obs
namespace: {{ .Values.namespace }}
type: Opaque
data:
ak: {{ .Values.obs.secret.ak | b64enc | quote }}
sk: {{ .Values.obs.secret.sk | b64enc | quote }}
14 changes: 14 additions & 0 deletions charts/mockup-processor-dpr/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
kind: Service
apiVersion: v1
metadata:
name: {{ .Release.Name }}-svc
labels:
app: {{ .Release.Name }}-svc
spec:
selector:
app: {{ .Release.Name }}
ports:
- name: {{ .Release.Name }}-service
protocol: TCP
port: {{ .Values.service.port }}
targetPort: {{ .Values.app.port }}
50 changes: 50 additions & 0 deletions charts/mockup-processor-dpr/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# -- Namespace for the deployment
namespace: processing

# -- Number of replicas for the deployment
replicaCount: 1

service:
# -- Port for the service
port: 8080

app:
# -- Port for the application
port: 8000

obs:
# -- URL of the object storage service endpoint
endpoint: http://minio.minio.svc.cluster.local:9000
# -- Region of the object storage service
region: sbg
secret:
# -- Access Key to authenticate with the object storage service
ak: TDr8foJqSygBQ9YFmWDy
# -- Secret Key to authenticate with the object storage service
sk: z2RaqjFttnVZRTsLLqmy4PE6PzJOKzPsE47alDBs

image:
#imagePullSecrets: regcred
# -- Image registry
registry: ghcr.io
# -- Image repository
repository: rs-python
# -- Image name
name: rs-testmeans_dpr-processor-mock
# -- Image tag version
tag: latest
# -- Image pull policy
PullPolicy: Always
#imagePullSecrets: regcred

resources:
request:
# -- Pod memory request
ram: "256Mi"
# -- Pod CPU request
cpu: "100m"
limit:
# -- Pod memory limit
ram: "1000Mi"
# -- Pod CPU limit
cpu: "500m"

0 comments on commit 17d3c30

Please sign in to comment.