Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Add helm hook crd-install to fix helm install error #631

Merged
merged 1 commit into from
Mar 11, 2019

Conversation

hex108
Copy link
Contributor

@hex108 hex108 commented Mar 11, 2019

What this PR does / why we need it:
There is an error when running helm install $GOPATH/src/github.com/kubernetes-sigs/kube-batch/deployment/kube-batch --namespace kube-system.

Error message:

$ helm install deployment/kube-batch --namespace kube-system
Error: validation failed: unable to recognize "": no matches for kind "Queue" in version "scheduling.incubator.k8s.io/v1alpha1"

It is because helm does not guarantee that deployment/kube-batch/templates/scheduling_v1alpha1_queue.yaml will be executed before deployment/kube-batch/templates/default.yaml. However we could add a helm hook crd-install to guarantee it.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Release note:

Add helm hook crd-install to fix helm install error

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 11, 2019
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 11, 2019
@@ -2,6 +2,8 @@ apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: queues.scheduling.incubator.k8s.io
annotations:
"helm.sh/hook": "crd-install"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also help to add this hook for PodGroup?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The YAML files in the chart do not use PodGroup, so it seems unnecessary? I'll add it if needed :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added it in case that some logic(e.g. logic in the kube-batch deployment) depends on it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks :) Just in case we add some other dependency on that.

@k82cn
Copy link
Contributor

k82cn commented Mar 11, 2019

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 11, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hex108, k82cn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 11, 2019
@k8s-ci-robot k8s-ci-robot merged commit b443f8d into kubernetes-retired:master Mar 11, 2019
@hex108 hex108 deleted the helm branch March 11, 2019 12:06
k8s-ci-robot added a commit that referenced this pull request Mar 11, 2019
…632-#633-upstream-release-0.4

Automated cherry pick of #630: v0.4.1 Release Notes #631: Add helm hook crd-install to fix helm install error #632: Set schedConf to defaultSchedulerConf if failing to #633: Added new PRs.
kevin-wangzefeng pushed a commit to kevin-wangzefeng/scheduler that referenced this pull request Jun 28, 2019
Add helm hook crd-install to fix helm install error
kevin-wangzefeng pushed a commit to kevin-wangzefeng/scheduler that referenced this pull request Jun 28, 2019
Add helm hook crd-install to fix helm install error
kevin-wangzefeng pushed a commit to kevin-wangzefeng/scheduler that referenced this pull request Jun 28, 2019
Add helm hook crd-install to fix helm install error
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants