Skip to content

Commit bbe8314

Browse files
author
Rub21
committed
Add ingressClassName in ingress-web
2 parents 11f8424 + 653b5cd commit bbe8314

File tree

15 files changed

+156
-104
lines changed

15 files changed

+156
-104
lines changed

.github/workflows/chartpress.yaml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,29 @@ jobs:
1616
python-version: '3.6'
1717
- name: Setup git
1818
run: git config --global user.email "[email protected]" && git config --global user.name "Github Action"
19-
- name: Install Chartpress
19+
- name: Install Chartpress and some python modules
2020
run: |
21-
pip install -v chartpress && pip install six
21+
pip install -v chartpress && pip install six && pip install yq
22+
- name: Set env vars for publish charts
23+
run: |
24+
GIT_BRANCH_NAME=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}
25+
GIT_BRANCH_NAME=${GIT_BRANCH_NAME/\//_}
26+
OSM_SEED_VERSION=$(yq -r .appVersion ./osm-seed/Chart.yaml)
27+
SHORT_GITHUB_SHA=${GITHUB_SHA::7}
28+
echo "GIT_BRANCH_NAME=$GIT_BRANCH_NAME" >> $GITHUB_ENV
29+
echo "OSM_SEED_VERSION=$OSM_SEED_VERSION" >> $GITHUB_ENV
30+
echo "SHORT_GITHUB_SHA=$SHORT_GITHUB_SHA" >> $GITHUB_ENV
2231
- name: Run Chartpress
23-
run: chartpress --push --publish-chart
2432
env:
2533
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
26-
34+
GITHUB_EVENT_NAME: ${{ github.event_name }}
35+
run: |
36+
if [[ $GIT_BRANCH_NAME = "main" ]]
37+
then
38+
chartpress --push --publish-chart --tag ${OSM_SEED_VERSION}
39+
elif [[ $GIT_BRANCH_NAME = "develop" ]]
40+
then
41+
chartpress --push --publish-chart --tag ${OSM_SEED_VERSION}-dev.h$SHORT_GITHUB_SHA
42+
else
43+
chartpress --push --publish-chart
44+
fi

envs/.env.cloudprovider.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ GCP_STORAGE_BUCKET=osm-seed
1717
# Azure
1818
AZURE_STORAGE_ACCOUNT=osmseed
1919
AZURE_CONTAINER_NAME=osm-seed
20-
AZURE_STORAGE_ACCESS_KEY=...
2120
AZURE_STORAGE_CONNECTION_STRING=...

images/tiler-imposm/config/imposm3.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,69 @@
233233
}
234234
}
235235
},
236+
"landuse_points": {
237+
"fields": [
238+
{
239+
"type": "id",
240+
"name": "osm_id",
241+
"key": null
242+
},
243+
{
244+
"type": "geometry",
245+
"name": "geometry",
246+
"key": null
247+
},
248+
{
249+
"type": "string",
250+
"name": "name",
251+
"key": "name"
252+
},
253+
{
254+
"type": "mapping_value",
255+
"name": "type",
256+
"key": null
257+
},
258+
{
259+
"type": "pseudoarea",
260+
"name": "area",
261+
"key": null
262+
},
263+
{
264+
"type": "hstore_tags",
265+
"name": "tags",
266+
"key": null
267+
},
268+
{
269+
"type": "mapping_key",
270+
"name": "class",
271+
"key": null
272+
}
273+
],
274+
"type": "point",
275+
"mappings": {
276+
"landuse": {
277+
"mapping": {
278+
"landuse": [
279+
"__any__"
280+
]
281+
}
282+
},
283+
"leisure": {
284+
"mapping": {
285+
"leisure": [
286+
"__any__"
287+
]
288+
}
289+
},
290+
"natural": {
291+
"mapping": {
292+
"natural": [
293+
"__any__"
294+
]
295+
}
296+
}
297+
}
298+
},
236299
"water_areas": {
237300
"fields": [
238301
{

images/web/start.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ sed -i -e 's/smtp_authentication: null/smtp_authentication: "login"/g' $workdir/
2525
sed -i -e 's/smtp_user_name: null/smtp_user_name: "'$MAILER_USERNAME'"/g' $workdir/config/settings.yml
2626
sed -i -e 's/smtp_password: null/smtp_password: "'$MAILER_PASSWORD'"/g' $workdir/config/settings.yml
2727
sed -i -e 's/[email protected]/'$MAILER_FROM'/g' $workdir/config/settings.yml
28-
[[ -z "$MAILER_PORT" ]] && MAILER_PORT=25
2928
sed -i -e 's/smtp_port: 25/smtp_port: '$MAILER_PORT'/g' $workdir/config/settings.yml
3029

3130
#### SET UP ID KEY
3231
sed -i -e 's/#id_key: ""/id_key: "'$OSM_id_key'"/g' $workdir/config/settings.yml
3332

33+
## SET NOMINATIM URL
34+
sed -i -e 's/nominatim.openstreetmap.org/'$NOMINATIM_URL'/g' $workdir/config/settings.yml
35+
3436
#### CHECK IF DB IS ALREADY UP AND START THE APP
3537
flag=true
3638
while "$flag" = true; do

osm-seed/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v1
22
description: "Helm Chart to deploy the OpenStreetMap software"
33
name: osm-seed
4+
appVersion: 1.0.0
45
version: ''
5-

osm-seed/templates/NOTES.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
1. Get the application URL by running these commands:
2-
{{- if .Values.ingress.enabled }}
3-
{{- range .Values.ingress.hosts }}
4-
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
5-
{{- end }}
6-
{{- else if contains "minikube" .Values.cloudProvider }}
2+
{{- if contains "minikube" .Values.cloudProvider }}
73
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "osm-seed.fullname" . }}-web)
84
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
95
echo http://$NODE_IP:$NODE_PORT
@@ -17,4 +13,4 @@
1713
You can watch the status of by running 'kubectl get svc -w {{ template "osm-seed.fullname" . }}'
1814
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "osm-seed.fullname" . }}-web -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
1915
echo http://$SERVICE_IP
20-
{{- end }}
16+
{{- end }}

osm-seed/templates/db/db-backup-job.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ spec:
6464
value: {{ .Values.AZURE_STORAGE_ACCOUNT }}
6565
- name: AZURE_CONTAINER_NAME
6666
value: {{ .Values.AZURE_CONTAINER_NAME }}
67-
- name: AZURE_STORAGE_ACCESS_KEY
68-
value: {{ .Values.AZURE_STORAGE_ACCESS_KEY }}
6967
- name: AZURE_STORAGE_CONNECTION_STRING
7068
value: {{ .Values.AZURE_STORAGE_CONNECTION_STRING }}
7169
{{- end }}

osm-seed/templates/db/db-pd.yaml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ metadata:
1010
environment: {{ .Values.environment }}
1111
release: {{ .Release.Name }}
1212
spec:
13+
accessModes:
14+
- ReadWriteOnce
1315
############## Minikube ##############
1416
{{- if eq .Values.cloudProvider "minikube" }}
1517
storageClassName: local-storage
1618
capacity:
1719
storage: {{ .Values.db.persistenceDisk.localVolumeSize }}
18-
accessModes:
19-
- ReadWriteOnce
2020
hostPath:
2121
path: {{ .Values.db.persistenceDisk.localVolumeHostPath | quote }}
2222
{{- end }}
@@ -26,8 +26,6 @@ spec:
2626
storageClassName: ""
2727
capacity:
2828
storage: {{ .Values.db.persistenceDisk.AWS_ElasticBlockStore_size }}
29-
accessModes:
30-
- ReadWriteOnce
3129
awsElasticBlockStore:
3230
volumeID: {{ .Values.db.persistenceDisk.AWS_ElasticBlockStore_volumeID }}
3331
fsType: ext4
@@ -38,12 +36,22 @@ spec:
3836
storageClassName: ""
3937
capacity:
4038
storage: {{ .Values.db.persistenceDisk.GCP_gcePersistentDisk_size }}
41-
accessModes:
42-
- ReadWriteOnce
4339
gcePersistentDisk:
4440
pdName: {{ .Values.db.persistenceDisk.GCP_gcePersistentDisk_pdName }}
4541
fsType: ext4
4642
{{- end }}
43+
44+
############## Azure Provider ##############
45+
{{- if eq .Values.cloudProvider "azure" }}
46+
storageClassName: ""
47+
capacity:
48+
storage: {{ .Values.db.persistenceDisk.AZURE_diskSize }}
49+
persistentVolumeReclaimPolicy: Retain
50+
azureDisk:
51+
kind: Managed
52+
diskName: {{ .Values.db.persistenceDisk.AZURE_diskName }}
53+
diskURI: {{ .Values.db.persistenceDisk.AZURE_diskURI }}
54+
{{- end }}
4755
---
4856
apiVersion: v1
4957
kind: PersistentVolumeClaim
@@ -81,5 +89,10 @@ spec:
8189
{{- if eq .Values.cloudProvider "gcp" }}
8290
storage: {{ .Values.db.persistenceDisk.GCP_gcePersistentDisk_size }}
8391
{{- end }}
92+
93+
############## AZURE Provider ##############
94+
{{- if eq .Values.cloudProvider "azure" }}
95+
storage: {{ .Values.db.persistenceDisk.AZURE_diskSize }}
96+
{{- end }}
97+
{{- end }}
8498
{{- end }}
85-
{{- end }}

osm-seed/templates/ingress.yaml

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

osm-seed/templates/jobs/full-history-job.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ spec:
6060
value: {{ .Values.AZURE_STORAGE_ACCOUNT }}
6161
- name: AZURE_CONTAINER_NAME
6262
value: {{ .Values.AZURE_CONTAINER_NAME }}
63-
- name: AZURE_STORAGE_ACCESS_KEY
64-
value: {{ .Values.AZURE_STORAGE_ACCESS_KEY }}
6563
- name: AZURE_STORAGE_CONNECTION_STRING
6664
value: {{ .Values.AZURE_STORAGE_CONNECTION_STRING }}
6765
{{- end }}

0 commit comments

Comments
 (0)