diff --git a/base/backend/backend-deployment.yaml b/base/backend/backend-deployment.yaml index 2841cda..3ed9b88 100644 --- a/base/backend/backend-deployment.yaml +++ b/base/backend/backend-deployment.yaml @@ -14,41 +14,35 @@ spec: metadata: labels: app: employee-backend - spec: serviceAccountName: backend-sa - securityContext: runAsUser: 1000 runAsGroup: 3000 fsGroup: 2000 - containers: - name: employee-backend - image: adelyao/employee-backend:latest + image: docker.io/adelyao/employee-be:test imagePullPolicy: Always ports: - containerPort: 4000 - envFrom: - configMapRef: name: app-config - secretRef: name: db-secret - readinessProbe: httpGet: path: /api/health port: 4000 initialDelaySeconds: 15 - periodSeconds: 5 + periodSeconds: 5 livenessProbe: httpGet: path: /api/health port: 4000 initialDelaySeconds: 15 periodSeconds: 5 - resources: requests: memory: "64Mi" @@ -56,7 +50,6 @@ spec: limits: memory: "128Mi" cpu: "200m" - securityContext: runAsNonRoot: true readOnlyRootFilesystem: true @@ -64,7 +57,6 @@ spec: capabilities: drop: - ALL - --- apiVersion: v1 kind: Service @@ -80,4 +72,8 @@ spec: targetPort: 4000 protocol: TCP selector: - app: employee-backend \ No newline at end of file + app: employee-backend + template: + spec: + containers: + - image: docker.io/adelyao/employee-be:test diff --git a/base/frontend/frontend-deployment.yaml b/base/frontend/frontend-deployment.yaml index 05a0e41..1077db9 100644 --- a/base/frontend/frontend-deployment.yaml +++ b/base/frontend/frontend-deployment.yaml @@ -16,18 +16,15 @@ spec: app: employee-frontend spec: serviceAccountName: frontend-sa - securityContext: runAsUser: 1000 runAsGroup: 3000 fsGroup: 2000 - containers: - name: employee-frontend - image: adelyao/employee-frontend:latest + image: docker.io/adelyao/employee-fe:test ports: - containerPort: 8080 - readinessProbe: httpGet: path: / @@ -40,7 +37,6 @@ spec: port: 8080 initialDelaySeconds: 30 periodSeconds: 10 - securityContext: runAsNonRoot: true readOnlyRootFilesystem: false @@ -48,7 +44,6 @@ spec: capabilities: drop: - ALL - resources: requests: memory: "64Mi" @@ -56,15 +51,12 @@ spec: limits: memory: "128Mi" cpu: "200m" - volumeMounts: - name: run mountPath: /run - volumes: - name: run emptyDir: {} - --- apiVersion: v1 kind: Service @@ -73,7 +65,7 @@ metadata: namespace: intern-workspace labels: app: employee-frontend -spec: +spec: type: NodePort ports: - port: 8080 @@ -81,4 +73,8 @@ spec: nodePort: 30080 protocol: TCP selector: - app: employee-frontend \ No newline at end of file + app: employee-frontend + template: + spec: + containers: + - image: docker.io/adelyao/employee-fe:test