From 6f8ae4e454b07dea36dc0c12941a339dc80cfb42 Mon Sep 17 00:00:00 2001 From: Suraj Deshmukh Date: Wed, 4 Oct 2017 21:51:31 +0530 Subject: [PATCH] fix(spec): add optional tag in struct fields `portMappings` was added as an option to ports in services which is option to `ports`, initially `ports` was a compulsory field but with `portMappings` addition, either field can be specified. So adding `+optional` tag to both fields. --- pkg/spec/spec.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go index 00449a579..e3232f41e 100644 --- a/pkg/spec/spec.go +++ b/pkg/spec/spec.go @@ -57,9 +57,11 @@ type ServiceSpecMod struct { // The list of ports that are exposed by this service. More info: // https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies // ref: io.kedge.ServicePort + // +optional Ports []ServicePortMod `json:"ports,conflicting"` // The list of portMappings, where each portMapping allows specifying port, // targetPort and protocol in the format ':/' + // +optional PortMappings []string `json:"portMappings,omitempty"` }