Skip to content

Commit

Permalink
feature: check for helm release versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayk committed Sep 26, 2022
1 parent 3b64048 commit f01e4af
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/helm/releases.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ func CheckHelmComponents(clusterConfig model.Drifter, kubeconfig string) bool {
for _, s := range clusterConfig.Helm.Components {
if release, ok := installedHelmComponents[s.Name]; ok {
if release.Info.Status.String() == "deployed" {
if s.Version != "" {
if s.Version == release.Chart.Metadata.Version {

} else {
log.Printf("Mismatched helm chart %s expected %s found %s ", s.Name, s.Version, release.Chart.Metadata.Version)
hasDrifts = true
}
}

if s.AppVersion != "" {
if release.Chart.AppVersion() != s.AppVersion {
log.Println("Need", s.AppVersion)
Expand Down

0 comments on commit f01e4af

Please sign in to comment.