TeamPiped / Piped-Kubernetes

GNU Affero General Public License v3.0
7 stars 6 forks source link

[piped] Piped fails to start due to incompatible postgres version used #61

Closed nalepamarcin closed 1 year ago

nalepamarcin commented 1 year ago

Helm chart name

piped

Helm chart version

3.1.1

Container name

-

Container tag

-

Description

Piped helm chart has 11.19.0-debian-11-r4 specified as a postgres image version to use: https://github.com/TeamPiped/Piped-Kubernetes/blob/639a988e564e912fff55ba9879c9e7a5ff834760/charts/apps/piped/values.yaml#L186

This override is probably not desired as it overrides default image version specified in postgresql-12.2.0 helm and makes piped-backed to crash with ERROR: function gen_random_uuid() does not exist:

liquibase.exception.CommandExecutionException: liquibase.exception.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for changeset changelog/version/0-init.xml::0-1::kavin:
     Reason: liquibase.exception.DatabaseException: ERROR: function gen_random_uuid() does not exist
  Hint: No function matches the given name and argument types. You might need to add explicit type casts.
  Position: 181 [Failed SQL: (0) --rollback DROP TABLE IF EXISTS pubsub;

CREATE TABLE IF NOT EXISTS playlists (
    id BIGSERIAL NOT NULL,
    name VARCHAR(200) NULL,
    playlist_id UUID NOT NULL UNIQUE DEFAULT gen_random_uuid(),
    short_description VARCHAR(100) NULL,
    thumbnail VARCHAR(300) NULL,
    owner INT8 NOT NULL,
    CONSTRAINT playlists_pkey PRIMARY KEY (id),
    CONSTRAINT fk_playlists_owner FOREIGN KEY (owner) REFERENCES users(id)
)]
        at liquibase.command.CommandScope.execute(CommandScope.java:236)
        at me.kavin.piped.utils.LiquibaseHelper.lambda$init$0(LiquibaseHelper.java:44)
        at liquibase.Scope.lambda$child$0(Scope.java:197)
        at liquibase.Scope.child(Scope.java:206)
        at liquibase.Scope.child(Scope.java:196)
        at liquibase.Scope.child(Scope.java:175)
        at me.kavin.piped.utils.LiquibaseHelper.init(LiquibaseHelper.java:40)
        at me.kavin.piped.Main.main(Main.java:50)
...

The function in question got introduced in postgres 13 and chart tries to deploy 11.

Expected result

piped-backend starts without crash

Helm values to reproduce

just the defaults, i.e:

postgresql:
  image:
    tag: 11.19.0-debian-11-r4

Additional Information

No response

Repo link

No response