suite: test bundled database images templates: - charts/postgresql/templates/primary/statefulset.yaml - charts/redis/templates/master/application.yaml - charts/redis/templates/configmap.yaml - charts/redis/templates/health-configmap.yaml - charts/redis/templates/scripts-configmap.yaml - charts/redis/templates/secret.yaml - secret-dbcredentials.yaml - templates/tests/test-servicemonitor.yaml tests: - it: should pull the bundled postgres from a repository that still publishes the pinned tag template: charts/postgresql/templates/primary/statefulset.yaml set: db.deployStandalone: true asserts: - equal: path: spec.template.spec.containers[0].image value: docker.io/bitnamilegacy/postgresql:16.2.0-debian-12-r6 - it: should pull the bundled postgres metrics exporter from the same repository template: charts/postgresql/templates/primary/statefulset.yaml set: db.deployStandalone: true postgresql.metrics.enabled: true asserts: - equal: path: spec.template.spec.containers[1].image value: docker.io/bitnamilegacy/postgres-exporter:0.15.0-debian-12-r14 - it: should run the bundled postgres init container from the same repository template: charts/postgresql/templates/primary/statefulset.yaml set: db.deployStandalone: true postgresql.volumePermissions.enabled: true asserts: - equal: path: spec.template.spec.initContainers[0].image value: docker.io/bitnamilegacy/os-shell:12-debian-12-r16 - it: should pull the bundled redis from a repository that still publishes the pinned tag template: charts/redis/templates/master/application.yaml set: redis.enabled: true asserts: - equal: path: spec.template.spec.containers[0].image value: docker.io/bitnamilegacy/redis:7.2.4-debian-12-r9 - it: should reject a floating postgres tag that could cross a major version on an existing volume template: secret-dbcredentials.yaml set: db.deployStandalone: true postgresql.image.tag: latest asserts: - failedTemplate: errorMessage: 'postgresql.image.tag must be pinned to an explicit version when db.deployStandalone is true (got "latest"). An unpinned tag can start a different PostgreSQL major against the existing data directory, which makes the database unreadable and is not recoverable in place. Crossing a major version requires a dump and restore.' - it: should reject an empty postgres tag template: secret-dbcredentials.yaml set: db.deployStandalone: true postgresql.image.tag: "" asserts: - failedTemplate: errorMessage: 'postgresql.image.tag must be pinned to an explicit version when db.deployStandalone is true (got ""). An unpinned tag can start a different PostgreSQL major against the existing data directory, which makes the database unreadable and is not recoverable in place. Crossing a major version requires a dump and restore.' - it: should accept an empty postgres tag when the image is pinned by digest template: secret-dbcredentials.yaml set: db.deployStandalone: true postgresql.image.tag: "" postgresql.image.digest: sha256:0d0e2f1a5b3c4d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6 asserts: - hasDocuments: count: 1 - it: should run the servicemonitor test pod from a pinned image template: templates/tests/test-servicemonitor.yaml set: serviceMonitor.enabled: true asserts: - equal: path: spec.containers[0].image value: docker.io/bitnamilegacy/kubectl:1.29.2-debian-12-r3 - it: should not constrain the postgres tag when the bundled database is not deployed template: secret-dbcredentials.yaml set: db.deployStandalone: false postgresql.image.tag: latest asserts: - hasDocuments: count: 0