diff --git a/api/applications/validate_handler.go b/api/applications/validate_handler.go index be15fc65..cd488ee5 100644 --- a/api/applications/validate_handler.go +++ b/api/applications/validate_handler.go @@ -95,14 +95,7 @@ func createCloneJob(ctx context.Context, client kubernetes.Interface, rr *v1.Rad backOffLimit := int32(0) deadlineSeconds := operatornumbers.Int64Ptr(5 * 60) defaultMode := int32(256) - privileged, allowPrivilegeEscalation := false, false - securityContext := corev1.SecurityContext{ - Privileged: &privileged, - AllowPrivilegeEscalation: &allowPrivilegeEscalation, - RunAsUser: operatornumbers.Int64Ptr(1000), - RunAsGroup: operatornumbers.Int64Ptr(1000), - } - initContainers := git.CloneInitContainers(rr.Spec.CloneURL, applicationconfig.GetConfigBranch(rr), securityContext) + initContainers := git.CloneInitContainers(rr.Spec.CloneURL, applicationconfig.GetConfigBranch(rr)) job := batchv1.Job{ ObjectMeta: metav1.ObjectMeta{ diff --git a/api/deployments/component_controller_test.go b/api/deployments/component_controller_test.go index 356d59e5..6a288e6a 100644 --- a/api/deployments/component_controller_test.go +++ b/api/deployments/component_controller_test.go @@ -839,8 +839,8 @@ func TestGetComponents_WithIdentity(t *testing.T) { WithName("job1"). WithIdentity(&v1.Identity{Azure: &v1.AzureIdentity{ClientId: "job-clientid"}}). WithSecretRefs(v1.RadixSecretRefs{AzureKeyVaults: []v1.RadixAzureKeyVault{{Name: "job-key-vault1", Items: []v1.RadixAzureKeyVaultItem{{Name: "secret1"}}}}}). - WithSecretRefs(v1.RadixSecretRefs{AzureKeyVaults: []v1.RadixAzureKeyVault{{Name: "job-key-vault2", Items: []v1.RadixAzureKeyVaultItem{{Name: "secret2"}}, UseAzureIdentity: operatorUtils.BoolPtr(false)}}}). - WithSecretRefs(v1.RadixSecretRefs{AzureKeyVaults: []v1.RadixAzureKeyVault{{Name: "job-key-vault3", Items: []v1.RadixAzureKeyVaultItem{{Name: "secret3"}}, UseAzureIdentity: operatorUtils.BoolPtr(true)}}}), + WithSecretRefs(v1.RadixSecretRefs{AzureKeyVaults: []v1.RadixAzureKeyVault{{Name: "job-key-vault2", Items: []v1.RadixAzureKeyVaultItem{{Name: "secret2"}}, UseAzureIdentity: pointers.Ptr(false)}}}). + WithSecretRefs(v1.RadixSecretRefs{AzureKeyVaults: []v1.RadixAzureKeyVault{{Name: "job-key-vault3", Items: []v1.RadixAzureKeyVaultItem{{Name: "secret3"}}, UseAzureIdentity: pointers.Ptr(true)}}}), operatorUtils.NewDeployJobComponentBuilder().WithName("job2"), ). WithComponents( @@ -848,8 +848,8 @@ func TestGetComponents_WithIdentity(t *testing.T) { WithName("comp1"). WithIdentity(&v1.Identity{Azure: &v1.AzureIdentity{ClientId: "comp-clientid"}}). WithSecretRefs(v1.RadixSecretRefs{AzureKeyVaults: []v1.RadixAzureKeyVault{{Name: "comp-key-vault1", Items: []v1.RadixAzureKeyVaultItem{{Name: "secret1"}}}}}). - WithSecretRefs(v1.RadixSecretRefs{AzureKeyVaults: []v1.RadixAzureKeyVault{{Name: "comp-key-vault2", Items: []v1.RadixAzureKeyVaultItem{{Name: "secret2"}}, UseAzureIdentity: operatorUtils.BoolPtr(false)}}}). - WithSecretRefs(v1.RadixSecretRefs{AzureKeyVaults: []v1.RadixAzureKeyVault{{Name: "comp-key-vault3", Items: []v1.RadixAzureKeyVaultItem{{Name: "secret3"}}, UseAzureIdentity: operatorUtils.BoolPtr(true)}}}), + WithSecretRefs(v1.RadixSecretRefs{AzureKeyVaults: []v1.RadixAzureKeyVault{{Name: "comp-key-vault2", Items: []v1.RadixAzureKeyVaultItem{{Name: "secret2"}}, UseAzureIdentity: pointers.Ptr(false)}}}). + WithSecretRefs(v1.RadixSecretRefs{AzureKeyVaults: []v1.RadixAzureKeyVault{{Name: "comp-key-vault3", Items: []v1.RadixAzureKeyVaultItem{{Name: "secret3"}}, UseAzureIdentity: pointers.Ptr(true)}}}), operatorUtils.NewDeployComponentBuilder().WithName("comp2"), )) require.NoError(t, err) diff --git a/go.mod b/go.mod index 934f098e..48bda3ba 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/cert-manager/cert-manager v1.14.5 github.com/equinor/radix-common v1.9.2 github.com/equinor/radix-job-scheduler v1.9.2 - github.com/equinor/radix-operator v1.55.2 + github.com/equinor/radix-operator v1.56.1 github.com/evanphx/json-patch/v5 v5.9.0 github.com/felixge/httpsnoop v1.0.4 github.com/golang-jwt/jwt/v5 v5.2.1 diff --git a/go.sum b/go.sum index 86ce94f6..b5e70c9f 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/equinor/radix-common v1.9.2 h1:pOYN/mSAoPe6KO/Nvudfd5DUETbLv4nLTLzFPr github.com/equinor/radix-common v1.9.2/go.mod h1:ekn86U68NT4ccSdt3GT+ukpiclzfuhr96a7zBJKv/jw= github.com/equinor/radix-job-scheduler v1.9.2 h1:p2wZGNmarDZhvaQhGk0F9ioZA8baRUGlYwxuHNwNURQ= github.com/equinor/radix-job-scheduler v1.9.2/go.mod h1:1z3jBg/X1UVoKrfmnaN2xIWfGAPYJ6lB1oSNEevrhVQ= -github.com/equinor/radix-operator v1.55.2 h1:VENKV3iK63ymHF5lO0UodePvULIywnHgh8sQ5/VEBmo= -github.com/equinor/radix-operator v1.55.2/go.mod h1:0KwN3ZEACZWhHrJZIuSxVYVeHhFgUBaRoeDyGiAljRs= +github.com/equinor/radix-operator v1.56.1 h1:Rf7AUmJh1qw0XQD7pYdAypzQjabcZ6eEQ6A8+KdtSUE= +github.com/equinor/radix-operator v1.56.1/go.mod h1:0KwN3ZEACZWhHrJZIuSxVYVeHhFgUBaRoeDyGiAljRs= github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg=