You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add KubernetesActions deploy backend that manages ExApp lifecycle
(deploy, expose, remove) via HaRP's Kubernetes API endpoints.
Wire K8s flow into CLI commands (register/unregister daemon and ExApp)
and pass kubernetes deploy config from the Vue frontend.
Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
Copy file name to clipboardExpand all lines: lib/Command/Daemon/RegisterDaemon.php
+92-2Lines changed: 92 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -50,13 +50,27 @@ protected function configure(): void {
50
50
$this->addOption('harp_docker_socket_port', null, InputOption::VALUE_REQUIRED, '\'remotePort\' of the FRP client of the remote Docker socket proxy. There is one included in the harp container so this can be skipped for default setups.', '24000');
51
51
$this->addOption('harp_exapp_direct', null, InputOption::VALUE_NONE, 'Flag for the advanced setups only. Disables the FRP tunnel between ExApps and HaRP.');
$this->addOption('k8s_expose_type', null, InputOption::VALUE_REQUIRED, 'Kubernetes Service type: nodeport|clusterip|loadbalancer|manual (default: clusterip)', 'clusterip');
56
+
$this->addOption('k8s_node_port', null, InputOption::VALUE_REQUIRED, 'Optional NodePort (30000-32767) for nodeport expose type');
57
+
$this->addOption('k8s_upstream_host', null, InputOption::VALUE_REQUIRED, 'Override upstream host for HaRP to reach ExApps. Required for manual expose type.');
58
+
$this->addOption('k8s_external_traffic_policy', null, InputOption::VALUE_REQUIRED, 'Cluster|Local for NodePort/LoadBalancer Service types');
59
+
$this->addOption('k8s_load_balancer_ip', null, InputOption::VALUE_REQUIRED, 'Optional LoadBalancer IP for loadbalancer expose type');
60
+
$this->addOption('k8s_node_address_type', null, InputOption::VALUE_REQUIRED, 'InternalIP|ExternalIP for auto node selection (default: InternalIP)', 'InternalIP');
if (!in_array($k8sExternalTrafficPolicy, $validPolicies)) {
147
+
$output->writeln(sprintf('Value error: Invalid k8s_external_traffic_policy "%s". Must be one of: %s', $k8sExternalTrafficPolicy, implode(', ', $validPolicies)));
if (!in_array($k8sNodeAddressType, $validNodeAddressTypes)) {
155
+
$output->writeln(sprintf('Value error: Invalid k8s_node_address_type "%s". Must be one of: %s', $k8sNodeAddressType, implode(', ', $validNodeAddressTypes)));
156
+
return1;
157
+
}
158
+
}
159
+
84
160
if ($acceptsDeployId === 'manual-install' && !$isHarp && str_contains($host, ':')) {
85
161
$output->writeln('<comment>Warning: The host contains a port, which will be ignored for manual-install daemons. The ExApp\'s port from --json-info will be used instead.</comment>');
86
162
}
@@ -94,18 +170,32 @@ protected function execute(InputInterface $input, OutputInterface $output): int
94
170
? $input->getOption('harp_shared_key')
95
171
: $input->getOption('haproxy_password') ?? '';
96
172
173
+
// For K8s, 'net' is not used (K8s has its own networking), default to 'bridge' to avoid validation issues
0 commit comments