From 2e148faf0e68d92c7aab2ba3146082bf983277e2 Mon Sep 17 00:00:00 2001 From: muhuchah Date: Mon, 26 Aug 2024 11:53:26 +0330 Subject: [PATCH] update values --- templates/configmap.yml | 2 +- templates/deployment-backend.yml | 2 ++ templates/deployment-frontend.yml | 4 ++- templates/ingress.yml | 27 ++++++++++++++++++ templates/pvc.yml | 20 +++++++------- values.yaml | 46 +++++++++++++++++++------------ 6 files changed, 71 insertions(+), 30 deletions(-) create mode 100644 templates/ingress.yml diff --git a/templates/configmap.yml b/templates/configmap.yml index b531325..9df86d1 100644 --- a/templates/configmap.yml +++ b/templates/configmap.yml @@ -9,5 +9,5 @@ data: POSTGRES_USER: "postgres" POSTGRES_PASSWORD: "postgres" HOST: "postgres" - PORT: {{ .Values.postgres.port }} + PORT: "{{ .Values.postgres.port }}" POSTGRES_CONNECTION_STRING: "Host=postgres;Database=postgres;Username=postgres;Password=postgres;" diff --git a/templates/deployment-backend.yml b/templates/deployment-backend.yml index a36fe92..a84a2a5 100644 --- a/templates/deployment-backend.yml +++ b/templates/deployment-backend.yml @@ -12,6 +12,8 @@ spec: labels: app: backend spec: + imagePullSecrets: + - name: {{ .Values.abrimentImagePullSecret.name }} initContainers: - name: migrate image: {{ .Values.backend.repository }}:{{ .Values.backend.tag }} diff --git a/templates/deployment-frontend.yml b/templates/deployment-frontend.yml index 042749b..b5a095a 100644 --- a/templates/deployment-frontend.yml +++ b/templates/deployment-frontend.yml @@ -12,6 +12,8 @@ spec: labels: app: frontend spec: + imagePullSecrets: + - name: {{ .Values.abrimentImagePullSecret.name }} containers: - name: frontend image: {{ .Values.frontend.repository }}:{{ .Values.frontend.tag }} @@ -23,5 +25,5 @@ spec: memory: {{ .Values.frontend.resources.requests.memory }} cpu: {{ .Values.frontend.resources.requests.cpu }} limits: - memory: {{ .Values.frontend.resources.limits.memory }}" + memory: {{ .Values.frontend.resources.limits.memory }} cpu: {{ .Values.frontend.resources.limits.cpu }} diff --git a/templates/ingress.yml b/templates/ingress.yml new file mode 100644 index 0000000..d50bd4a --- /dev/null +++ b/templates/ingress.yml @@ -0,0 +1,27 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: my-ingress + namespace: 0b12e0d24d4541c097bbaab164438125-negar + labels: + app: nginxn +spec: + ingressClassName: my-ingress + rules: + - host: noice.abriment.com + http: + paths: + - path: /api + pathType: Prefix + backend: + service: + name: back-service + port: + number: {{ .Values.backend.service.port }} + - path: / + pathType: Prefix + backend: + service: + name: front-service + port: + number: {{ .Values.frontend.service.port }} diff --git a/templates/pvc.yml b/templates/pvc.yml index cb624d1..8b69ae5 100644 --- a/templates/pvc.yml +++ b/templates/pvc.yml @@ -1,10 +1,10 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: db-persistent-pvc -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ .Values.postgres.pvc.storage }} +#apiVersion: v1 +#kind: PersistentVolumeClaim +#metadata: +# name: db-persistent-pvc +#spec: +# accessModes: +# - ReadWriteOnce +# resources: +# requests: +# storage: {{ .Values.postgres.pvc.storage }} diff --git a/values.yaml b/values.yaml index 94a7c63..1f18644 100644 --- a/values.yaml +++ b/values.yaml @@ -1,7 +1,10 @@ backend: - repository: negar-backend + #repository: registry.abriment.com/mhch/negar-backend + repository: docker.arvancloud.ir/mhchah/imagebuilder + #repository: negar-backend pullPolicy: IfNotPresent - tag: "latest" + #pullPolicy: Always + tag: v0.0.3 replicaCount: 1 port: 80 @@ -11,11 +14,11 @@ backend: resources: requests: - memory: "256Mi" - cpu: "500m" + memory: "3000Mi" + cpu: "2000m" limits: - memory: "512Mi" - cpu: "1" + memory: "3000Mi" + cpu: "2000m" postgres: repository: postgres @@ -26,22 +29,25 @@ postgres: service: type: ClusterIP - port: 80 + port: 5432 resources: requests: - memory: "500Mi" - cpu: "500m" + memory: "3000Mi" + cpu: "2000m" limits: - memory: "1Gi" - cpu: "1" + memory: "3000Mi" + cpu: "2000m" pvc: - storage: 1Gi + storage: "3Gi" frontend: - repository: negar-frontend + # repository: docker.arvancloud.ir/mhchah/negar-frontend + #repository: negar-frontend + repository: docker.arvancloud.ir/mhchah/imagebuilder pullPolicy: IfNotPresent - tag: "latest" + # tag: v0.11.3 + tag: v0.0.8 replicaCount: 1 port: 80 @@ -51,8 +57,12 @@ frontend: resources: requests: - memory: "256Mi" - cpu: "500m" + memory: "3000Mi" + cpu: "2000m" limits: - memory: "512Mi" - cpu: "1" + memory: "3000Mi" + cpu: "2000m" + +abrimentImagePullSecret: + name: negar-abrsecret +