fix pihole stategy (#2266)

* fix pihole stategy

* revert test changes

* fmt

* bump
This commit is contained in:
Stavros Kois
2024-03-11 14:18:44 +02:00
committed by GitHub
parent 090dc9a9f8
commit 9082fbca17
2 changed files with 14 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ description: DNS and Ad-filtering for your network.
annotations:
title: Pi-hole
type: application
version: 2.0.6
version: 2.0.7
apiVersion: v2
appVersion: 2024.02.0
kubeVersion: '>=1.16.0-0'

View File

@@ -17,12 +17,20 @@ def newer_mapping(image_tags):
return {}
parts = version.split('.')
for idx, val in enumerate(parts):
if val == '0':
continue
if len(val) == 1:
parts[idx] = '0' + val
# Versioning scheme:
# Must be x.y.z
# Second part has leading 0 if not 0
# Third part does not have leading 0
# Below we make sure the above conditions are met
# as the semantic_versioning function modifies the version
if len(parts) < 3:
return {}
if parts[1] != '0':
parts[1] = '0' + parts[1]
version = '.'.join(parts)