diff --git a/api/config.go b/api/config.go index 0b36b4e2..433fc138 100644 --- a/api/config.go +++ b/api/config.go @@ -21,12 +21,12 @@ func (c *Config) Validate() error { } case Kind_LOCAL: } - if c.GetTarget().GetContainerRegistry() == "" { - return errors.Errorf(`"target.containerRegistry" cannot be empty`) - } - if c.GetTarget().GetContainerRepository() == "" { - return errors.Errorf(`"target.containerRepository" cannot be empty`) - } + // if c.GetTarget().GetContainerRegistry() == "" { + // return errors.Errorf(`"target.containerRegistry" cannot be empty`) + // } + // if c.GetTarget().GetContainerRepository() == "" { + // return errors.Errorf(`"target.containerRepository" cannot be empty`) + // } } // Authentication diff --git a/internal/chart/sync.go b/internal/chart/sync.go index 250f909b..b245312e 100644 --- a/internal/chart/sync.go +++ b/internal/chart/sync.go @@ -14,6 +14,11 @@ import ( // repo to the target repo func ChangeReferences(chartPath, name, version string, source *api.Source, target *api.Target) error { // Update values*.yaml + if target.GetContainerRegistry() == "" && target.GetContainerRepository() == "" { + // Skip modify value.yaml and readme + return nil + } + for _, f := range []string{ path.Join(chartPath, ValuesFilename), path.Join(chartPath, ValuesProductionFilename),