From b8e8f5e378a9c58794304a170d2ee34bff943e01 Mon Sep 17 00:00:00 2001 From: Rub21 Date: Wed, 27 Mar 2024 23:20:10 -0500 Subject: [PATCH] Update ingress for web container --- osm-seed/templates/web/web-ingress.yaml | 18 ++-- osm-seed/values.yaml | 138 ++++++++++-------------- 2 files changed, 68 insertions(+), 88 deletions(-) diff --git a/osm-seed/templates/web/web-ingress.yaml b/osm-seed/templates/web/web-ingress.yaml index 4df537c9..2747cdd2 100644 --- a/osm-seed/templates/web/web-ingress.yaml +++ b/osm-seed/templates/web/web-ingress.yaml @@ -2,18 +2,22 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ template "osm-seed.fullname" . }}-ingress-web + name: {{ template "osm-seed.fullname" . }}-ingress annotations: kubernetes.io/ingress.class: nginx cert-manager.io/cluster-issuer: letsencrypt-prod-issuer spec: + ingressClassName: nginx tls: - - hosts: - - web.{{ .Values.domain }} - secretName: {{ template "osm-seed.fullname" . }}-secret-web - + - hosts: + {{- if .Values.web.ingressDomain }} + - {{ .Values.web.ingressDomain }} + {{- else }} + - web.{{ .Values.domain }} + {{- end }} + secretName: {{ template "osm-seed.fullname" . }}-tls-secret rules: - - host: web.{{ .Values.domain }} + - host: {{ if .Values.web.ingressDomain }}{{ .Values.web.ingressDomain }}{{ else }}web.{{ .Values.domain }}{{ end }} http: paths: - path: / @@ -23,4 +27,4 @@ spec: name: {{ template "osm-seed.fullname" . }}-web port: number: 80 -{{- end }} \ No newline at end of file +{{- end }} diff --git a/osm-seed/values.yaml b/osm-seed/values.yaml index e414d67e..22c7f4dd 100644 --- a/osm-seed/values.yaml +++ b/osm-seed/values.yaml @@ -7,31 +7,25 @@ osmSeedVersion: develop-9302179 environment: development # cloudProvider is provider where you are going to deploy osm-seed, it could be: aws, gcp, azure, minikube -cloudProvider: minikube - +cloudProvider: aws # ==================================================================================================== # AWS: In case you are using the cloudProvider=aws set the below variables, We are assuming the nodes has a policies access to S3 # ==================================================================================================== AWS_S3_BUCKET: s3://osm-seed - # ==================================================================================================== # GCP: In case you are using the cloudProvider=gcp set the below variables, We are assuming the nodes has a policies to upload files to cloud storage # ==================================================================================================== GCP_STORAGE_BUCKET: gs://osm-seed-test - # ==================================================================================================== # AZURE: In case you are using the cloudProvider=azure set the below variables # ==================================================================================================== AZURE_STORAGE_ACCOUNT: osmseed AZURE_CONTAINER_NAME: osm-seed AZURE_STORAGE_CONNECTION_STRING: xyz.. - # ==================================================== # AWS: Specify ARN for SSL certificate, currently assumes a single wildcard cert # ==================================================== - AWS_SSL_ARN: false - # Specify serviceType. # # serviceType can be one of three values: 'NodePort', 'ClusterIP' or 'LoadBalancer' @@ -46,8 +40,7 @@ AWS_SSL_ARN: false # as the SSL certificate for your services. Else, you will need to configure # SSL separately. # serviceType: NodePort -serviceType: LoadBalancer - +serviceType: clusterIP # Domain that is pointed to the clusterIP # You will need to create an A record like *.osmseed.example.com pointed to the ClusterIP # Then, the cluster configuration will setup services at their respective subdomains: @@ -55,16 +48,14 @@ serviceType: LoadBalancer # - overpass.osmseed.example.com # - nominatim.osmseed.example.com # - etc. -domain: osmseed.example.com - +domain: dev.osmseed.org # ==================================================================================================== # Configuration for Lets Encrypt setup # ==================================================================================================== # Admin Email address used when generating Lets Encrypt certificates. # You will be notified of expirations, etc. on this email address. -adminEmail: admin@example.com - +adminEmail: admin@osmseed.org # ==================================================================================================== # ==================================================================================================== # ==================================Pods Configurations=============================================== @@ -75,7 +66,7 @@ adminEmail: admin@example.com # Variables for osm-seed database # ==================================================================================================== db: - enabled: false + enabled: true image: name: "" tag: "" @@ -115,11 +106,12 @@ db: # Variables for osm-seed website # ==================================================================================================== web: - enabled: false + enabled: true image: name: "" tag: "" replicaCount: 1 + ingressDomain: www.dev.osmseed.org serviceAnnotations: {} env: MAILER_ADDRESS: smtp.gmail.com @@ -154,7 +146,7 @@ web: # Variables for memcached. Memcached is used to store session cookies # ==================================================================================================== memcached: - enabled: false + enabled: true nodeSelector: enabled: false label_key: nodegroup_type @@ -167,13 +159,11 @@ memcached: limits: memory: "8Gi" cpu: "2" - # ==================================================================================================== # Variables for id-editor # ==================================================================================================== idEditor: enabled: false - # ==================================================================================================== # Variables for full-history container # ==================================================================================================== @@ -197,64 +187,62 @@ fullHistory: limits: memory: "16Gi" cpu: "4" - - # ==================================================================================================== - # Variables for osm-seed database backup and restore - # ==================================================================================================== + # ==================================================================================================== + # Variables for osm-seed database backup and restore + # ==================================================================================================== dbBackupRestore: image: name: "developmentseed/osmseed-backup-restore" tag: "0.1.0-0.dev.git.942.h994af82" cronjobs: - - name: web-db - enabled: false - schedule: "* * * * *" - env: - # DB action: backup/restore - DB_ACTION: backup - # Naming backup files - SET_DATE_AT_NAME: true - BACKUP_CLOUD_FOLDER: database/web-db - BACKUP_CLOUD_FILE: osmseed-api-web-db - AWS_S3_BUCKET: secure-bucket - # Clean up backups options - CLEANUP_BACKUPS: true - RETENTION_DAYS: "30" - resources: + - name: web-db enabled: false - requests: - memory: "300Mi" - cpu: "0.5" - limits: - memory: "400Mi" - cpu: "0.6" - nodeSelector: + schedule: "* * * * *" + env: + # DB action: backup/restore + DB_ACTION: backup + # Naming backup files + SET_DATE_AT_NAME: true + BACKUP_CLOUD_FOLDER: database/web-db + BACKUP_CLOUD_FILE: osmseed-api-web-db + AWS_S3_BUCKET: secure-bucket + # Clean up backups options + CLEANUP_BACKUPS: true + RETENTION_DAYS: "30" + resources: + enabled: false + requests: + memory: "300Mi" + cpu: "0.5" + limits: + memory: "400Mi" + cpu: "0.6" + nodeSelector: + enabled: false + - name: osmcha-db enabled: false - - name: osmcha-db - enabled: false - schedule: "* * * * *" - env: - # DB action: backup/restore - DB_ACTION: backup - # Naming backup files - SET_DATE_AT_NAME: true - BACKUP_CLOUD_FOLDER: database/osmcha-db - BACKUP_CLOUD_FILE: osmseed-osmcha-db - AWS_S3_BUCKET: secure-bucket - # Clean up backups options - CLEANUP_BACKUPS: true - RETENTION_DAYS: "30" - resources: - enabled: false - requests: - memory: "300Mi" - cpu: "0.5" - limits: - memory: "400Mi" - cpu: "0.6" - nodeSelector: - enabled: false - + schedule: "* * * * *" + env: + # DB action: backup/restore + DB_ACTION: backup + # Naming backup files + SET_DATE_AT_NAME: true + BACKUP_CLOUD_FOLDER: database/osmcha-db + BACKUP_CLOUD_FILE: osmseed-osmcha-db + AWS_S3_BUCKET: secure-bucket + # Clean up backups options + CLEANUP_BACKUPS: true + RETENTION_DAYS: "30" + resources: + enabled: false + requests: + memory: "300Mi" + cpu: "0.5" + limits: + memory: "400Mi" + cpu: "0.6" + nodeSelector: + enabled: false # ==================================================================================================== # Variables for osm-seed for osmosis, this configuration os to get the planet dump files from apidb # ==================================================================================================== @@ -276,7 +264,6 @@ planetDump: cpu: "4" nodeSelector: enabled: false - # ==================================================================================================== # Variables for replication-job, Configuration to create the replication files by, minute, hour, or day # ==================================================================================================== @@ -295,7 +282,6 @@ replicationJob: cpu: "10" nodeSelector: enabled: false - # ==================================================================================================== # Variables for osm-seed to pupulate the apidb # ==================================================================================================== @@ -314,7 +300,6 @@ populateApidb: limits: memory: "2Gi" cpu: "2.5" - # ==================================================================================================== # Variables to start a pod to process osm files # ==================================================================================================== @@ -334,7 +319,6 @@ osmProcessor: limits: memory: "16Gi" cpu: "4" - # ==================================================================================================== # Variables for tiler-db # ==================================================================================================== @@ -380,7 +364,6 @@ tilerDb: enabled: false label_key: nodegroup_type label_value: tiler - # ==================================================================================================== # Variables for tiler-imposm # ==================================================================================================== @@ -567,7 +550,6 @@ tmApi: limits: memory: "2Gi" cpu: "2" - # ==================================================================================================== # Variables for nominatim api # ==================================================================================================== @@ -618,7 +600,6 @@ nominatimApi: GCP_gcePersistentDisk_size: 50Gi nodeSelector: enabled: false - # ==================================================================================================== # Variables for overpass-api # ==================================================================================================== @@ -710,7 +691,6 @@ osmSimpleMetrics: cpu: "2" nodeSelector: enabled: false - # ==================================================================================================== # Variables for osm-simple-metrics # ==================================================================================================== @@ -733,7 +713,6 @@ monitoringReplication: cpu: "2" nodeSelector: enabled: false - # ==================================================================================================== # Variables for changeset-replication-job, Configuration to create the replication files by, minute, hour, or day # ==================================================================================================== @@ -779,7 +758,6 @@ osmchaApi: OSM_SERVER_URL: https://www.osmseed.org OAUTH_REDIRECT_URI: https://osmcha-staging.osmseed.org/oauth-landing.html OSM_PLANET_BASE_URL: https://s3.amazonaws.com/planet.osmseed.org/replication/changesets/ - ## frontend OSMCHA_URL: https://osmcha-staging.osmseed.org OSMCHA_API_URL: www.osmseed.org @@ -800,7 +778,6 @@ osmchaApi: enabled: false label_key: nodegroup_type label_value: db - # ==================================================================================================== # Variables for osmcha DB # ==================================================================================================== @@ -836,7 +813,6 @@ osmchaDb: GCP_gcePersistentDisk_size: 50Gi nodeSelector: enabled: false - # ==================================================================================================== # Planet server files # ====================================================================================================