local kube = import "../../kube/hscloud.libsonnet";
local postgres = import "../../kube/postgres.libsonnet";

{
    local top = self,
    local cfg = top.cfg,

    cfg:: {
        namespace: "redmine",
        image: "registry.k0.hswaw.net/informatic/redmine@sha256:b04d1fd04549424e505722c9feb0b6741a057cb8f0fab68ad3730ecb167417df",
        domain: error "domain must be set",
        storageClassName: "waw-hdd-redundant-3",
        database: {
            password: { secretKeyRef: { name: "redmine", key: "postgres_password" } },
        },

        b: {
            domains: [],
            image: "registry.k0.hswaw.net/q3k/b:315532800-6cc2f867951e123909b23955cd7bcbcc3ec24f8a",
        },

        storage: {
            endpoint: error "storage.endpoint must be set",
            region: error "storage.region must be set",
            bucket: error "storage.bucket must be set",
            accessKey: error "storage.accessKey must be set",
            secretKey: error "storage.secretKey must be set",
        },

        oidc: {
            server: error "oidc.server must be set",
            clientID: error "oidc.clientID must be set",
            clientSecret: error "oidc.clientSecret must be set",
        },

        # Mailing configuration object passed to smtp_settings
        mailing: {
            address: error "mailing.address must be set",
            port: 465,
            ssl: true,
            domain: error "mailing.domain must be set",
            authentication: ":login",
            user_name: error "mailing.user_name must be set",
            password: error "mailing.password must be set",
        },
    },

    # Generates YAML file while preserving specified ruby-style symbols.
    # (ie. removes surrounding quotes)
    rubyYaml(obj, symbols):: std.foldr(function (symbol, str) std.strReplace(str, '"%s"' % symbol, symbol), symbols, std.manifestYamlDoc(obj)),

    local ns = kube.Namespace(cfg.namespace),

    postgres: ns.Contain(postgres) {
        cfg+: {
            appName: "redmine",
            database: "redmine",
            username: "redmine",
            password: cfg.database.password,
            storageClassName: cfg.storageClassName,
        },
    },

    deployment: ns.Contain(kube.Deployment("redmine")) {
        spec+: {
            replicas: 1,
            template+: {
                spec+: {
                    securityContext: {
                        runAsUser: 999,
                        runAsGroup: 999,
                        fsGroup: 999,
                    },
                    containers_: {
                        web: kube.Container("redmine") {
                            image: cfg.image,
                            args: ['sh', '-c', |||
                                set -e
                                echo "${X_EXTRA_CONFIGURATION}" > config/configuration.yml
                                exec /docker-entrypoint.sh rails server -b 0.0.0.0
                            |||],
                            ports_: {
                                http: { containerPort: 3000 },
                            },
                            env_: {
                                REDMINE_DB_POSTGRES: top.postgres.svc.host,
                                REDMINE_DB_PORT: top.postgres.svc.port,
                                REDMINE_DB_DATABASE: top.postgres.cfg.database,
                                REDMINE_DB_USERNAME: top.postgres.cfg.username,
                                REDMINE_DB_PASSWORD: top.postgres.cfg.password,

                                REDMINE_SECRET_KEY_BASE: { secretKeyRef: { name: "redmine", key: "secret_key" } },

                                REDMINE_OIDC_SERVER: cfg.oidc.server,
                                REDMINE_OIDC_CLIENT_ID: cfg.oidc.clientID,
                                REDMINE_OIDC_CLIENT_SECRET: cfg.oidc.clientSecret,
                                REDMINE_OIDC_ADMIN_GROUP: "issues-admin",

                                REDMINE_S3_ENDPOINT: cfg.storage.endpoint,
                                REDMINE_S3_BUCKET: cfg.storage.bucket,
                                REDMINE_S3_ACCESS_KEY_ID: cfg.storage.accessKey,
                                REDMINE_S3_SECRET_ACCESS_KEY: cfg.storage.secretKey,
                                REDMINE_S3_REGION: cfg.storage.region,

                                REDMINE_MAILING_PASSWORD: cfg.mailing.password,
                                X_EXTRA_CONFIGURATION: top.rubyYaml({
                                    production: {
                                        email_delivery: {
                                            delivery_method: ":smtp",
                                            smtp_settings: cfg.mailing {
                                                password: "$(REDMINE_MAILING_PASSWORD)",
                                            },
                                        }
                                    },
                                }, [":smtp", ":login"]),
                            },
                        },
                    },
                },
            },
        },
    },

    svc: ns.Contain(kube.Service("redmine")) {
        target:: top.deployment,
    },

    ingress: ns.Contain(kube.SimpleIngress("redmine")) {
        hosts:: [cfg.domain],
        target:: top.svc,
    },

    b: (if std.length(cfg.b.domains) > 0 then {
        deployment: ns.Contain(kube.Deployment("b")) {
            spec+: {
                replicas: 3,
                template+: {
                    spec+: {
                        containers_: {
                            default: kube.Container("default") {
                                image: "registry.k0.hswaw.net/q3k/b:315532800-6cc2f867951e123909b23955cd7bcbcc3ec24f8a",
                                ports_: {
                                    http: { containerPort: 8000 },
                                },
                                command: [
                                    "/devtools/issues/b",
                                ],
                            },
                        },
                    },
                },
            },
        },
        svc: ns.Contain(kube.Service("b")) {
            target:: top.b.deployment,
        },
        ingress: ns.Contain(kube.SimpleIngress("b")) {
            hosts:: cfg.b.domains,
            target:: top.b.svc,
        },
    } else {}),

}
