diff --git a/charts/minio/1.7.23/.helmignore b/charts/minio/1.7.24/.helmignore similarity index 100% rename from charts/minio/1.7.23/.helmignore rename to charts/minio/1.7.24/.helmignore diff --git a/charts/minio/1.7.23/CHANGELOG.md b/charts/minio/1.7.24/CHANGELOG.md similarity index 100% rename from charts/minio/1.7.23/CHANGELOG.md rename to charts/minio/1.7.24/CHANGELOG.md diff --git a/charts/minio/1.7.23/Chart.lock b/charts/minio/1.7.24/Chart.lock similarity index 100% rename from charts/minio/1.7.23/Chart.lock rename to charts/minio/1.7.24/Chart.lock diff --git a/charts/minio/1.7.23/Chart.yaml b/charts/minio/1.7.24/Chart.yaml similarity index 97% rename from charts/minio/1.7.23/Chart.yaml rename to charts/minio/1.7.24/Chart.yaml index 3ea7fb9348..954d25a46d 100644 --- a/charts/minio/1.7.23/Chart.yaml +++ b/charts/minio/1.7.24/Chart.yaml @@ -3,7 +3,7 @@ description: High Performance, Kubernetes Native Object Storage annotations: title: MinIO type: application -version: 1.7.23 +version: 1.7.24 apiVersion: v2 appVersion: '2023-03-13' kubeVersion: '>=1.16.0-0' diff --git a/charts/minio/1.7.23/README.md b/charts/minio/1.7.24/README.md similarity index 100% rename from charts/minio/1.7.23/README.md rename to charts/minio/1.7.24/README.md diff --git a/charts/minio/1.7.23/app-readme.md b/charts/minio/1.7.24/app-readme.md similarity index 100% rename from charts/minio/1.7.23/app-readme.md rename to charts/minio/1.7.24/app-readme.md diff --git a/charts/minio/1.7.23/charts/common-2304.0.1.tgz b/charts/minio/1.7.24/charts/common-2304.0.1.tgz similarity index 100% rename from charts/minio/1.7.23/charts/common-2304.0.1.tgz rename to charts/minio/1.7.24/charts/common-2304.0.1.tgz diff --git a/charts/minio/1.7.23/ci/https-values.yaml b/charts/minio/1.7.24/ci/https-values.yaml similarity index 100% rename from charts/minio/1.7.23/ci/https-values.yaml rename to charts/minio/1.7.24/ci/https-values.yaml diff --git a/charts/minio/1.7.23/ci/test-values.yaml b/charts/minio/1.7.24/ci/test-values.yaml similarity index 100% rename from charts/minio/1.7.23/ci/test-values.yaml rename to charts/minio/1.7.24/ci/test-values.yaml diff --git a/charts/minio/1.7.23/ix_values.yaml b/charts/minio/1.7.24/ix_values.yaml similarity index 100% rename from charts/minio/1.7.23/ix_values.yaml rename to charts/minio/1.7.24/ix_values.yaml diff --git a/charts/minio/1.7.23/migrations/migrate b/charts/minio/1.7.24/migrations/migrate similarity index 100% rename from charts/minio/1.7.23/migrations/migrate rename to charts/minio/1.7.24/migrations/migrate diff --git a/charts/minio/1.7.23/migrations/migrate_from_1.0.0 b/charts/minio/1.7.24/migrations/migrate_from_1.0.0 similarity index 100% rename from charts/minio/1.7.23/migrations/migrate_from_1.0.0 rename to charts/minio/1.7.24/migrations/migrate_from_1.0.0 diff --git a/charts/minio/1.7.23/questions.yaml b/charts/minio/1.7.24/questions.yaml similarity index 99% rename from charts/minio/1.7.23/questions.yaml rename to charts/minio/1.7.24/questions.yaml index 306da9dfbc..1ac1e9bb82 100644 --- a/charts/minio/1.7.23/questions.yaml +++ b/charts/minio/1.7.24/questions.yaml @@ -6,7 +6,7 @@ groups: - name: "Minio Configuration" description: "Configure Minio credentials" - name: "Storage" - description: "Configure Storage for Nextcloud" + description: "Configure Storage for Minio" - name: "Advanced DNS Settings" description: "Configure DNS settings" - name: "Resource Limits" diff --git a/charts/minio/1.7.23/templates/NOTES.txt b/charts/minio/1.7.24/templates/NOTES.txt similarity index 100% rename from charts/minio/1.7.23/templates/NOTES.txt rename to charts/minio/1.7.24/templates/NOTES.txt diff --git a/charts/minio/1.7.23/templates/_cert.tpl b/charts/minio/1.7.24/templates/_cert.tpl similarity index 100% rename from charts/minio/1.7.23/templates/_cert.tpl rename to charts/minio/1.7.24/templates/_cert.tpl diff --git a/charts/minio/1.7.23/templates/_helpers.tpl b/charts/minio/1.7.24/templates/_helpers.tpl similarity index 100% rename from charts/minio/1.7.23/templates/_helpers.tpl rename to charts/minio/1.7.24/templates/_helpers.tpl diff --git a/charts/minio/1.7.23/templates/_logsearchapi.tpl b/charts/minio/1.7.24/templates/_logsearchapi.tpl similarity index 100% rename from charts/minio/1.7.23/templates/_logsearchapi.tpl rename to charts/minio/1.7.24/templates/_logsearchapi.tpl diff --git a/charts/minio/1.7.23/templates/_postgres.tpl b/charts/minio/1.7.24/templates/_postgres.tpl similarity index 100% rename from charts/minio/1.7.23/templates/_postgres.tpl rename to charts/minio/1.7.24/templates/_postgres.tpl diff --git a/charts/minio/1.7.23/templates/backup-postgres-config.yaml b/charts/minio/1.7.24/templates/backup-postgres-config.yaml similarity index 100% rename from charts/minio/1.7.23/templates/backup-postgres-config.yaml rename to charts/minio/1.7.24/templates/backup-postgres-config.yaml diff --git a/charts/minio/1.7.23/templates/backup-postgres-hook.yaml b/charts/minio/1.7.24/templates/backup-postgres-hook.yaml similarity index 100% rename from charts/minio/1.7.23/templates/backup-postgres-hook.yaml rename to charts/minio/1.7.24/templates/backup-postgres-hook.yaml diff --git a/charts/minio/1.7.23/templates/configmap.yaml b/charts/minio/1.7.24/templates/configmap.yaml similarity index 100% rename from charts/minio/1.7.23/templates/configmap.yaml rename to charts/minio/1.7.24/templates/configmap.yaml diff --git a/charts/minio/1.7.23/templates/deployment.yaml b/charts/minio/1.7.24/templates/deployment.yaml similarity index 100% rename from charts/minio/1.7.23/templates/deployment.yaml rename to charts/minio/1.7.24/templates/deployment.yaml diff --git a/charts/minio/1.7.23/templates/logsearchapi-deployment.yaml b/charts/minio/1.7.24/templates/logsearchapi-deployment.yaml similarity index 100% rename from charts/minio/1.7.23/templates/logsearchapi-deployment.yaml rename to charts/minio/1.7.24/templates/logsearchapi-deployment.yaml diff --git a/charts/minio/1.7.23/templates/logsearchapi-secret.yaml b/charts/minio/1.7.24/templates/logsearchapi-secret.yaml similarity index 100% rename from charts/minio/1.7.23/templates/logsearchapi-secret.yaml rename to charts/minio/1.7.24/templates/logsearchapi-secret.yaml diff --git a/charts/minio/1.7.23/templates/logsearchapi-service.yaml b/charts/minio/1.7.24/templates/logsearchapi-service.yaml similarity index 100% rename from charts/minio/1.7.23/templates/logsearchapi-service.yaml rename to charts/minio/1.7.24/templates/logsearchapi-service.yaml diff --git a/charts/minio/1.7.23/templates/postgres-deployment.yaml b/charts/minio/1.7.24/templates/postgres-deployment.yaml similarity index 100% rename from charts/minio/1.7.23/templates/postgres-deployment.yaml rename to charts/minio/1.7.24/templates/postgres-deployment.yaml diff --git a/charts/minio/1.7.23/templates/postgres-secret.yaml b/charts/minio/1.7.24/templates/postgres-secret.yaml similarity index 100% rename from charts/minio/1.7.23/templates/postgres-secret.yaml rename to charts/minio/1.7.24/templates/postgres-secret.yaml diff --git a/charts/minio/1.7.23/templates/postgres-service.yaml b/charts/minio/1.7.24/templates/postgres-service.yaml similarity index 100% rename from charts/minio/1.7.23/templates/postgres-service.yaml rename to charts/minio/1.7.24/templates/postgres-service.yaml diff --git a/charts/minio/1.7.23/templates/pre-install-job.yaml b/charts/minio/1.7.24/templates/pre-install-job.yaml similarity index 100% rename from charts/minio/1.7.23/templates/pre-install-job.yaml rename to charts/minio/1.7.24/templates/pre-install-job.yaml diff --git a/charts/minio/1.7.23/templates/secrets.yaml b/charts/minio/1.7.24/templates/secrets.yaml similarity index 100% rename from charts/minio/1.7.23/templates/secrets.yaml rename to charts/minio/1.7.24/templates/secrets.yaml diff --git a/charts/minio/1.7.23/templates/service.yaml b/charts/minio/1.7.24/templates/service.yaml similarity index 100% rename from charts/minio/1.7.23/templates/service.yaml rename to charts/minio/1.7.24/templates/service.yaml diff --git a/charts/minio/1.7.23/templates/serviceaccount.yaml b/charts/minio/1.7.24/templates/serviceaccount.yaml similarity index 100% rename from charts/minio/1.7.23/templates/serviceaccount.yaml rename to charts/minio/1.7.24/templates/serviceaccount.yaml diff --git a/charts/pihole/2.0.0/.helmignore b/charts/pihole/2.0.0/.helmignore new file mode 100644 index 0000000000..c1347c2c27 --- /dev/null +++ b/charts/pihole/2.0.0/.helmignore @@ -0,0 +1,2 @@ +# Patterns to ignore when building packages. +*.png diff --git a/charts/pihole/2.0.0/Chart.lock b/charts/pihole/2.0.0/Chart.lock new file mode 100644 index 0000000000..689110964a --- /dev/null +++ b/charts/pihole/2.0.0/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../../../common + version: 1.2.9 +digest: sha256:af1a9a1f87e3e48453c9f25f909f5ebcd7fa6e25162b7b425448ba752bcdbc5c +generated: "2024-02-08T16:30:19.001779605+02:00" diff --git a/charts/pihole/2.0.0/Chart.yaml b/charts/pihole/2.0.0/Chart.yaml new file mode 100644 index 0000000000..fa98d6969c --- /dev/null +++ b/charts/pihole/2.0.0/Chart.yaml @@ -0,0 +1,25 @@ +name: pihole +description: DNS and Ad-filtering for your network. +annotations: + title: Pi-hole +type: application +version: 2.0.0 +apiVersion: v2 +appVersion: 2023.11.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.2.9 +home: https://pi-hole.net/ +icon: https://media.sys.truenas.net/apps/pihole/icons/icon.png +sources: + - https://pi-hole.net/ + - https://github.com/truenas/charts/tree/master/charts/pihole +keywords: + - networking + - dns diff --git a/charts/pihole/2.0.0/README.md b/charts/pihole/2.0.0/README.md new file mode 100644 index 0000000000..7bd26b05b7 --- /dev/null +++ b/charts/pihole/2.0.0/README.md @@ -0,0 +1,3 @@ +# Pi-hole + +[Pi-hole](https://pi-hole.net/) is a black hole for Internet advertisements diff --git a/charts/pihole/2.0.0/app-readme.md b/charts/pihole/2.0.0/app-readme.md new file mode 100644 index 0000000000..7bd26b05b7 --- /dev/null +++ b/charts/pihole/2.0.0/app-readme.md @@ -0,0 +1,3 @@ +# Pi-hole + +[Pi-hole](https://pi-hole.net/) is a black hole for Internet advertisements diff --git a/charts/pihole/2.0.0/charts/common-1.2.9.tgz b/charts/pihole/2.0.0/charts/common-1.2.9.tgz new file mode 100644 index 0000000000..f177ca9496 Binary files /dev/null and b/charts/pihole/2.0.0/charts/common-1.2.9.tgz differ diff --git a/charts/pihole/2.0.0/ci/basic-values.yaml b/charts/pihole/2.0.0/ci/basic-values.yaml new file mode 100644 index 0000000000..d800ff9dd4 --- /dev/null +++ b/charts/pihole/2.0.0/ci/basic-values.yaml @@ -0,0 +1,16 @@ +piholeConfig: + webPassword: somepassword + +piholeNetwork: + webPort: 32000 + dhcp: + enabled: true + start: '192.168.1.1' + end: '192.168.1.2' + gateway: '192.168.1.0' + +piholeStorage: + config: + type: pvc + dnsmasq: + type: pvc diff --git a/charts/pihole/2.0.0/ci/nodhcp-values.yaml b/charts/pihole/2.0.0/ci/nodhcp-values.yaml new file mode 100644 index 0000000000..843efc4520 --- /dev/null +++ b/charts/pihole/2.0.0/ci/nodhcp-values.yaml @@ -0,0 +1,13 @@ +piholeConfig: + webPassword: somepassword + +piholeNetwork: + webPort: 32000 + dhcp: + enabled: false + +piholeStorage: + config: + type: pvc + dnsmasq: + type: pvc diff --git a/charts/pihole/2.0.0/ix_values.yaml b/charts/pihole/2.0.0/ix_values.yaml new file mode 100644 index 0000000000..65724508f7 --- /dev/null +++ b/charts/pihole/2.0.0/ix_values.yaml @@ -0,0 +1,36 @@ +image: + pullPolicy: IfNotPresent + repository: pihole/pihole + tag: 2023.11.0 + +resources: + limits: + cpu: 4000m + memory: 8Gi + +podOptions: + dnsConfig: + options: [] + +piholeConfig: + webPassword: '' + additionalEnvs: [] + +piholeNetwork: + webPort: 20489 + dhcp: + enabled: false + start: '' + end: '' + gateway: '' + +piholeStorage: + config: + type: ixVolume + ixVolumeConfig: + datasetName: config + dnsmasq: + type: ixVolume + ixVolumeConfig: + datasetName: dnsmasq + additionalStorages: [] diff --git a/charts/pihole/2.0.0/metadata.yaml b/charts/pihole/2.0.0/metadata.yaml new file mode 100644 index 0000000000..f24c69667b --- /dev/null +++ b/charts/pihole/2.0.0/metadata.yaml @@ -0,0 +1,24 @@ +runAsContext: + - userName: root + groupName: root + gid: 0 + uid: 0 + description: Pi-hole runs as root user. +capabilities: + - name: CHOWN + description: Pi-hole is able to chown files. + - name: FOWNER + description: Pi-hole is able to bypass permission checks for it's sub-processes. + - name: DAC_OVERRIDE + description: Pi-hole is able to bypass permission checks. + - name: SETGID + description: Pi-hole is able to set group ID for it's sub-processes. + - name: SETUID + description: Pi-hole is able to set user ID for it's sub-processes. + - name: SETFCAP + description: Pi-hole is able to set file capabilities. + - name: NET_ADMIN + description: Pi-hole is able to perform various network-related operations. + - name: KILL + description: Pi-hole is able to kill processes. +hostMounts: [] diff --git a/charts/pihole/2.0.0/migrations/migrate b/charts/pihole/2.0.0/migrations/migrate new file mode 100755 index 0000000000..24afaf26a4 --- /dev/null +++ b/charts/pihole/2.0.0/migrations/migrate @@ -0,0 +1,95 @@ +#!/usr/bin/python3 +import json +import os +import sys + +def migrate_volume(volume): + return { + 'type': 'hostPath', + 'hostPathConfig': { + 'hostPath': volume['hostPath'] + }, + } if volume.get('hostPathEnabled', False) else { + 'type': 'ixVolume', + 'ixVolumeConfig': { + 'datasetName': volume['datasetName'], + }, + } + +def migrate_common_lib(values): + delete_keys = [ + 'enableResourceLimits', 'memLimit', 'cpuLimit', 'dnsConfig', + 'web_port', 'environmentVariables', 'timezone', 'password', + 'extraAppVolumeMounts', 'appVolumeMounts', 'dhcp', 'dhcp_start', + 'dhcp_end', 'dhcp_gateway', 'ownerUID', 'ownerGID', + ] + + values.update({ + # Migrate Network + 'piholeNetwork': { + 'webPort': values['web_port'], + 'dhcp': { + 'enabled': values['dhcp'], + 'start': values.get('dhcp_start', ''), + 'end': values.get('dhcp_end', ''), + 'gateway': values.get('dhcp_gateway', ''), + } + }, + # Migrate Resources + 'resources': { + 'limits': { + 'cpu': values.get('cpuLimit', '4000m'), + 'memory': values.get('memLimit', '8Gi'), + } + }, + # Migrate DNS + 'podOptions': { + 'dnsConfig': { + 'options': [ + {'name': opt['name'], 'value': opt['value']} + for opt in values.get('dnsConfig', {}).get('options', []) + ] + } + }, + # Migrate Config + 'TZ': values['timezone'], + 'piholeConfig': { + 'webPassword': values['password'], + 'additionalEnvs': values.get('environmentVariables', []), + }, + # Migrate Storage + 'piholeStorage': { + 'config': migrate_volume(values['appVolumeMounts']['config']), + 'cache': migrate_volume(values['appVolumeMounts']['dnsmasq']), + 'additionalStorages': [ + { + 'type': 'hostPath', + 'hostPathConfig': {'hostPath': e['hostPath']}, + 'mountPath': e['mountPath'], + 'readOnly': e.get('readOnly', False), + } + for e in values.get('extraAppVolumeMounts', []) + ], + }, + }) + + for k in delete_keys: + values.pop(k, None) + + return values + +def migrate(values): + # If this missing, we have already migrated + if not 'appVolumeMounts' in values.keys(): + return values + + return migrate_common_lib(values) + + +if __name__ == '__main__': + if len(sys.argv) != 2: + exit(1) + + if os.path.exists(sys.argv[1]): + with open(sys.argv[1], 'r') as f: + print(json.dumps(migrate(json.loads(f.read())))) diff --git a/charts/pihole/2.0.0/questions.yaml b/charts/pihole/2.0.0/questions.yaml new file mode 100644 index 0000000000..ed7f35e2b5 --- /dev/null +++ b/charts/pihole/2.0.0/questions.yaml @@ -0,0 +1,499 @@ +groups: + - name: Pi-Hole Configuration + description: Configure Pi-Hole + - name: Advanced Pod Configuration + description: Configure Advanced Pod Options for Pi-Hole + - name: Network Configuration + description: Configure Network for Pi-Hole + - name: Storage Configuration + description: Configure Storage for Pi-Hole + - name: Resources Configuration + description: Configure Resources for Pi-Hole + +portals: + web_portal: + protocols: + - "$kubernetes-resource_configmap_portal_protocol" + host: + - "$kubernetes-resource_configmap_portal_host" + ports: + - "$kubernetes-resource_configmap_portal_port" + path: "$kubernetes-resource_configmap_portal_path" + +questions: + - variable: TZ + group: Pi-Hole Configuration + label: Timezone + schema: + type: string + default: Etc/UTC + required: true + $ref: + - definitions/timezone + + - variable: piholeConfig + label: "" + group: Pi-Hole Configuration + schema: + type: dict + attrs: + - variable: webPassword + label: Web Password + description: The password for the Pi-Hole Web UI. + schema: + type: string + required: true + private: true + - variable: additionalEnvs + label: Additional Environment Variables + description: Configure additional environment variables for Pi-Hole. + schema: + type: list + default: [] + items: + - variable: env + label: Environment Variable + schema: + type: dict + attrs: + - variable: name + label: Name + schema: + type: string + required: true + - variable: value + label: Value + schema: + type: string + required: true + + - variable: podOptions + label: "" + group: Advanced Pod Configuration + schema: + type: dict + attrs: + - variable: dnsConfig + label: Advanced DNS Configuration + schema: + type: dict + attrs: + - variable: options + label: DNS Options + schema: + type: list + items: + - variable: optionsEntry + label: DNS Option Entry + schema: + type: dict + attrs: + - variable: name + label: Option Name + schema: + type: string + required: true + - variable: value + label: Option Value + schema: + type: string + required: true + + - variable: piholeNetwork + label: "" + group: Network Configuration + schema: + type: dict + attrs: + - variable: webPort + label: Web Port + description: The port for the Pi-Hole Web UI. + schema: + type: int + default: 20720 + min: 9000 + max: 65535 + required: true + - variable: dhcp + label: DHCP Configuration + schema: + type: dict + attrs: + - variable: enabled + label: Enable DHCP + description: Enable DHCP for Pi-Hole. + schema: + type: boolean + default: false + - variable: start + label: DHCP Start + description: The start of the DHCP range. + schema: + type: ipaddr + cidr: false + show_if: [["enabled", "=", true]] + required: true + - variable: end + label: DHCP End + description: The end of the DHCP range. + schema: + type: ipaddr + cidr: false + show_if: [["enabled", "=", true]] + required: true + - variable: gateway + label: DHCP Gateway + description: The gateway for the DHCP range. + schema: + type: ipaddr + cidr: false + show_if: [["enabled", "=", true]] + required: true + + - variable: piholeStorage + label: "" + group: Storage Configuration + schema: + type: dict + attrs: + - variable: config + label: Pi-Hole Config Storage + description: The path to store Pi-Hole Configuration. + schema: + type: dict + attrs: + - variable: type + label: Type + description: | + ixVolume: Is dataset created automatically by the system.
+ Host Path: Is a path that already exists on the system. + schema: + type: string + required: true + immutable: true + default: "ixVolume" + enum: + - value: "hostPath" + description: Host Path (Path that already exists on the system) + - value: "ixVolume" + description: ixVolume (Dataset created automatically by the system) + - variable: ixVolumeConfig + label: ixVolume Configuration + description: The configuration for the ixVolume dataset. + schema: + type: dict + show_if: [["type", "=", "ixVolume"]] + $ref: + - "normalize/ixVolume" + attrs: + - variable: aclEnable + label: Enable ACL + description: Enable ACL for the dataset. + schema: + type: boolean + default: false + - variable: datasetName + label: Dataset Name + description: The name of the dataset to use for storage. + schema: + type: string + required: true + immutable: true + hidden: true + default: "config" + - variable: aclEntries + label: ACL Configuration + schema: + type: dict + show_if: [["aclEnable", "=", true]] + attrs: [] + - variable: hostPathConfig + label: Host Path Config + schema: + type: dict + show_if: [["type", "=", "hostPath"]] + attrs: + - variable: aclEnable + label: Enable ACL + description: Enable ACL for the dataset. + schema: + type: boolean + default: false + - variable: acl + label: ACL Configuration + schema: + type: dict + show_if: [["aclEnable", "=", true]] + attrs: [] + $ref: + - "normalize/acl" + - variable: hostPath + label: Host Path + description: The host path to use for storage. + schema: + type: hostpath + show_if: [["aclEnable", "=", false]] + required: true + - variable: dnsmasq + label: Pi-Hole DNSmasq Storage + description: The path to store Pi-Hole DNSmasq. + schema: + type: dict + attrs: + - variable: type + label: Type + description: | + ixVolume: Is dataset created automatically by the system.
+ Host Path: Is a path that already exists on the system. + schema: + type: string + required: true + immutable: true + default: "ixVolume" + enum: + - value: "hostPath" + description: Host Path (Path that already exists on the system) + - value: "ixVolume" + description: ixVolume (Dataset created automatically by the system) + - variable: ixVolumeConfig + label: ixVolume Configuration + description: The configuration for the ixVolume dataset. + schema: + type: dict + show_if: [["type", "=", "ixVolume"]] + $ref: + - "normalize/ixVolume" + attrs: + - variable: aclEnable + label: Enable ACL + description: Enable ACL for the dataset. + schema: + type: boolean + default: false + - variable: datasetName + label: Dataset Name + description: The name of the dataset to use for storage. + schema: + type: string + required: true + immutable: true + hidden: true + default: "dnsmasq" + - variable: aclEntries + label: ACL Configuration + schema: + type: dict + show_if: [["aclEnable", "=", true]] + attrs: [] + - variable: hostPathConfig + label: Host Path Config + schema: + type: dict + show_if: [["type", "=", "hostPath"]] + attrs: + - variable: aclEnable + label: Enable ACL + description: Enable ACL for the dataset. + schema: + type: boolean + default: false + - variable: acl + label: ACL Configuration + schema: + type: dict + show_if: [["aclEnable", "=", true]] + attrs: [] + $ref: + - "normalize/acl" + - variable: hostPath + label: Host Path + description: The host path to use for storage. + schema: + type: hostpath + show_if: [["aclEnable", "=", false]] + required: true + + - variable: additionalStorages + label: Additional Storage + description: Additional storage for Pi-Hole. + schema: + type: list + default: [] + items: + - variable: storageEntry + label: Storage Entry + schema: + type: dict + attrs: + - variable: type + label: Type + description: | + ixVolume: Is dataset created automatically by the system.
+ Host Path: Is a path that already exists on the system.
+ SMB Share: Is a SMB share that is mounted to a persistent volume claim. + schema: + type: string + required: true + default: "ixVolume" + immutable: true + enum: + - value: "hostPath" + description: Host Path (Path that already exists on the system) + - value: "ixVolume" + description: ixVolume (Dataset created automatically by the system) + - value: "smb-pv-pvc" + description: SMB Share (Mounts a persistent volume claim to a SMB share) + - variable: readOnly + label: Read Only + description: Mount the volume as read only. + schema: + type: boolean + default: false + - variable: mountPath + label: Mount Path + description: The path inside the container to mount the storage. + schema: + type: path + required: true + - variable: hostPathConfig + label: Host Path Config + schema: + type: dict + show_if: [["type", "=", "hostPath"]] + attrs: + - variable: aclEnable + label: Enable ACL + description: Enable ACL for the dataset. + schema: + type: boolean + default: false + - variable: acl + label: ACL Configuration + schema: + type: dict + show_if: [["aclEnable", "=", true]] + attrs: [] + $ref: + - "normalize/acl" + - variable: hostPath + label: Host Path + description: The host path to use for storage. + schema: + type: hostpath + show_if: [["aclEnable", "=", false]] + required: true + - variable: ixVolumeConfig + label: ixVolume Configuration + description: The configuration for the ixVolume dataset. + schema: + type: dict + show_if: [["type", "=", "ixVolume"]] + $ref: + - "normalize/ixVolume" + attrs: + - variable: aclEnable + label: Enable ACL + description: Enable ACL for the dataset. + schema: + type: boolean + default: false + - variable: datasetName + label: Dataset Name + description: The name of the dataset to use for storage. + schema: + type: string + required: true + immutable: true + default: "storage_entry" + - variable: aclEntries + label: ACL Configuration + schema: + type: dict + show_if: [["aclEnable", "=", true]] + attrs: [] + - variable: smbConfig + label: SMB Share Configuration + description: The configuration for the SMB Share. + schema: + type: dict + show_if: [["type", "=", "smb-pv-pvc"]] + attrs: + - variable: server + label: Server + description: The server for the SMB share. + schema: + type: string + required: true + - variable: share + label: Share + description: The share name for the SMB share. + schema: + type: string + required: true + - variable: domain + label: Domain (Optional) + description: The domain for the SMB share. + schema: + type: string + - variable: username + label: Username + description: The username for the SMB share. + schema: + type: string + required: true + - variable: password + label: Password + description: The password for the SMB share. + schema: + type: string + required: true + private: true + - variable: size + label: Size (in Gi) + description: The size of the volume quota. + schema: + type: int + required: true + min: 1 + default: 1 + + - variable: resources + group: Resources Configuration + label: "" + schema: + type: dict + attrs: + - variable: limits + label: Limits + schema: + type: dict + attrs: + - variable: cpu + label: CPU + description: CPU limit for Pi-Hole. + schema: + type: string + max_length: 6 + valid_chars: '^(0\.[1-9]|[1-9][0-9]*)(\.[0-9]|m?)$' + valid_chars_error: | + Valid CPU limit formats are
+ - Plain Integer - eg. 1
+ - Float - eg. 0.5
+ - Milicpu - eg. 500m + default: "4000m" + required: true + - variable: memory + label: Memory + description: Memory limit for Pi-Hole. + schema: + type: string + max_length: 12 + 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
+ - Suffixed with Ei/Pi/Ti/Gi/Mi/Ki - eg. 1Gi
+ - Plain Integer in bytes - eg. 1024
+ - Exponent - eg. 134e6 + default: "8Gi" + required: true diff --git a/community/pigallery2/1.2.3/templates/NOTES.txt b/charts/pihole/2.0.0/templates/NOTES.txt similarity index 100% rename from community/pigallery2/1.2.3/templates/NOTES.txt rename to charts/pihole/2.0.0/templates/NOTES.txt diff --git a/charts/pihole/2.0.0/templates/_migration.tpl b/charts/pihole/2.0.0/templates/_migration.tpl new file mode 100644 index 0000000000..c5cb9b435e --- /dev/null +++ b/charts/pihole/2.0.0/templates/_migration.tpl @@ -0,0 +1,35 @@ +{{- define "pihole.get-versions" -}} + {{- $oldChartVersion := "" -}} + {{- $newChartVersion := "" -}} + + {{/* Safely access the context, so it wont block CI */}} + {{- if hasKey .Values.global "ixChartContext" -}} + {{- if .Values.global.ixChartContext.upgradeMetadata -}} + + {{- $oldChartVersion = .Values.global.ixChartContext.upgradeMetadata.oldChartVersion -}} + {{- $newChartVersion = .Values.global.ixChartContext.upgradeMetadata.newChartVersion -}} + {{- if and (not $oldChartVersion) (not $newChartVersion) -}} + {{- fail "Upgrade Metadata is missing. Cannot proceed" -}} + {{- end -}} + {{- end -}} + {{- end -}} + + {{- toYaml (dict "old" $oldChartVersion "new" $newChartVersion) -}} +{{- end -}} + +{{- define "pihole.migration" -}} + {{- $versions := (fromYaml (include "pihole.get-versions" $)) -}} + {{- if and $versions.old $versions.new -}} + {{- $oldV := semver $versions.old -}} + {{- $newV := semver $versions.new -}} + + {{/* If new is v2.x.x */}} + {{- if eq ($newV.Major | int) 2 -}} + {{/* And old is v1.x.x, but lower than .25 */}} + {{- if and (eq $oldV.Major 1) (lt ($oldV.Patch | int) 25) -}} + {{/* Block the upgrade */}} + {{- fail "Migration to 2.x.x is only allowed from 1.0.25 or higher" -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- end -}} diff --git a/charts/pihole/2.0.0/templates/_persistence.tpl b/charts/pihole/2.0.0/templates/_persistence.tpl new file mode 100644 index 0000000000..7b939b8492 --- /dev/null +++ b/charts/pihole/2.0.0/templates/_persistence.tpl @@ -0,0 +1,33 @@ +{{- define "pihole.persistence" -}} +persistence: + config: + enabled: true + {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.piholeStorage.config) | nindent 4 }} + targetSelector: + pihole: + pihole: + mountPath: /etc/pihole + dnsmasq: + enabled: true + {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.piholeStorage.dnsmasq) | nindent 4 }} + targetSelector: + pihole: + pihole: + mountPath: /etc/dnsmasq.d + tmp: + enabled: true + type: emptyDir + targetSelector: + pihole: + pihole: + mountPath: /tmp + {{- range $idx, $storage := .Values.piholeStorage.additionalStorages }} + {{ printf "pihole-%v:" (int $idx) }} + enabled: true + {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }} + targetSelector: + pihole: + pihole: + mountPath: {{ $storage.mountPath }} + {{- end }} +{{- end -}} diff --git a/charts/pihole/2.0.0/templates/_pihole.tpl b/charts/pihole/2.0.0/templates/_pihole.tpl new file mode 100644 index 0000000000..b46fafa8ae --- /dev/null +++ b/charts/pihole/2.0.0/templates/_pihole.tpl @@ -0,0 +1,61 @@ +{{- define "pihole.workload" -}} +workload: + pihole: + enabled: true + primary: true + type: Deployment + podSpec: + hostNetwork: true + containers: + pihole: + enabled: true + primary: true + imageSelector: image + securityContext: + runAsUser: 0 + runAsGroup: 0 + runAsNonRoot: false + readOnlyRootFilesystem: false + capabilities: + add: + - NET_ADMIN + - CHOWN + - DAC_OVERRIDE + - FOWNER + - SETGID + - SETUID + - SETFCAP + - KILL + env: + WEB_PORT: {{ .Values.piholeNetwork.webPort }} + WEBPASSWORD: {{ .Values.piholeConfig.webPassword }} + {{- if .Values.piholeNetwork.dhcp.enabled }} + DHCP_ACTIVE: "true" + DHCP_START: {{ .Values.piholeNetwork.dhcp.start }} + DHCP_END: {{ .Values.piholeNetwork.dhcp.end }} + DHCP_ROUTER: {{ .Values.piholeNetwork.dhcp.gateway }} + {{- end }} + {{ with .Values.piholeConfig.additionalEnvs }} + envList: + {{ range $env := . }} + - name: {{ $env.name }} + value: {{ $env.value }} + {{ end }} + {{ end }} + probes: + liveness: + enabled: true + type: http + path: /admin/login.php + port: {{ .Values.piholeNetwork.webPort }} + readiness: + enabled: true + type: http + path: /admin/login.php + port: {{ .Values.piholeNetwork.webPort }} + startup: + enabled: true + type: http + path: /admin/login.php + port: {{ .Values.piholeNetwork.webPort }} +{{- end -}} diff --git a/charts/pihole/2.0.0/templates/_portal.tpl b/charts/pihole/2.0.0/templates/_portal.tpl new file mode 100644 index 0000000000..3c0fa210ef --- /dev/null +++ b/charts/pihole/2.0.0/templates/_portal.tpl @@ -0,0 +1,12 @@ +{{- define "pihole.portal" -}} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: portal +data: + port: {{ .Values.piholeNetwork.webPort | quote }} + path: "/admin/" + protocol: "http" + host: $node_ip +{{- end -}} diff --git a/charts/pihole/2.0.0/templates/_service.tpl b/charts/pihole/2.0.0/templates/_service.tpl new file mode 100644 index 0000000000..9ba8c80aba --- /dev/null +++ b/charts/pihole/2.0.0/templates/_service.tpl @@ -0,0 +1,33 @@ +{{- define "pihole.service" -}} +service: + pihole: + enabled: true + primary: true + type: ClusterIP + targetSelector: pihole + ports: + webui: + enabled: true + primary: true + port: {{ .Values.piholeNetwork.webPort }} + targetSelector: pihole + dns-udp: + enabled: true + port: 53 + targetPort: 53 + protocol: udp + targetSelector: pihole + dns-tcp: + enabled: true + port: 53 + targetPort: 53 + targetSelector: pihole + {{- if .Values.piholeNetwork.dhcpEnabled }} + dhcp: + enabled: true + port: 67 + targetPort: 67 + protocol: udp + targetSelector: pihole + {{- end }} +{{- end -}} diff --git a/charts/pihole/2.0.0/templates/common.yaml b/charts/pihole/2.0.0/templates/common.yaml new file mode 100644 index 0000000000..7c0e18bb59 --- /dev/null +++ b/charts/pihole/2.0.0/templates/common.yaml @@ -0,0 +1,13 @@ +{{- include "ix.v1.common.loader.init" . -}} + +{{- include "pihole.migration" $ -}} + +{{/* Merge the templates with Values */}} +{{- $_ := mustMergeOverwrite .Values (include "pihole.workload" $ | fromYaml) -}} +{{- $_ := mustMergeOverwrite .Values (include "pihole.service" $ | fromYaml) -}} +{{- $_ := mustMergeOverwrite .Values (include "pihole.persistence" $ | fromYaml) -}} + +{{/* Create the configmap for portal manually*/}} +{{- include "pihole.portal" $ -}} + +{{- include "ix.v1.common.loader.apply" . -}} diff --git a/charts/pihole/2.0.0/to_keep_versions.md b/charts/pihole/2.0.0/to_keep_versions.md new file mode 100644 index 0000000000..d8831326d9 --- /dev/null +++ b/charts/pihole/2.0.0/to_keep_versions.md @@ -0,0 +1,4 @@ +# 1.0.25 + +This version is kept because it contains a fix that is needed for migration to v2.x.x +It should be safe to remove few months after v2.x.x is released. diff --git a/community/pigallery2/1.2.3/Chart.lock b/community/pigallery2/1.2.4/Chart.lock similarity index 100% rename from community/pigallery2/1.2.3/Chart.lock rename to community/pigallery2/1.2.4/Chart.lock diff --git a/community/pigallery2/1.2.3/Chart.yaml b/community/pigallery2/1.2.4/Chart.yaml similarity index 98% rename from community/pigallery2/1.2.3/Chart.yaml rename to community/pigallery2/1.2.4/Chart.yaml index e598ee4b6f..660b90525c 100644 --- a/community/pigallery2/1.2.3/Chart.yaml +++ b/community/pigallery2/1.2.4/Chart.yaml @@ -3,7 +3,7 @@ description: PiGallery2 is a fast directory-first photo gallery website, with ri annotations: title: PiGallery2 type: application -version: 1.2.3 +version: 1.2.4 apiVersion: v2 appVersion: 2.0.0 kubeVersion: '>=1.16.0-0' diff --git a/community/pigallery2/1.2.3/README.md b/community/pigallery2/1.2.4/README.md similarity index 100% rename from community/pigallery2/1.2.3/README.md rename to community/pigallery2/1.2.4/README.md diff --git a/community/pigallery2/1.2.3/app-readme.md b/community/pigallery2/1.2.4/app-readme.md similarity index 100% rename from community/pigallery2/1.2.3/app-readme.md rename to community/pigallery2/1.2.4/app-readme.md diff --git a/community/pigallery2/1.2.3/charts/common-1.2.9.tgz b/community/pigallery2/1.2.4/charts/common-1.2.9.tgz similarity index 100% rename from community/pigallery2/1.2.3/charts/common-1.2.9.tgz rename to community/pigallery2/1.2.4/charts/common-1.2.9.tgz diff --git a/community/pigallery2/1.2.3/ci/basic-values.yaml b/community/pigallery2/1.2.4/ci/basic-values.yaml similarity index 100% rename from community/pigallery2/1.2.3/ci/basic-values.yaml rename to community/pigallery2/1.2.4/ci/basic-values.yaml diff --git a/community/pigallery2/1.2.3/ci/extra-values.yaml b/community/pigallery2/1.2.4/ci/extra-values.yaml similarity index 100% rename from community/pigallery2/1.2.3/ci/extra-values.yaml rename to community/pigallery2/1.2.4/ci/extra-values.yaml diff --git a/community/pigallery2/1.2.3/ci/hostNet-values.yaml b/community/pigallery2/1.2.4/ci/hostNet-values.yaml similarity index 100% rename from community/pigallery2/1.2.3/ci/hostNet-values.yaml rename to community/pigallery2/1.2.4/ci/hostNet-values.yaml diff --git a/community/pigallery2/1.2.3/ix_values.yaml b/community/pigallery2/1.2.4/ix_values.yaml similarity index 100% rename from community/pigallery2/1.2.3/ix_values.yaml rename to community/pigallery2/1.2.4/ix_values.yaml diff --git a/community/pigallery2/1.2.3/metadata.yaml b/community/pigallery2/1.2.4/metadata.yaml similarity index 100% rename from community/pigallery2/1.2.3/metadata.yaml rename to community/pigallery2/1.2.4/metadata.yaml diff --git a/community/pigallery2/1.2.3/migrations/migrate b/community/pigallery2/1.2.4/migrations/migrate similarity index 100% rename from community/pigallery2/1.2.3/migrations/migrate rename to community/pigallery2/1.2.4/migrations/migrate diff --git a/community/pigallery2/1.2.3/questions.yaml b/community/pigallery2/1.2.4/questions.yaml similarity index 99% rename from community/pigallery2/1.2.3/questions.yaml rename to community/pigallery2/1.2.4/questions.yaml index ff08a36ccb..268fd8fcc7 100644 --- a/community/pigallery2/1.2.3/questions.yaml +++ b/community/pigallery2/1.2.4/questions.yaml @@ -288,6 +288,12 @@ questions: description: Host Path (Path that already exists on the system) - value: "ixVolume" description: ixVolume (Dataset created automatically by the system) + - variable: readOnly + label: Read Only + description: Mount the volume as read only. + schema: + type: boolean + default: false - variable: ixVolumeConfig label: ixVolume Configuration description: The configuration for the ixVolume dataset. diff --git a/community/pigallery2/1.2.4/templates/NOTES.txt b/community/pigallery2/1.2.4/templates/NOTES.txt new file mode 100644 index 0000000000..ba4e01146c --- /dev/null +++ b/community/pigallery2/1.2.4/templates/NOTES.txt @@ -0,0 +1 @@ +{{ include "ix.v1.common.lib.chart.notes" $ }} diff --git a/community/pigallery2/1.2.3/templates/_configuration.tpl b/community/pigallery2/1.2.4/templates/_configuration.tpl similarity index 100% rename from community/pigallery2/1.2.3/templates/_configuration.tpl rename to community/pigallery2/1.2.4/templates/_configuration.tpl diff --git a/community/pigallery2/1.2.3/templates/_persistence.tpl b/community/pigallery2/1.2.4/templates/_persistence.tpl similarity index 100% rename from community/pigallery2/1.2.3/templates/_persistence.tpl rename to community/pigallery2/1.2.4/templates/_persistence.tpl diff --git a/community/pigallery2/1.2.3/templates/_pigallery2.tpl b/community/pigallery2/1.2.4/templates/_pigallery2.tpl similarity index 100% rename from community/pigallery2/1.2.3/templates/_pigallery2.tpl rename to community/pigallery2/1.2.4/templates/_pigallery2.tpl diff --git a/community/pigallery2/1.2.3/templates/_portal.tpl b/community/pigallery2/1.2.4/templates/_portal.tpl similarity index 100% rename from community/pigallery2/1.2.3/templates/_portal.tpl rename to community/pigallery2/1.2.4/templates/_portal.tpl diff --git a/community/pigallery2/1.2.3/templates/_service.tpl b/community/pigallery2/1.2.4/templates/_service.tpl similarity index 100% rename from community/pigallery2/1.2.3/templates/_service.tpl rename to community/pigallery2/1.2.4/templates/_service.tpl diff --git a/community/pigallery2/1.2.3/templates/common.yaml b/community/pigallery2/1.2.4/templates/common.yaml similarity index 100% rename from community/pigallery2/1.2.3/templates/common.yaml rename to community/pigallery2/1.2.4/templates/common.yaml