From fc7187005053ad1e3695425b7706445e312b078b Mon Sep 17 00:00:00 2001 From: AhmedGrati Date: Mon, 31 Jul 2023 15:30:58 +0100 Subject: [PATCH] feat: add generate network policies to client Signed-off-by: AhmedGrati --- client/convert.go | 1 + client/types.go | 1 + 2 files changed, 2 insertions(+) diff --git a/client/convert.go b/client/convert.go index 5b4bb8eab..3e62a6222 100644 --- a/client/convert.go +++ b/client/convert.go @@ -48,6 +48,7 @@ func (k *Kompose) Convert(options ConvertOptions) ([]runtime.Object, error) { ServiceGroupMode: k.serviceGroupMode(options), ServiceGroupName: k.serviceGroupName(options), SecretsAsFiles: k.secretsAsFiles(options), + GenerateNetworkPolicies: options.GenerateNetworkPolicies, } err = app.ValidateComposeFile(&kobjectConvertOptions) if err != nil { diff --git a/client/types.go b/client/types.go index b6dd41fab..35e94abe0 100644 --- a/client/types.go +++ b/client/types.go @@ -45,6 +45,7 @@ type ConvertOptions struct { WithKomposeAnnotations *bool InputFiles []string Provider + GenerateNetworkPolicies bool } type Provider interface{}