Remove PatchOperatorManageConnect as manifest has MANAGE_CONNECT: true set already

This commit is contained in:
Volodymyr Zotov
2025-08-20 15:02:21 -05:00
parent 299689fe13
commit c144bd3d01
2 changed files with 0 additions and 24 deletions

View File

@@ -40,10 +40,6 @@ var _ = Describe("Onepassword Operator e2e", Ordered, func() {
})
Context("Use the operator with Connect", func() {
BeforeAll(func() {
kube.PatchOperatorManageConnect()
})
runCommonTestCases()
})

View File

@@ -73,26 +73,6 @@ var PatchOperatorToUseServiceAccount = WithOperatorRestart(func() {
Expect(err).NotTo(HaveOccurred())
})
// PatchOperatorManageConnect sets env variable `MANAGE_CONNECT: true` and restarts the operator.
var PatchOperatorManageConnect = WithOperatorRestart(func() {
By("patching the operator deployment with to manage Connect")
_, err := system.Run(
"kubectl", "patch", "deployment", "onepassword-connect-operator",
"--type=json",
`-p=[{"op":"replace","path":"/spec/template/spec/containers/0/env","value":[
{"name":"OPERATOR_NAME","value":"onepassword-connect-operator"},
{"name":"POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},
{"name":"WATCH_NAMESPACE","value":"default"},
{"name":"POLLING_INTERVAL","value":"10"},
{"name":"AUTO_RESTART","value":"false"},
{"name":"OP_CONNECT_HOST","value":"http://onepassword-connect:8080"},
{"name":"OP_CONNECT_TOKEN","valueFrom":{"secretKeyRef":{"name":"onepassword-token","key":"token"}}},
{"name":"MANAGE_CONNECT","value":"true"},
]}]`,
)
Expect(err).NotTo(HaveOccurred())
})
func WithOperatorRestart(operation func()) func() {
return func() {
operation()