diff --git a/library/ix-dev/community/wazuh/Chart.lock b/library/ix-dev/community/wazuh/Chart.lock new file mode 100644 index 0000000000..c27b7d8f21 --- /dev/null +++ b/library/ix-dev/community/wazuh/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../../../common + version: 1.1.0 +digest: sha256:752ce76025f5b61094bd2b18ca11693eb9d26d0dde4eb2e63cd2330cbffe9e73 +generated: "2023-09-04T16:52:07.820526694+03:00" diff --git a/library/ix-dev/community/wazuh/Chart.yaml b/library/ix-dev/community/wazuh/Chart.yaml new file mode 100644 index 0000000000..ea16f267ff --- /dev/null +++ b/library/ix-dev/community/wazuh/Chart.yaml @@ -0,0 +1,25 @@ +name: wazuh +description: Wazuh is an open source security platform + apps. +annotations: + title: Wazuh +type: application +version: 1.0.0 +apiVersion: v2 +appVersion: 4.8.0 +kubeVersion: '>=1.16.0-0' +maintainers: + - name: truenas + url: https://www.truenas.com/ + email: dev@ixsystems.com +dependencies: + - name: common + repository: file://../../../common + version: 1.1.0 +home: https://wazuh.com/ +icon: https://avatars.githubusercontent.com/u/13752566 +sources: + - https://github.com/truenas/charts/tree/master/community/wazuh + - https://github.com/wazuh/wazuh-docker/ +keywords: + - security diff --git a/library/ix-dev/community/wazuh/charts/common-1.1.0.tgz b/library/ix-dev/community/wazuh/charts/common-1.1.0.tgz new file mode 100644 index 0000000000..fa9407992e Binary files /dev/null and b/library/ix-dev/community/wazuh/charts/common-1.1.0.tgz differ diff --git a/library/ix-dev/community/wazuh/item.yaml b/library/ix-dev/community/wazuh/item.yaml new file mode 100644 index 0000000000..5c6e98a509 --- /dev/null +++ b/library/ix-dev/community/wazuh/item.yaml @@ -0,0 +1,9 @@ +icon_url: https://avatars.githubusercontent.com/u/13752566 +categories: + - security +screenshots: + - https://wazuh.com/uploads/2017/06/wazuh-ui-general-view.png + - https://wazuh.com/uploads/2017/06/wazuh-ui-agent-view.png + - https://wazuh.com/uploads/2017/06/wazuh-ui-agents-discover-tab-zoomed-in.png +tags: + - security diff --git a/library/ix-dev/community/wazuh/templates/NOTES.txt b/library/ix-dev/community/wazuh/templates/NOTES.txt new file mode 100644 index 0000000000..ba4e01146c --- /dev/null +++ b/library/ix-dev/community/wazuh/templates/NOTES.txt @@ -0,0 +1 @@ +{{ include "ix.v1.common.lib.chart.notes" $ }} diff --git a/library/ix-dev/community/wazuh/upgrade_info.json b/library/ix-dev/community/wazuh/upgrade_info.json new file mode 100644 index 0000000000..25a47b73bd --- /dev/null +++ b/library/ix-dev/community/wazuh/upgrade_info.json @@ -0,0 +1,4 @@ +{ + "filename": "values.yaml", + "keys": ["image", "indexerImage", "dashboardImage"] +} diff --git a/library/ix-dev/community/wazuh/upgrade_strategy b/library/ix-dev/community/wazuh/upgrade_strategy new file mode 100755 index 0000000000..5b71ea0446 --- /dev/null +++ b/library/ix-dev/community/wazuh/upgrade_strategy @@ -0,0 +1,38 @@ +#!/usr/bin/python3 +import json +import re +import sys + +from catalog_update.upgrade_strategy import semantic_versioning + + +RE_STABLE_VERSION = re.compile(r'version-[0-9]+\.[0-9]+\.[0-9]+') + + +def newer_mapping(image_tags): + output = { + "tags": {}, + "app_version": "" + } + + for key in image_tags.keys(): + tags = {t.strip('version-'): t for t in image_tags[key] if RE_STABLE_VERSION.fullmatch(t)} + version = semantic_versioning(list(tags)) + if not version: + continue + + if key == 'image': + output['app_version'] = version + + output['tags'][key] = tags[version] + + return output + + +if __name__ == '__main__': + try: + versions_json = json.loads(sys.stdin.read()) + except ValueError: + raise ValueError('Invalid json specified') + + print(json.dumps(newer_mapping(versions_json)))