@@ -221,22 +221,22 @@ type ExperimentAttributes struct {
221221// ProbeAttributes contains details of probe, which can be applied on the experiments
222222type ProbeAttributes struct {
223223 // Name of probe
224- Name string `json:"name"`
224+ Name string `json:"name,omitempty "`
225225 // Type of probe
226- Type string `json:"type"`
226+ Type string `json:"type,omitempty "`
227227 // inputs needed for the k8s probe
228- K8sProbeInputs * K8sProbeInputs `json:"k8sProbe/inputs,omitempty"`
228+ K8sProbeInputs K8sProbeInputs `json:"k8sProbe/inputs,omitempty"`
229229 // inputs needed for the http probe
230- HTTPProbeInputs * HTTPProbeInputs `json:"httpProbe/inputs,omitempty"`
230+ HTTPProbeInputs HTTPProbeInputs `json:"httpProbe/inputs,omitempty"`
231231 // inputs needed for the cmd probe
232- CmdProbeInputs * CmdProbeInputs `json:"cmdProbe/inputs,omitempty"`
232+ CmdProbeInputs CmdProbeInputs `json:"cmdProbe/inputs,omitempty"`
233233 // inputs needed for the prometheus probe
234- PromProbeInputs * PromProbeInputs `json:"promProbe/inputs,omitempty"`
234+ PromProbeInputs PromProbeInputs `json:"promProbe/inputs,omitempty"`
235235 // RunProperty contains timeout, retry and interval for the probe
236- RunProperties RunProperty `json:"runProperties"`
236+ RunProperties RunProperty `json:"runProperties,omitempty "`
237237 // mode for k8s probe
238238 // it can be SOT, EOT, Edge
239- Mode string `json:"mode"`
239+ Mode string `json:"mode,omitempty "`
240240 // Data contains the manifest/data for the resource, which need to be created
241241 // it supported for create operation only
242242 Data string `json:"data,omitempty"`
@@ -245,11 +245,11 @@ type ProbeAttributes struct {
245245// K8sProbeInputs contains all the inputs required for k8s probe
246246type K8sProbeInputs struct {
247247 // group of the resource
248- Group string `json:"group"`
248+ Group string `json:"group,omitempty "`
249249 // apiversion of the resource
250- Version string `json:"version"`
250+ Version string `json:"version,omitempty "`
251251 // kind of resource
252- Resource string `json:"resource"`
252+ Resource string `json:"resource,omitempty "`
253253 // ResourceNames to get the resources using their list of comma separated names
254254 ResourceNames string `json:"resourceNames,omitempty"`
255255 // namespace of the resource
@@ -260,24 +260,24 @@ type K8sProbeInputs struct {
260260 LabelSelector string `json:"labelSelector,omitempty"`
261261 // Operation performed by the k8s probe
262262 // it can be create, delete, present, absent
263- Operation string `json:"operation"`
263+ Operation string `json:"operation,omitempty "`
264264}
265265
266- // CmdProbeInputs contains all the inputs required for cmd probe
266+ //CmdProbeInputs contains all the inputs required for cmd probe
267267type CmdProbeInputs struct {
268268 // Command need to be executed for the probe
269- Command string `json:"command"`
269+ Command string `json:"command,omitempty "`
270270 // Comparator check for the correctness of the probe output
271- Comparator ComparatorInfo `json:"comparator"`
271+ Comparator ComparatorInfo `json:"comparator,omitempty "`
272272 // The source where we have to run the command
273273 // It will run in inline(inside experiment itself) mode if source is nil
274- Source * SourceDetails `json:"source,omitempty"`
274+ Source SourceDetails `json:"source,omitempty"`
275275}
276276
277277// SourceDetails contains source details of the cmdProbe
278278type SourceDetails struct {
279279 // Image for the source pod
280- Image string `json:"image"`
280+ Image string `json:"image,omitempty "`
281281 // HostNetwork define the hostNetwork of the external pod
282282 // it supports boolean values and default value is false
283283 HostNetwork bool `json:"hostNetwork,omitempty"`
@@ -308,16 +308,16 @@ type SourceDetails struct {
308308 ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
309309}
310310
311- // PromProbeInputs contains all the inputs required for prometheus probe
311+ //PromProbeInputs contains all the inputs required for prometheus probe
312312type PromProbeInputs struct {
313313 // Endpoint for the prometheus probe
314- Endpoint string `json:"endpoint"`
315- // Query to get prometheus metrics
314+ Endpoint string `json:"endpoint,omitempty "`
315+ // Query to get promethus metrics
316316 Query string `json:"query,omitempty"`
317317 // QueryPath contains filePath, which contains prometheus query
318318 QueryPath string `json:"queryPath,omitempty"`
319319 // Comparator check for the correctness of the probe output
320- Comparator ComparatorInfo `json:"comparator"`
320+ Comparator ComparatorInfo `json:"comparator,omitempty "`
321321}
322322
323323// ComparatorInfo contains the comparator details
@@ -328,34 +328,34 @@ type ComparatorInfo struct {
328328 // Criteria for matching data
329329 // it supports >=, <=, ==, >, <, != for int and float
330330 // it supports equal, notEqual, contains for string
331- Criteria string `json:"criteria"`
331+ Criteria string `json:"criteria,omitempty "`
332332 // Value contains relative value for criteria
333- Value string `json:"value"`
333+ Value string `json:"value,omitempty "`
334334}
335335
336- // HTTPProbeInputs contains all the inputs required for http probe
336+ //HTTPProbeInputs contains all the inputs required for http probe
337337type HTTPProbeInputs struct {
338338 // URL which needs to curl, to check the status
339- URL string `json:"url"`
339+ URL string `json:"url,omitempty "`
340340 // InsecureSkipVerify flag to skip certificate checks
341341 InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
342342 // Method define the http method, it can be get or post
343- Method HTTPMethod `json:"method"`
343+ Method HTTPMethod `json:"method,omitempty "`
344344}
345345
346346// HTTPMethod define the http method details
347347type HTTPMethod struct {
348- Get * GetMethod `json:"get,omitempty"`
349- Post * PostMethod `json:"post,omitempty"`
348+ Get GetMethod `json:"get,omitempty"`
349+ Post PostMethod `json:"post,omitempty"`
350350}
351351
352352// GetMethod define the http Get method
353353type GetMethod struct {
354354 // Criteria for matching data
355355 // it supports == != operations
356- Criteria string `json:"criteria"`
356+ Criteria string `json:"criteria,omitempty "`
357357 // Value contains relative value for criteria
358- ResponseCode string `json:"responseCode"`
358+ ResponseCode string `json:"responseCode,omitempty "`
359359}
360360
361361// PostMethod define the http Post method
@@ -368,17 +368,17 @@ type PostMethod struct {
368368 BodyPath string `json:"bodyPath,omitempty"`
369369 // Criteria for matching data
370370 // it supports == != operations
371- Criteria string `json:"criteria"`
371+ Criteria string `json:"criteria,omitempty "`
372372 // Value contains relative value for criteria
373- ResponseCode string `json:"responseCode"`
373+ ResponseCode string `json:"responseCode,omitempty "`
374374}
375375
376- // RunProperty contains timeout, retry and interval for the probe
376+ //RunProperty contains timeout, retry and interval for the probe
377377type RunProperty struct {
378378 //ProbeTimeout contains timeout for the probe
379- ProbeTimeout int `json:"probeTimeout"`
379+ ProbeTimeout int `json:"probeTimeout,omitempty "`
380380 // Interval contains the interval for the probe
381- Interval int `json:"interval"`
381+ Interval int `json:"interval,omitempty "`
382382 // Retry contains the retry count for the probe
383383 Retry int `json:"retry,omitempty"`
384384 // Attempt contains the total attempt count for the probe
0 commit comments