Skip to content

Commit

Permalink
var name fix
Browse files Browse the repository at this point in the history
  • Loading branch information
trichardsonjr78 authored and isaaguilar committed May 20, 2024
1 parent fc7868a commit 45ec9bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/api/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func (h APIHandler) rerunWorkflow(c *gin.Context) {
c.JSON(http.StatusNoContent, nil)
}

func rerun(parentClientset kubernetes.Interface, clusterName, namespace, name, labelValue string, ctx context.Context) error {
func rerun(parentClientset kubernetes.Interface, clusterName, namespace, name, rerunLabelValue string, ctx context.Context) error {
config, err := getVclusterConfig(parentClientset, "internal", clusterName)
if err != nil {
return err
Expand All @@ -373,7 +373,7 @@ func rerun(parentClientset kubernetes.Interface, clusterName, namespace, name, l
resource.Labels = map[string]string{}
}

resource.Labels["kubernetes.io/change-cause"] = fmt.Sprintf("%s-%s", labelValue, time.Now().Format("20060102150405"))
resource.Labels["kubernetes.io/change-cause"] = fmt.Sprintf("%s-%s", rerunLabelValue, time.Now().Format("20060102150405"))
_, err = tfoclientset.TfV1beta1().Terraforms(namespace).Update(ctx, resource, metav1.UpdateOptions{})
if err != nil {
return err
Expand Down

0 comments on commit 45ec9bc

Please sign in to comment.