-
Notifications
You must be signed in to change notification settings - Fork 37
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
Fixing HPA not converting apiGroup for deploymentconfigs #126
Fixing HPA not converting apiGroup for deploymentconfigs #126
Conversation
@ammachado Thank you for the fix. |
velero-plugins/common/restore.go
Outdated
@@ -41,7 +41,8 @@ func (p *RestorePlugin) AppliesTo() (velero.ResourceSelector, error) { | |||
"replicasets.extensions", | |||
"replicationcontroller", | |||
"buildconfigs", | |||
"buildconfigs.build.openshift.io"}, | |||
"buildconfigs.build.openshift.io", | |||
"horizontalpodautoscalers"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed? I don't see anything in the below horizontalpodautoscaler restore plugin that relies on the actions of the common restore plugin here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if it is needed, but on this list is all of the plugins that are present in the application.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ammachado This can be removed from the common plugin since we have a separate plugin registered for hpa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ammachado This list the resources that specifically need the actions taken in this plugin. Originally we applied these actions to all resources, but that resulted in poor performance when there were large numbers of resources being backed up and restored that didn't benefit from the actions of this plugin. Unless there's something this plugin does that your plugin relies on (and I don't think that's the case), then this is unnecessary.
Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com>
Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com>
velero-plugins/common/restore.go
Outdated
@@ -41,7 +41,8 @@ func (p *RestorePlugin) AppliesTo() (velero.ResourceSelector, error) { | |||
"replicasets.extensions", | |||
"replicationcontroller", | |||
"buildconfigs", | |||
"buildconfigs.build.openshift.io"}, | |||
"buildconfigs.build.openshift.io", | |||
"horizontalpodautoscalers"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ammachado This can be removed from the common plugin since we have a separate plugin registered for hpa
* Fixing HPA not converting apiGroup for deploymentconfigs * Fixing typos * Update velero-plugins/horizontalpodautoscaler/restore.go Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com> * Update velero-plugins/horizontalpodautoscaler/restore.go Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com> * Throwing error when it's not possible to parse APIVersion of hpa.spec.scaleTargetRef * Excluding HPA from common restore plugin Co-authored-by: Adriano Marcondes Machado <admachad@redhat.com> Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com>
* Fixing HPA not converting apiGroup for deploymentconfigs * Fixing typos * Update velero-plugins/horizontalpodautoscaler/restore.go Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com> * Update velero-plugins/horizontalpodautoscaler/restore.go Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com> * Throwing error when it's not possible to parse APIVersion of hpa.spec.scaleTargetRef * Excluding HPA from common restore plugin Co-authored-by: Adriano Marcondes Machado <admachad@redhat.com> Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com>
* Fixing HPA not converting apiGroup for deploymentconfigs * Fixing typos * Update velero-plugins/horizontalpodautoscaler/restore.go Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com> * Update velero-plugins/horizontalpodautoscaler/restore.go Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com> * Throwing error when it's not possible to parse APIVersion of hpa.spec.scaleTargetRef * Excluding HPA from common restore plugin Co-authored-by: Adriano Marcondes Machado <admachad@redhat.com> Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com> Co-authored-by: Adriano Machado <60320+ammachado@users.noreply.github.com> Co-authored-by: Adriano Marcondes Machado <admachad@redhat.com> Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com>
* Fixing HPA not converting apiGroup for deploymentconfigs * Fixing typos * Update velero-plugins/horizontalpodautoscaler/restore.go Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com> * Update velero-plugins/horizontalpodautoscaler/restore.go Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com> * Throwing error when it's not possible to parse APIVersion of hpa.spec.scaleTargetRef * Excluding HPA from common restore plugin Co-authored-by: Adriano Marcondes Machado <admachad@redhat.com> Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com> Co-authored-by: Adriano Machado <60320+ammachado@users.noreply.github.com> Co-authored-by: Adriano Marcondes Machado <admachad@redhat.com> Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com>
* Fixing HPA not converting apiGroup for deploymentconfigs * Fixing typos * Update velero-plugins/horizontalpodautoscaler/restore.go Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com> * Update velero-plugins/horizontalpodautoscaler/restore.go Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com> * Throwing error when it's not possible to parse APIVersion of hpa.spec.scaleTargetRef * Excluding HPA from common restore plugin Co-authored-by: Adriano Marcondes Machado <admachad@redhat.com> Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com>
* Fixing HPA not converting apiGroup for deploymentconfigs (#126) * Fixing HPA not converting apiGroup for deploymentconfigs * Fixing typos * Update velero-plugins/horizontalpodautoscaler/restore.go Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com> * Update velero-plugins/horizontalpodautoscaler/restore.go Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com> * Throwing error when it's not possible to parse APIVersion of hpa.spec.scaleTargetRef * Excluding HPA from common restore plugin Co-authored-by: Adriano Marcondes Machado <admachad@redhat.com> Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com> * run `go mod tidy` Co-authored-by: Adriano Machado <60320+ammachado@users.noreply.github.com> Co-authored-by: Adriano Marcondes Machado <admachad@redhat.com> Co-authored-by: Pranav Gaikwad <pgaikwad@redhat.com>
ApiGroup for HPA ScaleTargetRef when it is a deploymentconfig is not changed to the new version.