diff --git a/deployment/overlays/prod/deployment.yaml b/deployment/overlays/prod/deployment.yaml new file mode 100644 index 00000000..9dc7ec40 --- /dev/null +++ b/deployment/overlays/prod/deployment.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: treetracker-query-api + namespace: webmap + labels: + app: treetracker-query-api +spec: + replicas: 1 + selector: + matchLabels: + app: treetracker-query-api + template: + metadata: + labels: + app: treetracker-query-api + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: doks.digitalocean.com/node-pool + operator: In + values: + - microservices-node-pool + containers: + - name: treetracker-query-api + image: greenstand/treetracker-query-api:TAG + ports: + - containerPort: 80 + env: + - name: DATABASE_URL + valueFrom: + secretKeyRef: + name: dbconnection + key: database diff --git a/deployment/overlays/prod/kustomization.yaml b/deployment/overlays/prod/kustomization.yaml index 0ca88b7f..f5b4a6a9 100644 --- a/deployment/overlays/prod/kustomization.yaml +++ b/deployment/overlays/prod/kustomization.yaml @@ -1,4 +1,5 @@ bases: - ../../base patchesStrategicMerge: - - database-connection-sealed-secret.yaml + - treetracker-webmap-api-mapping.yaml + - deployment.yaml diff --git a/deployment/overlays/prod/treetracker-webmap-api-mapping.yaml b/deployment/overlays/prod/treetracker-webmap-api-mapping.yaml new file mode 100644 index 00000000..b3c8d74a --- /dev/null +++ b/deployment/overlays/prod/treetracker-webmap-api-mapping.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: getambassador.io/v2 +kind: Mapping +metadata: + name: treetracker-query-api + namespace: webmap +spec: + cors: + origins: + - '*' + - https://wallet.treetracker.org + - https://freetown.treetracker.org + - https://map.treetracker.org + - https://forestmatic.com + - https://app.forestmatic.com + - https://staging-app.forestmatic.com