feat: run official executor behind SPIFFE mTLS
This commit is contained in:
@@ -107,7 +107,7 @@ func (b Backend) Create(ctx context.Context, assignment taskassignment.Assignmen
|
||||
Annotations: clone(launch.Metadata.Annotations),
|
||||
Image: b.Config.Image,
|
||||
ServiceAccount: b.Config.ServiceAccount,
|
||||
Args: append(append([]string{}, b.Config.ExecutorArgs...), assignment.ID),
|
||||
Args: append([]string{}, b.Config.ExecutorArgs...),
|
||||
Environment: clone(launch.Environment),
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
@@ -44,7 +44,7 @@ func (a *fakeAPI) DeleteIdentityEntry(_ context.Context, name string) error {
|
||||
func backend(api API) Backend {
|
||||
return Backend{API: api, Config: Config{
|
||||
Namespace: "gitea-actions", Image: "zot/ci-executor:main",
|
||||
ServiceAccount: "gitea-task-executor", ExecutorArgs: []string{"execute"},
|
||||
ServiceAccount: "gitea-task-executor", ExecutorArgs: []string{"executor"},
|
||||
TrustDomain: "ddupan.top", SPIRECluster: "homelab",
|
||||
SPIREClass: "spire-mgmt-spire", ExecutorUID: 2000,
|
||||
}}
|
||||
@@ -90,7 +90,7 @@ func TestCreateUsesDeterministicNameAndRecoveryMetadata(t *testing.T) {
|
||||
if api.created.Environment["CI_RUNNER_CAPABILITY"] != "capability" {
|
||||
t.Fatalf("environment = %#v", api.created.Environment)
|
||||
}
|
||||
if len(api.created.Args) != 2 || api.created.Args[1] != "gitea-task-42" || executor.IdentityTarget != "pod-uid" {
|
||||
if len(api.created.Args) != 1 || api.created.Args[0] != "executor" || executor.IdentityTarget != "pod-uid" {
|
||||
t.Fatalf("args=%v executor=%#v", api.created.Args, executor)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user