Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support adding condition to compose depends_on / warn the user #1871

Closed
aitrics-ray opened this issue May 10, 2024 · 6 comments
Closed

Support adding condition to compose depends_on / warn the user #1871

aitrics-ray opened this issue May 10, 2024 · 6 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@aitrics-ray
Copy link

What would you like to be added?

I'm trying to convert docker compose via kompose.

version: "3.8"

networks:
  shared_network:
    driver: bridge

services:
  mysql:
    container_name: mysql
    platform: linux/amd64
    restart: unless-stopped
    image: 997245385850.dkr.ecr.ap-northeast-2.amazonaws.com/prod/mysql:8.0.36-debian-18a00bd
    expose:
      - 3306
    ports:
      - "3306:3306"
    volumes:
      - ${VOLUME_DIR}/volumes/mysql/:/var/lib/mysql/
      - ${VOLUME_DIR}/logs/mysql/:/var/log/mysql/
    healthcheck:
      test: [ "CMD", "./healthcheck.sh" ]
      interval: 3s
      timeout: 3s
      retries: 100
    networks:
      - shared_network

  backend-migration:
    container_name: backend-migration
    platform: linux/amd64
    deploy:
      restart_policy:
        condition: on-failure
        delay: 10s
        max_attempts: 3
    image: 997245385850.dkr.ecr.ap-northeast-2.amazonaws.com/prod/vc-backend:${VC_IMAGE_TAG}
    entrypoint: [ "sh", "-c", "make migrate" ]
    env_file:
      - ../common_env/vc-backend.env
      - envs/db-encrypt.env
    networks:
      - shared_network
    depends_on:
      mysql:
        condition: service_healthy

  backend:
    container_name: backend
    platform: linux/amd64
    restart: unless-stopped
    image: 997245385850.dkr.ecr.ap-northeast-2.amazonaws.com/prod/vc-backend:${VC_IMAGE_TAG}
    command: uvicorn app.application:app --host 0.0.0.0 --port 8080
    ports:
      - "8080:8080"
    environment:
      - OTEL_SERVICE_NAME=backend
      - VITALCARE_ENVIRONMENT=development
    env_file:
      - ../common_env/vc-backend.env
      - envs/vc-backend.env
      - envs/db-encrypt.env
      - envs/otel.env
    hostname: api.vitalcare.io
    volumes:
      - ${VOLUME_DIR}/logs/backend/:/data/vc-backend/logs/
      - ${VOLUME_DIR}/admin/:${VC_BACKEND_MOUNT_PATH}
    networks:
      - shared_network
    depends_on:
      backend-migration:
        condition: service_completed_successfully

When I run kompose convert, I get an error like this.
FATA services.backend-migration.depends_on must be a list
My guess is that it's because it's a condition, not a list. Is there a workaround?

Why is this needed?

There are some things that depend_on is not a List.

@aitrics-ray aitrics-ray added the kind/feature Categorizes issue or PR as related to a new feature. label May 10, 2024
@cdrage
Copy link
Member

cdrage commented May 29, 2024

We don't support condition at the moment, sorry :(

We'll have to implement this in the future.

@cdrage cdrage changed the title FATA services.backend-migration.depends_on must be a list Support adding condition to compose depends_on / warn the user May 29, 2024
@cdrage
Copy link
Member

cdrage commented May 29, 2024

I've gone ahead and updated the title of this issue

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 27, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 26, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 26, 2024
@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants