Skip to content

Improve deployment on Kubernetes #13

@mattrent

Description

@mattrent

The kind/Kubernetes deployment currently has some issues; this is meant to be a meta-issue, to simplify grouping them up and potentially adding problems found while testing.

  • Postgres password/user are hardcoded and visible; they should be treated as secrets and potentially given by the system administrator (see also issue Handle SECRET_KEY_BASE as k8s secret/env file #5)
  • Filebeat, ElasticSearch and Kibana are not present in the Kubernetes deployment (they are in the docker-compose version)
  • Core pods should have a wait-for-postgres InitContainer, to have them wait until init-postgres has completed before starting deployment (avoiding potential initial crashes)
  • postgres data should be persistent (i.e. we should give postgres both a PersistentVolume and a PersistentVolumeClaim to ensure the service works properly even after restarts)
  • init-postgres job could have a wait-for-postgres InitContainer, instead of a while command waiting for postgres (makes it easier for logs and diagnostics to see if it's stuck in an InitContainer instead of the main one)
  • When a core is restarted, the DB migration and seeding is run again, causing an error as the database was already seeded; this might just be solvable by catching the constraint exception directly in the core component
  • core and worker pods should be able to coexist (right now they both depend on the fl label to be deployed, and are mutually exclusive)
  • Replicas of postgres should be coupled with the instances of core. This might require changes also on funless itself, but would allow us to exploit co-location of data with the actual service, reducing latency for database operations (as of right now postgres and core are simply deployed on core nodes, but no explicit coupling is specified)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions