Skip to content

feat: volume information and environment service state#4065

Draft
shreddedbacon wants to merge 5 commits into
mainfrom
additional-service-information
Draft

feat: volume information and environment service state#4065
shreddedbacon wants to merge 5 commits into
mainfrom
additional-service-information

Conversation

@shreddedbacon

Copy link
Copy Markdown
Member

General Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated
  • PR title is ready for inclusion in changelog

Database Migrations

  • If your PR contains a database migation, it MUST be the latest in date order alphabetically

Description

This pullrequest extends environments by adding new EnvironmentVolume to volumes. This tracks volumes that the environment has requested to be created. It will track both bulk and block based storage types.

EnvironmentService type is also extended on container information to reflect which volumes and ports are attached to each container.

EnvironmentVolume also exposes kibUsed and kibRequested information.

  • kibUsed requires that the storage-calculator is running, and reflects just the last value that would be retrieved by the storages field on an environment, but directly connected to a volume.
  • kibRequested is the value from the requested volume size in docker-compose. This value is converted from the requested string value to an API Float to match kibUsed. E.g: The string 5Gi would be converted to 5242880 kibibytes

Additionally, if a service is no longer tracked by the Lagoon build process, it is flagged as abandoned in the API. Lagoon builds may also present this currently as a build warning indicating which services are flagged as no longer used.

Example environment response
{
	"environmentById": {
		"services": [
			{
				"abandoned": false,
				"containers": [
					{
						"name": "nginx",
						"ports": [
							{
								"name": "http",
								"port": 8080
							}
						],
						"volumemounts": [
							{
								"name": "custom-extravol",
								"path": "/extra",
								"volume": {
									"kibUsed": 4,
									"name": "custom-extravol",
									"kibRequested": 5242880
								}
							}
						]
					}
				],
				"name": "nginx",
				"replicas": 0,
				"type": "nginx"
			}
		],
		"volumes": [
			{
				"abandoned": false,
				"kibUsed": 4,
				"name": "custom-extravol",
				"kibRequested": 5242880,
				"storageType": "bulk",
				"type": "additional-volume"
			}
		]
	}
}

@github-actions

github-actions Bot commented Mar 24, 2026

Copy link
Copy Markdown

Overview

Image reference testlagoon/api:main lagoon/api:ci-latest
- digest 9b0c85021dd9 d426384661b0
- tag main ci-latest
- vulnerabilities critical: 5 high: 78 medium: 67 low: 10 critical: 5 high: 78 medium: 67 low: 10
- platform linux/amd64 linux/amd64
- size 152 MB 183 MB (+31 MB)
- packages 1568 1568
Base Image node:22-alpine
also known as:
22-alpine3.23
22.22-alpine
22.22-alpine3.23
22.22.3-alpine
22.22.3-alpine3.23
jod-alpine
jod-alpine3.23
node:22-alpine
also known as:
22-alpine3.23
22.22-alpine
22.22-alpine3.23
22.22.3-alpine
22.22.3-alpine3.23
jod-alpine
jod-alpine3.23
- vulnerabilities critical: 1 high: 9 medium: 8 low: 2 critical: 1 high: 9 medium: 8 low: 2

@shreddedbacon shreddedbacon force-pushed the additional-service-information branch from c179bb7 to 8ac71f7 Compare June 11, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants