Skip to content

Commit

Permalink
feat(sync): deprecate sync.useCache and flip its default value (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zebradil authored Dec 22, 2023
1 parent d2b05d3 commit dcce7fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 4 additions & 0 deletions internal/myks/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ func (a *Application) Init() error {
a.includeNamespace = applicationData.Render.IncludeNamespace
a.yttPkgDirs = applicationData.YttPkg.Dirs

if a.useCache {
log.Warn().Msg(".sync.useCache is deprecated and will be removed in a future release. Please use 'lazy' flag in vendir config instead.")
}

return nil
}

Expand Down
9 changes: 3 additions & 6 deletions internal/myks/assets/data-schema.ytt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,9 @@ render:
includeNamespace: false
#! Configuration options for the sync step.
sync:
#! If true, the sync step is performed only if the vendir.yaml file is changed after the previous sync.
#! Decision whether to sync or not is done on a per-directory basis. This allows to completely skip running
#! `vendir sync` for directories that are not changed.
#! /!\ Be careful when using this option with dynamic versions (e.g. `latest`, or a branch name).
#! If the upstream is updated, but the vendir config is not changed, the sync step will not be performed.
useCache: true
#! DEPRECATED: use `lazy` flag of vendir instead.
#! See https://github.com/carvel-dev/carvel/blob/develop/proposals/vendir/001-lazy-synching-on-stable-config/
useCache: false
#! Myks configuration and runtime data.
#! Default values for these options are set by myks.
myks:
Expand Down

0 comments on commit dcce7fc

Please sign in to comment.