Skip to content

Commit 720f46b

Browse files
committed
Updated Workflow
1 parent b718848 commit 720f46b

File tree

2 files changed

+26
-16
lines changed

2 files changed

+26
-16
lines changed

.github/workflows/deploy-azure.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,19 @@ jobs:
8888
run: envsubst < infra/k8s/memgraph.yaml | kubectl apply -f -
8989

9090
#──────────────────────── Smoke test ────────────────────────
91-
- name: Wait for rollout
92-
run: kubectl rollout status deployment/memgraph --timeout=5m
91+
- name: Wait for rollout (with diagnostics)
92+
run: |
93+
set -e
94+
if kubectl rollout status deployment/memgraph --timeout=10m ; then
95+
echo "Memgraph deployment ready ✓"
96+
else
97+
echo "::warning::Rollout timed out – printing diagnostics"
98+
kubectl get pods -o wide
99+
kubectl describe deployment memgraph || true
100+
POD=$(kubectl get pods -l app=memgraph -o jsonpath='{.items[0].metadata.name}' 2>/dev/null || true)
101+
if [ -n "$POD" ]; then
102+
kubectl describe pod "$POD" || true
103+
kubectl logs "$POD" --all-containers --tail=100 || true
104+
fi
105+
exit 1
106+
fi

infra/k8s/memgraph.yaml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
###############################################################
2-
# ConfigMap – runtime flags, add more keys as needed
2+
# ConfigMap
33
###############################################################
44
apiVersion: v1
55
kind: ConfigMap
@@ -25,15 +25,15 @@ spec:
2525
labels:
2626
app: memgraph
2727
annotations:
28-
credentials-hash: "${CREDENTIALS_HASH}" # forces rolling restart
28+
credentials-hash: "${CREDENTIALS_HASH}"
2929
spec:
30-
initContainers:
31-
- name: init-sysctl
32-
image: busybox:1.28
33-
command: ["sysctl", "-w", "vm.max_map_count=262144"]
34-
securityContext: { privileged: true }
30+
# ── sysctl without privileged container ──────────────────
31+
securityContext:
32+
sysctls:
33+
- name: vm.max_map_count
34+
value: "262144"
3535

36-
# Prefer (but don't require) the cheap B2ms nodes
36+
# node-affinity & tolerations (unchanged) …
3737
affinity:
3838
nodeAffinity:
3939
preferredDuringSchedulingIgnoredDuringExecution:
@@ -43,7 +43,6 @@ spec:
4343
- key: beta.kubernetes.io/instance-type
4444
operator: In
4545
values: [ Standard_B2ms ]
46-
4746
tolerations:
4847
- key: "node.kubernetes.io/memory-pressure"
4948
operator: "Exists"
@@ -58,7 +57,6 @@ spec:
5857
- { containerPort: 7444, name: http }
5958
- { containerPort: 3000, name: ui }
6059

61-
# secrets ➜ env vars
6260
env:
6361
- name: MEMGRAPH_USERNAME
6462
valueFrom: { secretKeyRef: { name: memgraph-credentials, key: username } }
@@ -69,11 +67,9 @@ spec:
6967
- name: MG_PASSWORD
7068
valueFrom: { secretKeyRef: { name: memgraph-credentials, key: password } }
7169

72-
# load everything from the config-map automatically
7370
envFrom:
7471
- configMapRef: { name: memgraph-config }
7572

76-
# durable volumes
7773
volumeMounts:
7874
- { name: data, mountPath: /data }
7975
- { name: logs, mountPath: /var/log/memgraph }
@@ -101,7 +97,7 @@ spec:
10197
persistentVolumeClaim: { claimName: memgraph-logs }
10298
---
10399
###############################################################
104-
# Persistent Volume Claims – backed by Standard HDD Azure Disk
100+
# PVCs
105101
###############################################################
106102
apiVersion: v1
107103
kind: PersistentVolumeClaim
@@ -122,7 +118,7 @@ spec:
122118
resources: { requests: { storage: 5Gi } }
123119
---
124120
###############################################################
125-
# Service – public LoadBalancer with stable DNS label
121+
# Service
126122
###############################################################
127123
apiVersion: v1
128124
kind: Service

0 commit comments

Comments
 (0)