2025-05-19 16:04:38 +03:00
2025-04-07 14:17:03 +03:00
2024-05-21 21:59:38 +03:00
2025-04-24 21:24:19 +03:00
2025-04-24 21:24:19 +03:00
2025-04-24 21:24:19 +03:00
2025-04-09 03:28:14 +03:00
2025-04-09 03:15:38 +03:00
2025-04-24 21:24:19 +03:00
2025-04-24 21:24:19 +03:00
2025-04-09 03:28:14 +03:00
2025-03-24 09:45:02 +02:00
2025-04-24 21:24:19 +03:00
2025-03-18 23:27:27 +02:00
2025-05-19 16:04:38 +03:00
2025-04-09 03:15:38 +03:00
2025-05-19 16:03:00 +03:00

Server Manager Kubernetes Operator

This is the code for the back-end used in ServerManager.

The server-manager is designed with modularity in mind and is built from a few major parts.

  1. Users
  2. Servers Metadata
  3. Servers Authorization Data
  4. Instance Manager

The backend interfaces with these parts separately however it will share connections where possible to reduce duplicate connections.

Modules

User Management

The User management module has several responsibilities and should be split into modules in the future.

  • Fetch and save data about existing users

    • Global Permissions
    • Nickname
    • Contact Email
  • Authenticate a user

Currently the User Management is only implemented with MongoDB as the underlying database

Servers Metadata

The Servers Metadata holds data about existing servers such as:

  • Default command to run when ran without arguments
  • Default ports to open in case no ports are opened
  • Server nickname
  • Data on the image the server uses

Currently only implemented with MongoDB

Servers Authorization

The Servers Authorization Module is responsible for server-specific permissions.

Currently only implemented with MongoDB

Instance Manager

The Instance Manager is responsible for running the servers, and supplying interactive shell to the console of the server.

Currently implemented in Docker, and Kubernetes (using the ServerManager Operator)

Configuration Example

Yaml Config format

domain: "games.acooldomain.co"

signing:
  key: ""
  algorithm: "HS512"

email:
  from_email: "no-reply@acooldomain.co"
  username: "no-reply@acooldomain.co"
  password: ""
  server: "mail.acooldomain.co"

authentication:
  type: "UserPass"
  oidc: # can be omitted
    issuer_url: ""
    client_id: ""
    client_secret: ""
  user_pass:
    type: "mongo"
    initial_user:
      email: "acoolname@acooldomain.co"
    mongo:
      url: "mongodb://server-manager-mongo:27017"
      username: ""
      password: ""
      database: "users_db"
      collection: "user_data"
    invite_token_database:
      type: "mongo"
      mongo:
        url: "mongodb://server-manager-mongo:27017"
        username: ""
        password: ""
        database: "users_db"
        collection: "invite_tokens"

instancemanager:
  type: "kubernetes"
  kubernetes:
    namespace: server-manager
  docker: # can be omitted
    file_browser:
      image:
        registry: "filebrowser/filebrowser"
        tag: "latest"
      command: ""
      network: "exposed"
      reverse_proxy:
        middlewares:
          - backend-auth@docker
        entrypoint: "web"

users:
  default_max_owned_servers: 10

servers_database:
  type: "mongo"
  mongo:
    url: "mongodb://server-manager-mongo:27017"
    username: ""
    password: ""
    database: "server_db"
    collection: "servers"

servers_authorization_database:
  type: "mongo"
  mongo:
    url: "mongodb://server-manager-mongo:27017"
    username: ""
    password: ""
    database: "server_db"
    collection: "auth_data"
Description
No description provided
Readme GPL-3.0 487 KiB
Languages
Go 99.6%
Dockerfile 0.4%