Skip to content

Commit

Permalink
deploy: publishing to eks cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
Delyc committed Dec 18, 2024
1 parent f299bb9 commit 61a1d3a
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 56 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release-publish-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ jobs:
- name: Deploy to EKS
run: |
kubectl apply -f k8s/deployments
kubectl apply -f k8s/services
kubectl apply -f k8s/secrets
kubectl apply -f ../k8s/deployments
kubectl apply -f ../k8s/services
kubectl apply -f ../k8s/secrets
151 changes: 98 additions & 53 deletions k8s/deployments/mpm-backend.yaml
Original file line number Diff line number Diff line change
@@ -1,68 +1,113 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{},"name":"mpm-backend","namespace":"default"},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"mpm-backend"}},"template":{"metadata":{"labels":{"app":"mpm-backend"}},"spec":{"containers":[{"env":[{"name":"APP_NAME","value":"MicroPowerManager"},{"name":"APP_ENV","value":"demo"},{"name":"APP_KEY","valueFrom":{"secretKeyRef":{"key":"APP_KEY","name":"mpm-secrets"}}},{"name":"APP_DEBUG","value":"false"},{"name":"MPM_LOAD_DEMO_DATA","value":"true"},{"name":"DB_CONNECTION","value":"micro_power_manager"},{"name":"DB_HOST","valueFrom":{"secretKeyRef":{"key":"DB_HOST","name":"mpm-secrets"}}},{"name":"DB_PORT","value":"3306"},{"name":"DB_DATABASE","value":"micro_power_manager"},{"name":"DB_USERNAME","valueFrom":{"secretKeyRef":{"key":"DB_USERNAME","name":"mpm-secrets"}}},{"name":"DB_PASSWORD","valueFrom":{"secretKeyRef":{"key":"DB_PASSWORD","name":"mpm-secrets"}}},{"name":"REDIS_HOST","value":"redis-db-service"},{"name":"REDIS_PORT","value":"6379"},{"name":"JWT_SECRET","valueFrom":{"secretKeyRef":{"key":"JWT_SECRET","name":"mpm-secrets"}}},{"name":"CACHE_DRIVER","value":"redis"},{"name":"QUEUE_DRIVER","value":"database"}],"image":"enaccess/micropowermanager-backend:latest","imagePullPolicy":"Always","name":"mpm-backend","ports":[{"containerPort":80}]}]}}}}
creationTimestamp: "2024-12-13T05:46:55Z"
generation: 1
name: mpm-backend
namespace: default
resourceVersion: "57999261"
uid: 9990f78f-7be0-4ced-991c-f11349f3033e
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: mpm-backend
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app: mpm-backend
spec:
containers:
- name: mpm-backend
image: enaccess/micropowermanager-backend:latest
imagePullPolicy: Always
ports:
- containerPort: 80
env:
- name: APP_NAME
value: MicroPowerManager
- name: APP_ENV
value: demo
- name: APP_KEY
valueFrom:
secretKeyRef:
name: mpm-secrets
key: APP_KEY
- name: APP_DEBUG
value: "false"
- name: MPM_LOAD_DEMO_DATA
value: "true"
- name: DB_CONNECTION
value: micro_power_manager
- name: DB_HOST
valueFrom:
secretKeyRef:
name: mpm-secrets
key: DB_HOST
- name: DB_PORT
value: "3306"
- name: DB_DATABASE
value: micro_power_manager
- name: DB_USERNAME
valueFrom:
secretKeyRef:
name: mpm-secrets
key: DB_USERNAME
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: mpm-secrets
key: DB_PASSWORD
- name: REDIS_HOST
value: redis-db-service
- name: REDIS_PORT
value: "6379"
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: mpm-secrets
key: JWT_SECRET
- name: CACHE_DRIVER
value: redis
- name: QUEUE_DRIVER
value: database
- env:

Check failure on line 33 in k8s/deployments/mpm-backend.yaml

View workflow job for this annotation

GitHub Actions / Run yamllint

33:7 [indentation] wrong indentation: expected 8 but found 6
- name: APP_NAME

Check failure on line 34 in k8s/deployments/mpm-backend.yaml

View workflow job for this annotation

GitHub Actions / Run yamllint

34:9 [indentation] wrong indentation: expected 10 but found 8
value: MicroPowerManager
- name: APP_ENV
value: demo
- name: APP_KEY
valueFrom:
secretKeyRef:
key: APP_KEY
name: mpm-secrets
- name: APP_DEBUG
value: "false"
- name: MPM_LOAD_DEMO_DATA
value: "true"
- name: DB_CONNECTION
value: micro_power_manager
- name: DB_HOST
valueFrom:
secretKeyRef:
key: DB_HOST
name: mpm-secrets
- name: DB_PORT
value: "3306"
- name: DB_DATABASE
value: micro_power_manager
- name: DB_USERNAME
valueFrom:
secretKeyRef:
key: DB_USERNAME
name: mpm-secrets
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
key: DB_PASSWORD
name: mpm-secrets
- name: REDIS_HOST
value: redis-db-service
- name: REDIS_PORT
value: "6379"
- name: JWT_SECRET
valueFrom:
secretKeyRef:
key: JWT_SECRET
name: mpm-secrets
- name: CACHE_DRIVER
value: redis
- name: QUEUE_DRIVER
value: database
image: enaccess/micropowermanager-backend:latest
imagePullPolicy: Always
name: mpm-backend
ports:
- containerPort: 80

Check failure on line 85 in k8s/deployments/mpm-backend.yaml

View workflow job for this annotation

GitHub Actions / Run yamllint

85:9 [indentation] wrong indentation: expected 10 but found 8
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
status:
availableReplicas: 1
conditions:
- lastTransitionTime: "2024-12-13T05:47:18Z"

Check failure on line 98 in k8s/deployments/mpm-backend.yaml

View workflow job for this annotation

GitHub Actions / Run yamllint

98:3 [indentation] wrong indentation: expected 4 but found 2
lastUpdateTime: "2024-12-13T05:47:18Z"
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- lastTransitionTime: "2024-12-13T05:46:55Z"
lastUpdateTime: "2024-12-13T05:47:18Z"
message: ReplicaSet "mpm-backend-7b59564f89" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
observedGeneration: 1
readyReplicas: 1
replicas: 1
updatedReplicas: 1

0 comments on commit 61a1d3a

Please sign in to comment.