[FOLIO-2219] Create script to build Kubernetes deployment yaml from module descriptor metadata Created: 20/Aug/19  Updated: 03/Jun/20  Resolved: 06/Sep/19

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P2
Reporter: Ian Hardy Assignee: Ian Hardy
Resolution: Done Votes: 0
Labels: devops, platform-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Blocks
is blocked by FOLIO-1698 determine additional module metadata ... Closed
is blocked by FOLIO-2185 SPIKE: how to maintain resource deplo... Closed
Relates
relates to FOLIO-2292 Add support to folio-ansible for sett... Open
Sprint: CP: sprint 71
Story Points: 2
Development Team: Core: Platform

 Description   

Create a script to build a Kubernetes deployment yaml . This script should be able to run outside CI and use elements from the module descriptor metadata section (memory, java options, etc) and sensible defaults to create the deployment. Look at the folio-ansible/roles/module-kubernetes/templates/ for an example deployment yaml.



 Comments   
Comment by Ian Hardy [ 05/Sep/19 ]

I have a PR up for this, the easiest way to run this and check it out is to use the Docker image:

cat ModuleDescriptor.json | docker run -i \
  folioci/md2kubeyaml

One question, Wayne Schneider,David Crossley & others:

use elements from the module descriptor metadata section (memory, java options, etc) and sensible defaults to create the deployment.

Do you think the sensible defaults part is covered by Wayne's work in FOLIO-2185 Closed or should i add those defaults into this script as well to insert them where they don't exist?

Comment by Wayne Schneider [ 05/Sep/19 ]

I think I might be missing where the container memory limit is set? Python is not my first language, so please excuse my ignorance

Comment by Ian Hardy [ 05/Sep/19 ]

Thanks Wayne Schneider, that was very much missing. Updated the PR and added a default there.

Comment by David Crossley [ 06/Sep/19 ]

I did some basic review, and fixed some minor typos.

Yes i reckon that it handles the defaults fine, and it has default for missing "memory" setting. Good.

However with my testing, it always uses the default memory. Ran out of time today for testing.
But glancing at the template, it has "dockerArgs.HostConfig.memory".
Should that instead be "dockerArgs.HostConfig.Memory" capitalised.

Generated at Thu Feb 08 23:19:05 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.