Skip to content

Generate ephemeral-storage requests and limits configuration using deploy labels #1935

@jvitor83

Description

@jvitor83

What would you like to be added?

Allow to use labels in the deploy section to convert to kubernetes resources requests and limits for ephemeral-storage.

Example:

services:
  app:
    image: node:18-alpine
    ports:
      - 3000:3000
    deploy:
      labels:
        requests.ephemeral-storage: 1Gi
        limits.ephemeral-storage: 1Gi

Generates:

apiVersion: apps/v1
kind: Deployment
...
spec:
    ...
    spec:
      containers:
        - image: node:18-alpine
          name: app
          ports:
            - containerPort: 3000
              protocol: TCP
          resources:
            limits:
              ephemeral-storage: 1Gi
            requests:
              ephemeral-storage: 1Gi

Why is this needed?

By using the generated yaml files, if those ephemeral-storage resources configuration didn't exists and if the cluster where the deploy will happen are on low ephemeral storage, this gives an error.
By have the possibility to put those config, we can properly set how much reserve should have.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions