diff --git a/helm/apf/templates/deployments/app.yaml b/helm/apf/templates/deployments/app.yaml index 6775b44e..408003f0 100644 --- a/helm/apf/templates/deployments/app.yaml +++ b/helm/apf/templates/deployments/app.yaml @@ -25,6 +25,7 @@ spec: imagePullPolicy: {{ .Values.app.pullPolicy }} command: - invoke + - migrate - uwsgi - --port - {{ .Values.app.container.port | quote }} diff --git a/helm/apf/templates/deployments/celery.yaml b/helm/apf/templates/deployments/celery.yaml index 49067cd2..222b90e1 100644 --- a/helm/apf/templates/deployments/celery.yaml +++ b/helm/apf/templates/deployments/celery.yaml @@ -25,10 +25,6 @@ spec: imagePullPolicy: {{ .Values.celery.pullPolicy }} command: - invoke - # - wait-for - # - redis-master:6379 - # - wait-for - # - postgresql:5432 - celery-queues envFrom: - secretRef: diff --git a/helm/apf/templates/ingress.yaml b/helm/apf/templates/ingress.yaml index 77131771..aabbea21 100644 --- a/helm/apf/templates/ingress.yaml +++ b/helm/apf/templates/ingress.yaml @@ -1,10 +1,6 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "apf.fullname" . -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }} @@ -14,23 +10,23 @@ metadata: traefik.ingress.kubernetes.io/router.entrypoints: web, websecure cert-manager.io/cluster-issuer: {{ .Values.certificate.issuername | quote }} spec: - backend: - serviceName: {{ $fullName }} - servicePort: {{ .Values.ingress.app.port }} {{- if .Values.ingress.tls }} tls: - secretName: {{ $fullName }}-cert + - secretName: {{ $fullName }}-cert {{- end }} rules: {{- range .Values.ingress.hosts }} - host: {{ .host | quote }} http: paths: - {{- range .paths }} - - path: {{ . }} - backend: - serviceName: {{ .serviceName }} - servicePort: {{ .servicePort }} - {{- end }} + {{- range .paths }} + - path: {{ .path }} + pathType: Prefix + backend: + service: + name: {{ $fullName }} + port: + number: {{ .servicePort }} + {{- end }} {{- end }} {{- end }} diff --git a/helm/apf/templates/secrets.yaml b/helm/apf/templates/secrets.yaml index 21382e33..1401b138 100644 --- a/helm/apf/templates/secrets.yaml +++ b/helm/apf/templates/secrets.yaml @@ -15,12 +15,12 @@ data: # Postgres POSTGRES_DB: {{ .Values.postgresql.postgresqlDatabase | b64enc | quote }} POSTGRES_USER: {{ .Values.postgresql.postgresqlUsername | b64enc | quote }} - POSTGRES_HOST: {{ include "postgresql.fullname" . | b64enc | quote }} + POSTGRES_HOST: {{ printf "%s-postgresql" (include "apf.name" .) | b64enc | quote }} POSTGRES_PORT: {{ .Values.postgresql.service.port | b64enc | quote }} POSTGRES_PASSWORD: {{ required "postgres password is needed" .Values.postgresql.postgresqlPassword | b64enc | quote }} # Celery CELERY_BROKER_PROTOCOL: {{ .Values.celery.broker.protocol | b64enc | quote }} - CELERY_BROKER_HOST: {{ include "redis.fullname" . | b64enc | quote }} + CELERY_BROKER_HOST: {{ printf "%s-redis-master" (include "apf.name" .) | b64enc | quote }} CELERY_BROKER_PORT: {{ .Values.redis.redisPort | b64enc | quote }} CELERY_BROKER_DB: {{ .Values.redis.db | b64enc | quote }} CELERY_REDIRECT_STDOUTS_LEVEL: {{ .Values.celery.stdouts_level | b64enc | quote }} diff --git a/helm/apf/values.yaml b/helm/apf/values.yaml index f1c475fa..1465201e 100644 --- a/helm/apf/values.yaml +++ b/helm/apf/values.yaml @@ -59,14 +59,13 @@ serviceAccount: name: "" ingress: - enabled: false + enabled: true app: port: 80 hosts: - host: nemperfeina.cat paths: - path: / - serviceName: aaa servicePort: 8000 certificate: diff --git a/tasks.py b/tasks.py index 08e54b33..61b36223 100644 --- a/tasks.py +++ b/tasks.py @@ -52,8 +52,8 @@ def uwsgi( command_args = [ "uwsgi", - "--chdir=..", - "--module=bff.config.wsgi:application", + "--chdir=.", + "--module=jobs.wsgi:application", "--master", listen, f"--processes={workers}",