Skip to content

how tiller decide the execution order of chart and dependency chart #1780

Closed

Description

@luoxiaoxun

As question, I just find out tiller sort the execution by specific order, the install order is {"Namespace", "Secret", "ConfigMap", "PersistentVolume", "ServiceAccount", "Service", "Pod", "ReplicationController", "Deployment", "DaemonSet", "Ingress", "Job"}, but I haven't figured out the execution order of chart and dependency chart

Activity

  1. technosophos commented on Jan 4, 2017

    @technosophos
    Member

    All charts are grouped together, then sorted by kind.

    For example:

    MyApp has dependency MyDB. They look like this:

    • MyApp
      • MyApp ConfigMap
      • MyApp Replica Set
    • MyDB
      • MyDB Service
      • MyDB DaemonSet

    The order of install is:

    • MyApp ConfigMap
    • MyDB Service
    • MyDB DaemonSet
    • MyApp ReplicaSet (which, since order is not specified in the list above, will go last)
  2. luoxiaoxun commented on Jan 5, 2017

    @luoxiaoxun
    Author

    Ok, I got it, thank for your reply~! @technosophos

  3. technosophos commented on Jan 11, 2017

    @technosophos
    Member

    I'm going to close this. Feel free to re-open if you still have questions about it.

  4. tonyaw commented on Feb 23, 2017

    @tonyaw

    Hi,
    Could you please help to explain why all charts are grouped together including the dependency?
    In my opinion, the dependency chart should be created first, and after it is created successfully, its parent chart should be started to create.

  5. Stono commented on Dec 21, 2017

    @Stono

    +1 to the comment above, i need dependent charts to run BEFORE the parent because they add pre-reqs like custom api resources. Any suggestions on how to do this other than another repo or a whole bunch of if statements?

  6. whereisaaron commented on Jan 12, 2018

    @whereisaaron
    Contributor

    TPR/CRDs are a particular issue that often necessitates some ordering control.

    It would be nice to be able to e.g. apply weights to subcharts in requirements.yaml, with charts of the same weight being sorted together with the current algorithm. All weights, including parent chart would be zero by default. Negative weights would install before the parent chart, positive weights would install after.

    With this optional feature the processing of all existing charts would be unaffected. And only people who really need ordering would specify any weights for requirements.yaml.

  7. bacongobbler commented on Jan 15, 2018

    @bacongobbler
    Member

    We are tracking CRD support in #2994. Anyone interested in CRD support should follow that ticket.

  8. morvencao commented on Apr 3, 2018

    @morvencao

    @gyliu513 I think this explain the reason why putting configmap consumed by subcharts to parent is working fine.

  9. dkushner commented on Jun 15, 2018

    @dkushner

    Also currently having this issue trying to deploy a custom chart that depends on a stable/postgresql installation being present before installation. My application first runs a migration Job (using lifecycle pre-install annotations), and then completes my deployment. The migration Job is set to wait for the database to become responsive before executing. The stable/postgresql chart provides extension points that allowed me to annotate the deployment and PVC with a lower priority pre-install hook, but because the SecretsMap is not present, it still fails.

    Definite +1 to the ability to coarsely order the installation of dependencies for a chart.

  10. bamb00 commented on Jun 22, 2018

    @bamb00

    @dkushner Can you provide the pre-install hook example use to get around the ordering issue?

  11. TD-4242 commented on Jul 6, 2018

    @TD-4242

    I'm running into an identical issue. I have a db migration script set as a pre-install hook that, prior to my current task, depended on the database being manually deployed prior to the service that includes the migration.

    Now, trying to merge the charts into a parent chart that installs an external service for postgresql (pointing to an RDS instance) the chart with the pre-install hook executes and fails stopping the deployment.

    I thought I had a fix using a pre-install hook on the postgresql service, but of course hooks are not managed by tiller so the next upgrade failed with a "service exists" error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions