``` # Set default Kafka broker for UMH ...
# general
f
Copy code
# Set default Kafka broker for UMH
        $KUBECTL_PATH get configmap mgmtcompanion-config -n mgmtcompanion -o json | jq >configmap_temp.json
        $JQ_PATH '.data.brokers.kafka = "ip: \"united-manufacturing-hub-kafka.united-manufacturing-hub.svc.cluster.local\"\nport: 9092"' configmap_temp.json >modified_configmap_temp.json
        if ! $KUBECTL_PATH apply -f modified_configmap_temp.json >>$temp_dir/mgmt_install.log 2>&1; then
            handleWarning "Failed to set default Kafka broker for UMH." "Check the logs for any error messages."
        fi

        # Restart mgmtcompanion pod (if existing), to pick up the config changes
        $KUBECTL_PATH delete pod -n mgmtcompanion -l app=mgmtcompanion >>$temp_dir/mgmt_install.log 2>&1

    fi
    handleSuccess "Installed UMH Helm Chart"
This is the relevant code, so i guess it is stuck at restarting the pod.
2 Views