Skip to content

Commit f01e4af

Browse files
committed
feature: check for helm release versions
1 parent 3b64048 commit f01e4af

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pkg/helm/releases.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ func CheckHelmComponents(clusterConfig model.Drifter, kubeconfig string) bool {
4141
for _, s := range clusterConfig.Helm.Components {
4242
if release, ok := installedHelmComponents[s.Name]; ok {
4343
if release.Info.Status.String() == "deployed" {
44+
if s.Version != "" {
45+
if s.Version == release.Chart.Metadata.Version {
46+
47+
} else {
48+
log.Printf("Mismatched helm chart %s expected %s found %s ", s.Name, s.Version, release.Chart.Metadata.Version)
49+
hasDrifts = true
50+
}
51+
}
52+
4453
if s.AppVersion != "" {
4554
if release.Chart.AppVersion() != s.AppVersion {
4655
log.Println("Need", s.AppVersion)

0 commit comments

Comments
 (0)