diff --git a/deployments/k8s/base/backend-config-map.yaml b/deployments/k8s/base/backend-config-map.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d80cecfeed7897a43cbdcff94f0f68d479abc8c7 --- /dev/null +++ b/deployments/k8s/base/backend-config-map.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: fairregister-config-map +data: + SPRING_DATASOURCE_URL: jdbc:postgresql://fairregister-postgres:5432/fairregister + SPRING_RABBITMQ_HOST: rabbitmq.rabbitmq.svc.cluster.local + SPRING_RABBITMQ_PORT: "5672" + SPRING_JPA_HIBERNATE_DDL_AUTO: update + MINIO_URL: http://49.12.218.124:9000 diff --git a/deployments/k8s/base/backend-deployment.yaml b/deployments/k8s/base/backend-deployment.yaml index 030c63c33df45938f50001d88dd64a9282820928..256f307748cca86048a7cfc40e14a9a53b230dbd 100644 --- a/deployments/k8s/base/backend-deployment.yaml +++ b/deployments/k8s/base/backend-deployment.yaml @@ -22,8 +22,6 @@ spec: ports: - containerPort: 8080 env: - - name: SPRING_DATASOURCE_URL - value: jdbc:postgresql://fairregister-postgres:5432/fairregister - name: SPRING_DATASOURCE_USERNAME valueFrom: secretKeyRef: @@ -34,14 +32,9 @@ spec: secretKeyRef: key: password name: postgres.fairregister-postgres.credentials - - name: SPRING_RABBITMQ_HOST - value: rabbitmq - - name: SPRING_RABBITMQ_PORT - value: "5672" - - name: SPRING_JPA_HIBERNATE_DDL_AUTO - value: update - - name: MINIO_URL - value: http://nginx-minio:9000 + envFrom: + - configMapRef: + name: fairregister-config-map --- apiVersion: apps/v1 @@ -67,15 +60,9 @@ spec: cpu: "1000m" ports: - containerPort: 8081 - env: - - name: SPRING_RABBITMQ_HOST - value: rabbitmq - - name: SPRING_RABBITMQ_PORT - value: "5672" - - name: SPRING_JPA_HIBERNATE_DDL_AUTO - value: update - - name: MINIO_URL - value: http://nginx-minio:9000 + envFrom: + - configMapRef: + name: fairregister-config-map --- apiVersion: apps/v1 @@ -101,9 +88,9 @@ spec: cpu: "1000m" ports: - containerPort: 8082 - env: - - name: SPRING_PROFILES_ACTIVE - value: localdocker + envFrom: + - configMapRef: + name: fairregister-config-map --- apiVersion: apps/v1 @@ -129,12 +116,6 @@ spec: cpu: "1000m" ports: - containerPort: 8083 - env: - - name: SPRING_RABBITMQ_HOST - value: rabbitmq - - name: SPRING_RABBITMQ_PORT - value: "5672" - - name: SPRING_JPA_HIBERNATE_DDL_AUTO - value: update - - name: MINIO_URL - value: http://nginx-minio:9000 + envFrom: + - configMapRef: + name: fairregister-config-map diff --git a/deployments/k8s/base/backend-service.yaml b/deployments/k8s/base/backend-service.yaml index 9813c9ffdf141ead1f2ccdf81e30abf0013343d1..3d779a8d51b7694e940a8478fbf7718e5a754738 100644 --- a/deployments/k8s/base/backend-service.yaml +++ b/deployments/k8s/base/backend-service.yaml @@ -7,7 +7,7 @@ spec: app: api-service ports: - protocol: TCP - port: 80 + port: 8080 targetPort: 8080 --- @@ -21,7 +21,7 @@ spec: app: hashing-service ports: - protocol: TCP - port: 80 + port: 8081 targetPort: 8081 --- @@ -35,7 +35,7 @@ spec: app: ipfs-service ports: - protocol: TCP - port: 80 + port: 8082 targetPort: 8082 --- @@ -49,5 +49,5 @@ spec: app: post-registration-service ports: - protocol: TCP - port: 80 + port: 8083 targetPort: 8083 diff --git a/deployments/k8s/base/kustomization.yaml b/deployments/k8s/base/kustomization.yaml index e98d5be6e6fada4f2ca3042a986af2770bbc5b04..c17b7dba82bce058965bd60f7598d1602bdc3890 100644 --- a/deployments/k8s/base/kustomization.yaml +++ b/deployments/k8s/base/kustomization.yaml @@ -1,5 +1,6 @@ resources: - backend-deployment.yaml + - backend-config-map.yaml - backend-service.yaml - frontend-deployment.yaml - frontend-service.yaml