Add release v0.1.9
This commit is contained in:
@@ -15,11 +15,28 @@ spec:
|
||||
app: sync-daemon
|
||||
spec:
|
||||
hostNetwork: true
|
||||
initContainers:
|
||||
- name: fix-perms
|
||||
image: alpine:latest
|
||||
securityContext:
|
||||
privileged: true
|
||||
runAsUser: 0
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
echo "Fixing permissions on /home/ubuntu/vmware-vix-disklib-distrib..."
|
||||
chown -R 1000:1000 /home/ubuntu/vmware-vix-disklib-distrib
|
||||
chmod 755 /home/ubuntu/vmware-vix-disklib-distrib
|
||||
volumeMounts:
|
||||
- name: vmwarelib
|
||||
mountPath: /home/ubuntu/vmware-vix-disklib-distrib
|
||||
containers:
|
||||
- name: sync-container
|
||||
image: alpine:latest
|
||||
securityContext:
|
||||
privileged: true
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
ports:
|
||||
- containerPort: 873
|
||||
volumeMounts:
|
||||
@@ -31,17 +48,13 @@ spec:
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
# Install required packages
|
||||
apk add --no-cache rsync coreutils grep;
|
||||
# Extract variables from environment file
|
||||
apk add --no-cache rsync coreutils grep
|
||||
IS_MASTER=$(grep -E '^export IS_MASTER=' /etc/pf9/k3s.env | cut -d'=' -f2)
|
||||
MASTER_IP=$(grep -E '^export MASTER_IP=' /etc/pf9/k3s.env | cut -d'=' -f2)
|
||||
if [ "$IS_MASTER" = "true" ]; then
|
||||
echo "Master node detected. IP: $MASTER_IP"
|
||||
# Start rsync daemon using the pre-created config file
|
||||
echo "Starting rsync daemon..."
|
||||
rsync --daemon --config=/etc/pf9/rsyncd.conf --no-detach
|
||||
# Verify rsync daemon is running
|
||||
if ps aux | grep rsync | grep -v grep; then
|
||||
echo "rsync daemon is running."
|
||||
else
|
||||
@@ -59,7 +72,7 @@ spec:
|
||||
else
|
||||
echo "Sync failed. Retrying in 60 seconds..."
|
||||
fi
|
||||
sleep 20 # Retry every 60 seconds
|
||||
sleep 20
|
||||
done
|
||||
fi
|
||||
volumes:
|
||||
@@ -70,4 +83,8 @@ spec:
|
||||
- name: vmwarelib
|
||||
hostPath:
|
||||
path: /home/ubuntu/vmware-vix-disklib-distrib
|
||||
type: DirectoryOrCreate
|
||||
type: DirectoryOrCreate
|
||||
- name: env
|
||||
hostPath:
|
||||
type: Directory
|
||||
path: /etc/pf9/env
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# This file is used to set environment variables to be injected into v2v-helper
|
||||
# User can populate this file via cloud-init
|
||||
|
||||
|
||||
Reference in New Issue
Block a user