troubleshoot icon indicating copy to clipboard operation
troubleshoot copied to clipboard

Validate Node Port Available

Open dexhorthy opened this issue 2 years ago • 1 comments

Disclaimer -- not sure if this exists, couldn't find it in the docs.

Describe the rationale for the suggested feature.

As a vendor packaging an app, I might want to hard code an application node port for some reason, perhaps on port 443. I want a way to preflight check that this port is

  1. in the clusters configured NodePortRange
  2. Not already in use

Describe the feature

analyzer

a new analyzer clusterNodePortAvailable with a single argument port that would allow me to check if that port is available to use.

collector

Also, whatever collector might be needed to source the info to power the analyzer

docs / example

A documented example would be great, e.g.

apiVersion: troubleshot.sh/v1beta1
kind: Preflight
metadata:
  name: nodeport
spec:
  collectors:
    - availableNodePorts: {}
  analyzers:
    - nodePortAvailable:
        port: 443

Describe alternatives you've considered

I haven't considered any alternatives. Not using a NodePort comes to mind, although I think as a software vendor, NodePort a simple, scrappy approach to have in my arsenal, especially for single-node appliance-y application installs.

Additional context

Example of a KOTS App Manager failure that could result from trying to deploy an app that does not have the port available.

Screen Shot 2023-01-18 at 10 27 05 AM

dexhorthy avatar Jan 18 '23 17:01 dexhorthy