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

Schedule CRD got removed after Schedule template created on helm-2.16.10 #165

Closed
Vladikamira opened this issue Sep 20, 2020 · 2 comments · Fixed by #153
Closed

Schedule CRD got removed after Schedule template created on helm-2.16.10 #165

Vladikamira opened this issue Sep 20, 2020 · 2 comments · Fixed by #153
Assignees
Labels

Comments

@Vladikamira
Copy link

What steps did you take and what happened:
enabled installCRDs: true flag after upgrade helm-2.12.x to helm-2.16.10, and during helm upgrade --install step getting schedule CRD deleted after schedule template being created, which lead to removing schedule template.
As I understand, it because of post-upgrade hook in CRD

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  labels:
    app.kubernetes.io/name: "velero"
  annotations:
    "helm.sh/hook": pre-install,post-upgrade
    "helm.sh/hook-delete-policy": "before-hook-creation"
    controller-gen.kubebuilder.io/version: v0.2.4
  creationTimestamp: null
  name: schedules.velero.io

What did you expect to happen:

get Schedule template not deleted after install

Anything else you would like to add:
Here is part of tiller log which shows that we install schedule template first, and delete/install CRD after that

[kube] 2020/09/20 08:45:13 checking 6 resources for changes
[kube] 2020/09/20 08:45:13 Looks like there are no changes for ServiceAccount "velero-server" in "velero"
[kube] 2020/09/20 08:45:13 Looks like there are no changes for ClusterRoleBinding "velero-server" in ""
[kube] 2020/09/20 08:45:13 Looks like there are no changes for Role "velero-server" in "velero"
[kube] 2020/09/20 08:45:13 Looks like there are no changes for RoleBinding "velero-server" in "velero"
[kube] 2020/09/20 08:45:13 Looks like there are no changes for Deployment "velero" in "velero"
add ---> [kube] 2020/09/20 08:45:13 Created a new Schedule called "velero-daily" in velero
[kube] 2020/09/20 08:45:13 beginning wait for 6 resources with timeout of 5m0s
[tiller] 2020/09/20 08:45:16 executing 13 post-upgrade hooks for velero
[tiller] 2020/09/20 08:45:16 deleting post-upgrade hook default for release velero due to "before-hook-creation" policy
[kube] 2020/09/20 08:45:17 Starting delete for "default" BackupStorageLocation
[kube] 2020/09/20 08:45:17 backupstoragelocations.velero.io "default" not found
[kube] 2020/09/20 08:45:17 Waiting for 60 seconds for delete to be completed
[kube] 2020/09/20 08:45:19 building resources from manifest
[kube] 2020/09/20 08:45:19 creating 1 resource(s)
[kube] 2020/09/20 08:45:19 Watching for changes to BackupStorageLocation default in velero with timeout of 5m0s
[kube] 2020/09/20 08:45:19 Add/Modify event for default: ADDED
[tiller] 2020/09/20 08:45:19 deleting post-upgrade hook gcp for release velero due to "before-hook-creation" policy
[kube] 2020/09/20 08:45:19 Starting delete for "gcp" VolumeSnapshotLocation
[kube] 2020/09/20 08:45:19 volumesnapshotlocations.velero.io "gcp" not found
[kube] 2020/09/20 08:45:19 Waiting for 60 seconds for delete to be completed
[kube] 2020/09/20 08:45:21 building resources from manifest
[kube] 2020/09/20 08:45:22 creating 1 resource(s)
[kube] 2020/09/20 08:45:22 Watching for changes to VolumeSnapshotLocation gcp in velero with timeout of 5m0s
[kube] 2020/09/20 08:45:22 Add/Modify event for gcp: ADDED
[tiller] 2020/09/20 08:45:22 deleting post-upgrade hook schedules.velero.io for release velero due to "before-hook-creation" policy
delete ---> [kube] 2020/09/20 08:45:23 Starting delete for "schedules.velero.io" CustomResourceDefinition
[kube] 2020/09/20 08:45:23 Waiting for 60 seconds for delete to be completed
[kube] 2020/09/20 08:45:25 building resources from manifest
[kube] 2020/09/20 08:45:25 creating 1 resource(s)
[kube] 2020/09/20 08:45:25 Watching for changes to CustomResourceDefinition schedules.velero.io in  with timeout of 5m0s
[kube] 2020/09/20 08:45:25 Add/Modify event for schedules.velero.io: ADDED
[tiller] 2020/09/20 08:45:25 hooks complete for post-upgrade velero
[storage] 2020/09/20 08:45:25 updating release "velero.v254"

Environment:

  • helm version: 2.16.10
  • helm chart version and app version:
    chart: 2.12.13
    velero app: 1.4.2
  • Kubernetes version:
Server Version: version.Info{Major:"1", Minor:"15+", GitVersion:"v1.15.12-gke.20", GitCommit:"0ac5f81eecab42bff5ef74f18b99d8896ba7b89b", GitTreeState:"clean", BuildDate:"2020-09-09T00:48:20Z", GoVersion:"go1.12.17b4", Compiler:"gc", Platform:"linux/amd64"}
  • Cloud provider or hardware configuration: GKE
  • OS (e.g. from /etc/os-release):
BUILD_ID=12371.1079.0
NAME="Container-Optimized OS"
KERNEL_COMMIT_ID=52bdab9330bdd9e50dc967f8aa850829921ca217
GOOGLE_CRASH_ID=Lakitu
VERSION_ID=77
BUG_REPORT_URL="https://cloud.google.com/container-optimized-os/docs/resources/support-policy#contact_us"
PRETTY_NAME="Container-Optimized OS from Google"
VERSION=77
GOOGLE_METRICS_PRODUCT_ID=26
HOME_URL="https://cloud.google.com/container-optimized-os/docs"
ID=cos
@jenting
Copy link
Collaborator

jenting commented Sep 21, 2020

@Vladikamira I think it's related to #153 at my first glance.

@Vladikamira
Copy link
Author

yes, you right! Thanks @jenting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants