acorn-io / runtime

A simple application deployment framework built on Kubernetes

Home Page:https://docs.acorn.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to set environment/env for service(consuming)

randall-coding opened this issue · comments

When I try to set the environment field as per the docs, I see the following errors on acorn build

✗ ERROR: schema violation types.App.services.db: option 1: [must match alternate (:123:16)],
option 2: [option 1: [must match alternate (:108:20)],
option 2: [unknown field: types.ServiceGeneric.environment (:78:18)],
option 3: [unknown field: types.ServiceGenerated.container (:108:20)]],
option 3: [unknown field: types.ServiceAcorn.container (:123:16)]

✗ ERROR: schema violation types.App.services.db: option 1: [must match alternate (:123:16)],
option 2: [option 1: [must match alternate (:108:20)],
option 2: [unknown field: types.ServiceGeneric.env (:78:18)],
option 3: [unknown field: types.ServiceGenerated.container (:108:20)]],
option 3: [unknown field: types.ServiceAcorn.container (:123:16)]

Here is my Acornfile:

containers: {
    website: {
        image: "gamelaster/opensupports:latest"
        ports: publish: [
            "80/http"
        ]
        env: {
            TIMEZONE: "secret://env/timezone"
        }
        dirs: {
            "/config": "volume://config"
        }
        dependsOn: ["mariadb"]
    }
}
services: db: {
    default:   true
    container: "mariadb"
    secrets: ["admin", "user"]
    ports: "3306"
    env: {ABC: "XYZ"} // Error on this field.  env or environment.  
    data: dbName: "instance"
}
//...secrets, volumes

Nevermind I think I see my error on this issue. Will try again.