diff --git a/library/ix-dev/community/linkding/Chart.yaml b/library/ix-dev/community/linkding/Chart.yaml index 7411af7b47..202a60f7b5 100644 --- a/library/ix-dev/community/linkding/Chart.yaml +++ b/library/ix-dev/community/linkding/Chart.yaml @@ -3,7 +3,7 @@ description: Linkding is a bookmark manager that you can host yourself. annotations: title: Linkding type: application -version: 1.2.14 +version: 1.2.15 apiVersion: v2 appVersion: 1.27.0 kubeVersion: '>=1.16.0-0' diff --git a/library/ix-dev/community/linkding/ci/extra-values.yaml b/library/ix-dev/community/linkding/ci/extra-values.yaml index d6f4b7f3b0..18a9a888e5 100644 --- a/library/ix-dev/community/linkding/ci/extra-values.yaml +++ b/library/ix-dev/community/linkding/ci/extra-values.yaml @@ -2,6 +2,7 @@ linkdingNetwork: webPort: 31000 linkdingConfig: + imageSelector: plusImage enableAuthProxy: true authProxyUsernameHeader: HTTP_REMOTE_USER authProxyLogoutUrl: https://example.com/logout @@ -22,7 +23,7 @@ linkdingStorage: size: "" additionalStorages: - - type: pvc - mountPath: /data1 - - type: pvc - mountPath: /data2 + - type: pvc + mountPath: /data1 + - type: pvc + mountPath: /data2 diff --git a/library/ix-dev/community/linkding/questions.yaml b/library/ix-dev/community/linkding/questions.yaml index cddef69fe6..9b0ccb509f 100644 --- a/library/ix-dev/community/linkding/questions.yaml +++ b/library/ix-dev/community/linkding/questions.yaml @@ -27,6 +27,18 @@ questions: schema: type: dict attrs: + - variable: imageSelector + label: Image + description: The image to use for Linkding + schema: + type: string + default: image + required: true + enum: + - value: image + description: Normal Linkding image + - value: plusImage + description: Plus Linkding image - variable: username label: Username description: | @@ -608,7 +620,7 @@ questions: schema: type: string max_length: 12 - valid_chars: '^[1-9][0-9]*([EPTGMK]i?|e[0-9]+)?$' + valid_chars: "^[1-9][0-9]*([EPTGMK]i?|e[0-9]+)?$" valid_chars_error: | Valid Memory limit formats are
- Suffixed with E/P/T/G/M/K - eg. 1G
diff --git a/library/ix-dev/community/linkding/templates/_linkding.tpl b/library/ix-dev/community/linkding/templates/_linkding.tpl index da886a7f93..16ee31097a 100644 --- a/library/ix-dev/community/linkding/templates/_linkding.tpl +++ b/library/ix-dev/community/linkding/templates/_linkding.tpl @@ -10,7 +10,7 @@ workload: linkding: enabled: true primary: true - imageSelector: image + imageSelector: {{ .Values.linkdingConfig.imageSelector | default "image" }} securityContext: runAsUser: {{ .Values.linkdingRunAs.user }} runAsGroup: {{ .Values.linkdingRunAs.group }} diff --git a/library/ix-dev/community/linkding/upgrade_info.json b/library/ix-dev/community/linkding/upgrade_info.json index 767388094a..d84aeffa58 100644 --- a/library/ix-dev/community/linkding/upgrade_info.json +++ b/library/ix-dev/community/linkding/upgrade_info.json @@ -1 +1 @@ -{"filename": "values.yaml", "keys": ["image"]} +{"filename": "values.yaml", "keys": ["image", "plusImage"]} diff --git a/library/ix-dev/community/linkding/upgrade_strategy b/library/ix-dev/community/linkding/upgrade_strategy index af685230a1..4056267210 100755 --- a/library/ix-dev/community/linkding/upgrade_strategy +++ b/library/ix-dev/community/linkding/upgrade_strategy @@ -6,21 +6,45 @@ import sys from catalog_update.upgrade_strategy import semantic_versioning -RE_STABLE_VERSION = re.compile(r'\d+\.\d+\.\d+') +RE_STABLE_VERSION_BASE = re.compile(r'\d+\.\d+\.\d+') +ENUMS = { + 'image': { + 'RE_STABLE_VERSION': RE_STABLE_VERSION_BASE, + }, + 'plusImage': { + 'RE_STABLE_VERSION': re.compile(rf'{RE_STABLE_VERSION_BASE}-plus'), + 'STRIP_TEXT': '-plus' + }, +} def newer_mapping(image_tags): - key = list(image_tags.keys())[0] - tags = {t: t for t in image_tags[key] if RE_STABLE_VERSION.fullmatch(t)} - version = semantic_versioning(list(tags)) - if not version: - return {} - - return { - 'tags': {key: tags[version]}, - 'app_version': version, + output = { + "tags": {}, + "app_version": "" } + for key in image_tags.keys(): + STRIP_TEXT = ENUMS[key].get('STRIP_TEXT', None) if key in ENUMS else None + RE_STABLE_VERSION = ENUMS[key].get('RE_STABLE_VERSION', None) if key in ENUMS else None + + if (STRIP_TEXT is None) or (RE_STABLE_VERSION is None): + continue + + tags = {t.strip(STRIP_TEXT): t for t in image_tags[key] if RE_STABLE_VERSION.fullmatch(t)} + version = semantic_versioning(list(tags)) + + if not version: + continue + + # 16 is the "default" (Also tied to latest tag) + if key == 'image': + output['app_version'] = version + + output['tags'][key] = tags[version] + + return output + if __name__ == '__main__': try: diff --git a/library/ix-dev/community/linkding/values.yaml b/library/ix-dev/community/linkding/values.yaml index 75f1ae6bc0..ecbad087b4 100644 --- a/library/ix-dev/community/linkding/values.yaml +++ b/library/ix-dev/community/linkding/values.yaml @@ -2,6 +2,10 @@ image: repository: sissbruecker/linkding pullPolicy: IfNotPresent tag: 1.27.0 +plusImage: + repository: sissbruecker/linkding + pullPolicy: IfNotPresent + tag: 1.27.0-plus resources: limits: