Skip to content

Helm, CustomResourceDefs, and custom controllers #2925

Closed

Description

@tjquinno

(Looked here and in slack but didn't find relevant entries)

The helm ordering logic (https://github.com/kubernetes/helm/blob/v2.6.1/pkg/tiller/kind_sorter.go#L29-L53) does not explicitly account for CRDs and/or custom controllers.

Are there plans to fold these in explicitly to helm?

Are they already implied by the APIService entry in the ordering?

In practice, it seems there are at least some cases in which a custom resource ought to be defined early so other resources could refer to it. I have not had a chance to try this myself but a colleague has said that helm does not handle this case well.

Are we missing something?

Are there plans to enhance helm's handling of this case?

Thanks.

Activity

  1. technosophos commented on Sep 12, 2017

    @technosophos
    Member

    They probably should be added to the explicit ordering. The implicit ordering has CRDs last during install operations and first during delete operations

    We're still waiting a little bit to see how a few things settle out with CRDs, but ordering with them is particularly tricky because of the two-stage validation/submission logic. Right now, a CRD must be installed in a separate step before anything else can use it. The reason for this is that when they are all submitted together, everything is validated up front -- before the CRD is actually installed. So any reference to the CRD in that same install will fail the validation check.

    Assuming this validation/installation gotcha doesn't get solved in upstream, we'll probably need to write some special handling that does a separate install of the CRD as a pre-step before running the rest of the install.

    So it is sort of a more complicated problem than it initially seems. But certainly explicitly putting it in the install order would be better than the implicit ordering even if it doesn't solve all of our outstanding issues with CRDs.

  2. technosophos commented on Sep 12, 2017

    @technosophos
    Member

    I marked this as a starter for adding CRDs to the sorter. The bigger issue we can tackle separately.

  3. seh commented on Sep 14, 2017

    @seh
    Contributor

    Take note, @jascott1, as both you and I have been in this area of the code recently.

  4. added 2 commits that reference this issue on Oct 10, 2017
    d824661
    29c3b52
  5. kfox1111 commented on Dec 1, 2017

    @kfox1111

    I"m seeing this issue too. even with 2.7.2.
    Error: apiVersion "kubeprovision.github.com/v1" in kube-provision-node/charts/reference-templates/templates/kickstart-kpntemplate.yaml is not available

  6. thomastaylor312 commented on Dec 1, 2017

    @thomastaylor312
    Contributor

    @kfox1111 We only fixed the ordering. The full description of the problem is in this comment above. That appears to be what is happening

  7. luisyonaldo commented on Jan 6, 2018

    @luisyonaldo

    @technosophos @thomastaylor312 according to helm docs, you can install a CRD as a pre-install hook, but in practice it still fails because validation step doesn't yet recognize the 3rd party api definition. Only way I have found is installing resources that depends on the CRD as post-install hook that creates a job that trigger a container that manually install the resources using kubectl apply -f custome-resources-config.yaml so validation doesn't fail and order is right. But this seems too much complicated and also is not what the documation in helm said. I'm I missing something?

  8. bacongobbler commented on Jan 6, 2018

    @bacongobbler
    Member

    I believe that issue is being tracked in #2994. :)

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions