@@ -85,25 +85,26 @@ func (d *NetworkDiagnostic) AvailableParameters() []types.Parameter {
8585 },
8686 {
8787 Name : FlagNetworkDiagPodImage ,
88- Description : "Image to use for diagnostic pod" ,
88+ Description : "Override the default diagnostic pod image. Any image with bash and chroot support " ,
8989 Target : & d .PodImage ,
90- Default : util . GetNetworkDiagDefaultPodImage () ,
90+ Default : "" ,
9191 },
9292 {
93- Name : FlagNetworkDiagTestPodImage ,
94- Description : "Image to use for diagnostic test pod" ,
95- Target : & d .TestPodImage ,
96- Default : util .GetNetworkDiagDefaultTestPodImage (),
93+ Name : FlagNetworkDiagTestPodImage ,
94+ Description : fmt .Sprintf ("Override the default diagnostic test pod image. Any image that accepts protocol --%s on port --%s" ,
95+ FlagNetworkDiagTestPodProtocol , FlagNetworkDiagTestPodPort ),
96+ Target : & d .TestPodImage ,
97+ Default : "" ,
9798 },
9899 {
99100 Name : FlagNetworkDiagTestPodProtocol ,
100- Description : "Protocol used to connect to diagnostic test pod" ,
101+ Description : "Override the default diagnostic test pod protocol " ,
101102 Target : & d .TestPodProtocol ,
102103 Default : util .NetworkDiagDefaultTestPodProtocol ,
103104 },
104105 {
105106 Name : FlagNetworkDiagTestPodPort ,
106- Description : "Serving port on the diagnostic test pod" ,
107+ Description : "Override the default diagnostic test pod port " ,
107108 Target : & d .TestPodPort ,
108109 Default : util .NetworkDiagDefaultTestPodPort ,
109110 },
@@ -120,6 +121,13 @@ func (d *NetworkDiagnostic) Complete(logger *log.Logger) error {
120121 }
121122 d .LogDir = logdir
122123
124+ if len (d .PodImage ) == 0 {
125+ d .PodImage = util .GetNetworkDiagDefaultPodImage ()
126+ }
127+ if len (d .TestPodImage ) == 0 {
128+ d .TestPodImage = util .GetNetworkDiagDefaultTestPodImage ()
129+ }
130+
123131 supportedProtocols := sets .NewString (string (kapi .ProtocolTCP ), string (kapi .ProtocolUDP ))
124132 if ! supportedProtocols .Has (d .TestPodProtocol ) {
125133 return fmt .Errorf ("invalid protocol for network diagnostic test pod. Supported protocols: %s" , strings .Join (supportedProtocols .List (), "," ))
0 commit comments