Skip to content
Merged
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
9 changes: 4 additions & 5 deletions actions/clusters/clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (

// CreateRancherBaselinePSACT creates custom PSACT called rancher-baseline which sets each PSS to baseline.
func CreateRancherBaselinePSACT(client *rancher.Client, psact string) error {
_, err := client.Steve.SteveType(clusters.PodSecurityAdmissionSteveResoureType).ByID(psact)
_, err := client.Steve.SteveType(clusters.PodSecurityAdmissionSteveResourceType).ByID(psact)
if err == nil {
return err
}
Expand Down Expand Up @@ -82,7 +82,7 @@ func CreateRancherBaselinePSACT(client *rancher.Client, psact string) error {
},
}

_, err = client.Steve.SteveType(clusters.PodSecurityAdmissionSteveResoureType).Create(template)
_, err = client.Steve.SteveType(clusters.PodSecurityAdmissionSteveResourceType).Create(template)
if err != nil {
return err
}
Expand Down Expand Up @@ -933,18 +933,17 @@ func GetClusterType(client *rancher.Client, clusterName string) (string, error)
}

return clusterType, nil

}

// DeletePSACT deletes a Pod Security Admission Configuration Template (PSACT) by its ID.
func DeletePSACT(client *rancher.Client, psactID string) error {
psact, err := client.Steve.SteveType(clusters.PodSecurityAdmissionSteveResoureType).ByID(psactID)
psact, err := client.Steve.SteveType(clusters.PodSecurityAdmissionSteveResourceType).ByID(psactID)
if err != nil {
return err
}

logrus.Infof("Deleting PSACT %s...", psact.Name)
err = client.Steve.SteveType(clusters.PodSecurityAdmissionSteveResoureType).Delete(psact)
err = client.Steve.SteveType(clusters.PodSecurityAdmissionSteveResourceType).Delete(psact)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion actions/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ replace (
require (
github.com/qase-tms/qase-go/qase-api-client v1.2.0
github.com/rancher/rancher/pkg/apis v0.0.0
github.com/rancher/shepherd v0.0.0-20251216155429-44067c0178ae
github.com/rancher/shepherd v0.0.0-20260122211220-e4fc12acd2be
github.com/rancher/tfp-automation v0.0.0-20251219210947-f4a1a9882c29
)

Expand Down
4 changes: 2 additions & 2 deletions actions/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ github.com/rancher/rancher/pkg/apis v0.0.0-20260105201356-c4811cb9f2af h1:ZXIKdK
github.com/rancher/rancher/pkg/apis v0.0.0-20260105201356-c4811cb9f2af/go.mod h1:NwWL+lOkxPRibQ6j+9uFSo6t1CJ18z1oY4OYJMOQ/R0=
github.com/rancher/rke v1.8.0 h1:87jeoOccnnNCq27YgWgMh4o0GVrrVKbw+zfo+cHMZlo=
github.com/rancher/rke v1.8.0/go.mod h1:x9N1abruzDFMwTpqq2cnaDYpKCptlNoW8VraNWB6Pc4=
github.com/rancher/shepherd v0.0.0-20251216155429-44067c0178ae h1:9Krx+fO7yiPGHEiAdknVRHwiwlPrg/RmtLfqOUFABxk=
github.com/rancher/shepherd v0.0.0-20251216155429-44067c0178ae/go.mod h1:SJtW8Jqv0rphZzsGnvB965YdyR2FqFtB+TbbzVLt8F4=
github.com/rancher/shepherd v0.0.0-20260122211220-e4fc12acd2be h1:x7+nxYLCqygc5T/efzfdbXORuV89VBJvrK9Wbe2vNJE=
github.com/rancher/shepherd v0.0.0-20260122211220-e4fc12acd2be/go.mod h1:SJtW8Jqv0rphZzsGnvB965YdyR2FqFtB+TbbzVLt8F4=
github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20250930163923-f2c9e60b1078 h1:1MJSgYkgXhr/Zc5idJkKa10SiBQd0HVtbxVOBoghlzY=
github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20250930163923-f2c9e60b1078/go.mod h1:CV2Soy/Skw8/SA9dDJVgpeHxoEdtjYkNpNy6xvvC5kA=
github.com/rancher/tfp-automation v0.0.0-20251219210947-f4a1a9882c29 h1:K7gKqQy8w4oPlm85x/t3WjMhHPi0nQTX49RMzJnkGK0=
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ require (
github.com/qase-tms/qase-go/pkg/qase-go v1.0.7
github.com/qase-tms/qase-go/qase-api-client v1.2.1
github.com/rancher/rancher v0.0.0-20251223145833-24cecce3325e
github.com/rancher/shepherd v0.0.0-20251216155429-44067c0178ae
github.com/rancher/shepherd v0.0.0-20260122211220-e4fc12acd2be
github.com/rancher/tests/actions v0.0.0-20260105193042-a805683addc3
github.com/rancher/tests/interoperability v0.0.0-00010101000000-000000000000
github.com/rancher/tfp-automation v0.0.0-20251219210947-f4a1a9882c29
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2188,8 +2188,8 @@ github.com/rancher/rancher/pkg/apis v0.0.0-20260105201356-c4811cb9f2af h1:ZXIKdK
github.com/rancher/rancher/pkg/apis v0.0.0-20260105201356-c4811cb9f2af/go.mod h1:NwWL+lOkxPRibQ6j+9uFSo6t1CJ18z1oY4OYJMOQ/R0=
github.com/rancher/rke v1.8.0 h1:87jeoOccnnNCq27YgWgMh4o0GVrrVKbw+zfo+cHMZlo=
github.com/rancher/rke v1.8.0/go.mod h1:x9N1abruzDFMwTpqq2cnaDYpKCptlNoW8VraNWB6Pc4=
github.com/rancher/shepherd v0.0.0-20251216155429-44067c0178ae h1:9Krx+fO7yiPGHEiAdknVRHwiwlPrg/RmtLfqOUFABxk=
github.com/rancher/shepherd v0.0.0-20251216155429-44067c0178ae/go.mod h1:SJtW8Jqv0rphZzsGnvB965YdyR2FqFtB+TbbzVLt8F4=
github.com/rancher/shepherd v0.0.0-20260122211220-e4fc12acd2be h1:x7+nxYLCqygc5T/efzfdbXORuV89VBJvrK9Wbe2vNJE=
github.com/rancher/shepherd v0.0.0-20260122211220-e4fc12acd2be/go.mod h1:SJtW8Jqv0rphZzsGnvB965YdyR2FqFtB+TbbzVLt8F4=
github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20250930163923-f2c9e60b1078 h1:1MJSgYkgXhr/Zc5idJkKa10SiBQd0HVtbxVOBoghlzY=
github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20250930163923-f2c9e60b1078/go.mod h1:CV2Soy/Skw8/SA9dDJVgpeHxoEdtjYkNpNy6xvvC5kA=
github.com/rancher/tfp-automation v0.0.0-20251219210947-f4a1a9882c29 h1:K7gKqQy8w4oPlm85x/t3WjMhHPi0nQTX49RMzJnkGK0=
Expand Down
2 changes: 1 addition & 1 deletion interoperability/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ require (
github.com/rancher/fleet/pkg/apis v0.15.0-alpha.4
github.com/rancher/norman v0.8.1
github.com/rancher/rancher/pkg/apis v0.0.0
github.com/rancher/shepherd v0.0.0-20251216155429-44067c0178ae
github.com/rancher/shepherd v0.0.0-20260122211220-e4fc12acd2be
github.com/rancher/tests/actions v0.0.0-20260105193042-a805683addc3
github.com/rancher/tfp-automation v0.0.0-20251219210947-f4a1a9882c29
github.com/sirupsen/logrus v1.9.3
Expand Down
4 changes: 2 additions & 2 deletions interoperability/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2081,8 +2081,8 @@ github.com/rancher/rancher/pkg/apis v0.0.0-20260105201356-c4811cb9f2af h1:ZXIKdK
github.com/rancher/rancher/pkg/apis v0.0.0-20260105201356-c4811cb9f2af/go.mod h1:NwWL+lOkxPRibQ6j+9uFSo6t1CJ18z1oY4OYJMOQ/R0=
github.com/rancher/rke v1.8.0 h1:87jeoOccnnNCq27YgWgMh4o0GVrrVKbw+zfo+cHMZlo=
github.com/rancher/rke v1.8.0/go.mod h1:x9N1abruzDFMwTpqq2cnaDYpKCptlNoW8VraNWB6Pc4=
github.com/rancher/shepherd v0.0.0-20251216155429-44067c0178ae h1:9Krx+fO7yiPGHEiAdknVRHwiwlPrg/RmtLfqOUFABxk=
github.com/rancher/shepherd v0.0.0-20251216155429-44067c0178ae/go.mod h1:SJtW8Jqv0rphZzsGnvB965YdyR2FqFtB+TbbzVLt8F4=
github.com/rancher/shepherd v0.0.0-20260122211220-e4fc12acd2be h1:x7+nxYLCqygc5T/efzfdbXORuV89VBJvrK9Wbe2vNJE=
github.com/rancher/shepherd v0.0.0-20260122211220-e4fc12acd2be/go.mod h1:SJtW8Jqv0rphZzsGnvB965YdyR2FqFtB+TbbzVLt8F4=
github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20250930163923-f2c9e60b1078 h1:1MJSgYkgXhr/Zc5idJkKa10SiBQd0HVtbxVOBoghlzY=
github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20250930163923-f2c9e60b1078/go.mod h1:CV2Soy/Skw8/SA9dDJVgpeHxoEdtjYkNpNy6xvvC5kA=
github.com/rancher/tfp-automation v0.0.0-20251219210947-f4a1a9882c29 h1:K7gKqQy8w4oPlm85x/t3WjMhHPi0nQTX49RMzJnkGK0=
Expand Down
2 changes: 1 addition & 1 deletion validation/provisioning/rke2/psact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestPSACT(t *testing.T) {
}
}

customPSACT, err := tt.client.Steve.SteveType(extClusters.PodSecurityAdmissionSteveResoureType).ByID("rancher-baseline")
customPSACT, err := tt.client.Steve.SteveType(extClusters.PodSecurityAdmissionSteveResourceType).ByID("rancher-baseline")
if err == nil && customPSACT != nil {
_ = clusters.DeletePSACT(tt.client, customPSACT.ID)
}
Expand Down