Skip to content

Commit b4029a9

Browse files
committed
chore: align with the existing structure
1 parent c1f256f commit b4029a9

11 files changed

Lines changed: 180 additions & 149 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ repos:
55
- id: trailing-whitespace
66
- id: end-of-file-fixer
77
- id: check-yaml
8+
exclude: ^applications/.*/internal/
89
- id: check-case-conflict
910
- id: detect-private-key
1011

applications/argocd/staging/applications/montandon-eoapi/application.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ spec:
105105
- path: applications/argocd/staging/applications/montandon-eoapi/internal/
106106
targetRevision: develop
107107
repoURL: https://github.com/IFRCGo/go-deploy.git
108+
helm:
109+
valuesObject:
110+
azure:
111+
clientID: 9b1f12a8-4ae9-4281-afa9-948451f77dce
112+
secretProviderClass:
113+
enabled: true
114+
keyvaultName: montandon-eoapi-staging
108115

109116
- repoURL: https://github.com/developmentseed/stac-auth-proxy.git
110117
targetRevision: v0.9.2
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: v2
2+
name: montandon-eoapi-extra-manifests
3+
description: Montandon eoAPI extra manifests
4+
type: application
5+
6+
version: 0.1.0
7+
appVersion: "1.0"

applications/argocd/staging/applications/montandon-eoapi/stac-auth-proxy/montandon_filters.py renamed to applications/argocd/staging/applications/montandon-eoapi/internal/files/stac-auth-proxy/montandon_filters.py

File renamed without changes.
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "https://example.com/stac/queryables",
4+
"type": "object",
5+
"title": "Queryables for Monty STAC API",
6+
"description": "Queryable names for the Monty STAC API",
7+
"properties": {
8+
"id": {
9+
"description": "Item identifier",
10+
"type": "string"
11+
},
12+
"collection": {
13+
"description": "Collection identifier",
14+
"type": "string"
15+
},
16+
"datetime": {
17+
"description": "Datetime",
18+
"type": "string",
19+
"format": "date-time"
20+
},
21+
"geometry": {
22+
"description": "Geometry",
23+
"type": "object"
24+
},
25+
"monty:episode_number": {
26+
"description": "The episode number of the event (deprecated)",
27+
"type": "integer"
28+
},
29+
"monty:country_codes": {
30+
"description": "The country codes of the countries affected by the event, hazard, impact or response",
31+
"type": "array",
32+
"items": {
33+
"type": "string",
34+
"pattern": "^([A-Z]{3})|AB9$"
35+
}
36+
},
37+
"monty:corr_id": {
38+
"description": "The unique identifier assigned by the Monty system to the reference event",
39+
"type": "string"
40+
},
41+
"monty:hazard_codes": {
42+
"description": "The hazard codes of the hazards affecting the event",
43+
"type": "array",
44+
"items": {
45+
"type": "string",
46+
"pattern": "^([A-Z]{2}(?:\\d{4}$){0,1})|([a-z]{3}-[a-z]{3}-[a-z]{3}-[a-z]{3})|([A-Z]{2})$"
47+
}
48+
},
49+
"roles": {
50+
"description": "The roles of the item",
51+
"type": "array",
52+
"items": {
53+
"type": "string",
54+
"enum": ["event", "reference", "source", "hazard", "impact", "response"]
55+
}
56+
},
57+
"monty:hazard_detail.cluster": {
58+
"description": "The cluster of the hazard (deprecated)",
59+
"type": "string"
60+
},
61+
"monty:hazard_detail.severity_value": {
62+
"description": "The estimated maximum hazard intensity/magnitude/severity value",
63+
"type": "number"
64+
},
65+
"monty:hazard_detail.severity_unit": {
66+
"description": "The unit of the severity value",
67+
"type": "string"
68+
},
69+
"monty:hazard_detail.estimate_type": {
70+
"description": "The type of the estimate",
71+
"type": "string",
72+
"enum": ["primary", "secondary", "modelled"]
73+
},
74+
"monty:impact_detail.category": {
75+
"description": "The category of impact",
76+
"type": "string",
77+
"enum": [
78+
"people", "crops", "women", "men", "children_0_4", "children_5_9",
79+
"children_10_14", "children_15_19", "adult_20_24", "adult_25_29",
80+
"adult_30_34", "adult_35_39", "adult_40_44", "adult_45_49",
81+
"adult_50_54", "adult_55_59", "adult_60_64", "elderly",
82+
"wheelchair_users", "roads", "railways", "vulnerable_employment",
83+
"buildings", "reconstruction_costs", "hospitals", "schools",
84+
"local_currency", "global_currency", "local_currency_adj",
85+
"global_currency_adj", "usd_uncertain", "cattle", "aid_general",
86+
"ifrc_contribution", "ifrc_requested", "alertscore", "households"
87+
]
88+
},
89+
"monty:impact_detail.type": {
90+
"description": "The estimated value type of the impact",
91+
"type": "string",
92+
"enum": [
93+
"unspecified", "unaffected", "damaged", "destroyed", "potentially_damaged",
94+
"affected_total", "affected_direct", "affected_indirect", "death",
95+
"missing", "injured", "evacuated", "relocated", "assisted",
96+
"shelter_emergency", "shelter_temporary", "shelter_longterm", "in_need",
97+
"targeted", "disrupted", "cost", "homeless", "displaced_internal",
98+
"displaced_external", "displaced_total", "alertscore", "potentially_affected",
99+
"highest_risk"
100+
]
101+
},
102+
"monty:impact_detail.value": {
103+
"description": "The estimated impact value",
104+
"type": "number"
105+
},
106+
"monty:impact_detail.unit": {
107+
"description": "The units of the impact estimate",
108+
"type": "string"
109+
},
110+
"monty:impact_detail.estimate_type": {
111+
"description": "The type of the estimate",
112+
"type": "string",
113+
"enum": ["primary", "secondary", "modelled"]
114+
},
115+
"monty:impact_detail.description": {
116+
"description": "The description of the impact",
117+
"type": "string"
118+
}
119+
},
120+
"additionalProperties": true
121+
}

applications/argocd/staging/applications/montandon-eoapi/internal/queryables-cm.yaml

Lines changed: 0 additions & 131 deletions
This file was deleted.

applications/argocd/staging/applications/montandon-eoapi/internal/montandon-eoapi-spc.yaml renamed to applications/argocd/staging/applications/montandon-eoapi/internal/templates/montandon-eoapi-spc.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1+
{{- if .Values.azure.secretProviderClass.enabled -}}
2+
13
apiVersion: secrets-store.csi.x-k8s.io/v1
24
kind: SecretProviderClass
35
metadata:
46
name: azure-secret-provider-montandon-eoapi
7+
{{- with .Values.commonAnnotations }}
58
annotations:
6-
argocd.argoproj.io/hook: "Sync"
7-
argocd.argoproj.io/sync-wave: "-7"
8-
argocd.argoproj.io/hook-delete-policy: "BeforeHookCreation"
9+
{{- toYaml . | nindent 4 }}
10+
{{- end }}
911
spec:
1012
provider: azure
1113
parameters:
1214
usePodIdentity: "false"
13-
clientID: "9b1f12a8-4ae9-4281-afa9-948451f77dce"
14-
keyvaultName: "montandon-eoapi-staging"
15-
tenantId: "a2b53be5-734e-4e6c-ab0d-d184f60fd917"
15+
clientID: {{ required "azure.clientID" .Values.azure.clientID }}
16+
tenantId: {{ required "azure.tenantId" .Values.azure.tenantId }}
17+
keyvaultName: {{ required "azure.secretProviderClass.keyvaultName" .Values.azure.secretProviderClass.keyvaultName }}
1618
objects: |
1719
array:
1820
- |
@@ -74,3 +76,5 @@ spec:
7476
key: DB_PORT
7577
- objectName: DB-PORT
7678
key: port
79+
80+
{{- end }}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: stac-auth-proxy-filters
5+
{{- with .Values.commonAnnotations }}
6+
annotations:
7+
{{- toYaml . | nindent 4 }}
8+
{{- end }}
9+
data:
10+
montandon_filters.py: |
11+
{{ .Files.Get "files/stac-auth-proxy/montandon_filters.py" | indent 4 }}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: montandon-eoapi-stac-queryables
5+
{{- with .Values.commonAnnotations }}
6+
annotations:
7+
{{- toYaml . | nindent 4 }}
8+
{{- end }}
9+
data:
10+
stac_queryables.json: |
11+
{{ .Files.Get "files/stac_queryables.json" | indent 4 }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Create all resources before normal sync
2+
commonAnnotations:
3+
argocd.argoproj.io/hook: "Sync"
4+
argocd.argoproj.io/sync-wave: "-7"
5+
argocd.argoproj.io/hook-delete-policy: "BeforeHookCreation"
6+
7+
azure:
8+
tenantId: a2b53be5-734e-4e6c-ab0d-d184f60fd917
9+
clientID:
10+
secretProviderClass:
11+
enabled: true
12+
keyvaultName:

0 commit comments

Comments
 (0)