-
-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add way to hold/ignore images when upgrading compose/charts
When upgrading image versions in a compose file or helm chart there are cases where certain components like a database version should be static and not change. This change introduces a more generic concept than previously planned of an arkade config file. The ignore section includes paths to images which should be ignored and filtered out prior to looking up new images. Tested with the OpenFaaS pro-builder chart, with the path buildkit.image, I was able to ignore only that image whilst having the other images inspected/updated. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
- Loading branch information
Showing
5 changed files
with
109 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package config | ||
|
||
import ( | ||
"os" | ||
|
||
"gopkg.in/yaml.v3" | ||
) | ||
|
||
type ArkadeConfig struct { | ||
Ignore []string `yaml:"ignore"` | ||
} | ||
|
||
func Load(file string) (*ArkadeConfig, error) { | ||
|
||
data, err := os.ReadFile(file) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
cfg := &ArkadeConfig{} | ||
|
||
if err := yaml.Unmarshal(data, cfg); err != nil { | ||
return nil, err | ||
} | ||
|
||
return cfg, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters