Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion actions/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ replace (
require (
github.com/qase-tms/qase-go/qase-api-client v1.2.1
github.com/rancher/rancher/pkg/apis v0.0.0
github.com/rancher/shepherd v0.0.0-20260610155525-6d926c75d49a
github.com/rancher/shepherd v0.0.0-20260616224945-d2cbef93a360
github.com/rancher/tfp-automation v0.0.0-20260701185620-64a4ef67d69a
)

Expand Down
4 changes: 2 additions & 2 deletions actions/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ github.com/rancher/rancher v0.0.0-20260527150105-ae26ccbc3fed h1:G66Ag8VZXlA6Kiu
github.com/rancher/rancher v0.0.0-20260527150105-ae26ccbc3fed/go.mod h1:wn9b239FRsjEulPTy5U1qTgT9vusgIc8Sxq0UJRdvhA=
github.com/rancher/rancher/pkg/apis v0.0.0-20260527150105-ae26ccbc3fed h1:HoeCYnxcvP+p020CvCyNaJSwzH5I/nsQ6uRcbDbB17E=
github.com/rancher/rancher/pkg/apis v0.0.0-20260527150105-ae26ccbc3fed/go.mod h1:TtM3SQiHWml7okiEMRndWKt1knQ/DeQC60Bzt6OBmrg=
github.com/rancher/shepherd v0.0.0-20260610155525-6d926c75d49a h1://lhZJ7E6znLttBO9b2+V/Xl51iw3bDspjiH8W5MxMk=
github.com/rancher/shepherd v0.0.0-20260610155525-6d926c75d49a/go.mod h1:OxexRIlEGlPaWS9YeFVfYD5ANH/8Yqb+hMyPuUiCp2o=
github.com/rancher/shepherd v0.0.0-20260616224945-d2cbef93a360 h1:wYxVY/UlFhBX7cC6p9t8cTY8EmJ4nYAKl1iNl/JmeKw=
github.com/rancher/shepherd v0.0.0-20260616224945-d2cbef93a360/go.mod h1:OxexRIlEGlPaWS9YeFVfYD5ANH/8Yqb+hMyPuUiCp2o=
github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20260519183600-f1362a3fe1a8 h1:7qMiCWOKZdhscekXzeIUpaGethXtj19ob6V+U91tAxI=
github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20260519183600-f1362a3fe1a8/go.mod h1:xDDFkXVPcCf+S6wQoIDwgIijQHcIaVdN0eQRG2GcFd4=
github.com/rancher/tfp-automation v0.0.0-20260701185620-64a4ef67d69a h1:T1dleEon60KO4H6JN3QSRp7q+QHFKlt3bnrko4pmmcA=
Expand Down
18 changes: 18 additions & 0 deletions actions/kubeapi/projects/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,24 @@ func NewProjectTemplate(clusterID string) *v3.Project {
return project
}

// WaitForProjectBackingNamespace polls until the project controller sets Status.BackingNamespace,
// indicating the backing K8s namespace has been provisioned.
func WaitForProjectBackingNamespace(client *rancher.Client, clusterID, projectName string) (*v3.Project, error) {
var result *v3.Project
err := kwait.PollUntilContextTimeout(context.Background(), defaults.FiveSecondTimeout, defaults.OneMinuteTimeout, false, func(ctx context.Context) (bool, error) {
p, pollErr := extprojectapi.GetProjectByName(client, clusterID, projectName)
if pollErr != nil {
return false, pollErr
}
if p.Status.BackingNamespace != "" {
result = p
return true, nil
}
return false, nil
})
return result, err
}

// WaitForProjectFinalizerToUpdate is a helper to wait for project finalizer to update to match the expected finalizer count
func WaitForProjectFinalizerToUpdate(client *rancher.Client, projectName, projectNamespace string, finalizerCount int) error {
err := kwait.PollUntilContextTimeout(context.Background(), defaults.FiveSecondTimeout, defaults.TenSecondTimeout, false, func(ctx context.Context) (bool, error) {
Expand Down
Loading
Loading