Commit Graph

392 Commits

Author SHA1 Message Date
Volodymyr Zotov
24edff22d4 Do not run e2e tests when moving from draft to ready and vise versa 2025-08-26 16:25:23 -05:00
Volodymyr Zotov
8c893270f4 Update CONTRIBUTING.md with instructions on how to run e2e tests locally 2025-08-26 15:51:59 -05:00
Volodymyr Zotov
d5f1044571 Do not install kubectl cli in pipeline as we use golang library to interact with cluster 2025-08-26 15:12:16 -05:00
Volodymyr Zotov
b40f27b052 Refactor kube package to use controller-runtime golang client to interact with cluster 2025-08-26 15:11:04 -05:00
Volodymyr Zotov
cd03a651ad Refactor kube package to use controller-runtime client instead of using kubectl CLI.
This allows to runt the tests faster
2025-08-25 22:52:17 -05:00
Volodymyr Zotov
9aac824066 Add test case for ignore-secret tag 2025-08-22 11:22:39 -05:00
Volodymyr Zotov
05ad484bd6 Fix lint error 2025-08-22 10:25:45 -05:00
Volodymyr Zotov
71b29d5fe6 Install op-cli into github action job 2025-08-22 10:25:04 -05:00
Volodymyr Zotov
c082f9562e Add tests case to check that kubernetes secret is updated after item is updated in 1Password 2025-08-22 10:15:33 -05:00
Volodymyr Zotov
57478247cf Update secret to point to operator-acceptance-tests vault 2025-08-22 10:13:58 -05:00
Volodymyr Zotov
4836140f66 Add CheckSecretPasswordWasUpdated function to the kube package 2025-08-22 10:13:58 -05:00
Volodymyr Zotov
2b36f16940 Introduce op package to handle op-cli commands 2025-08-22 09:38:21 -05:00
Volodymyr Zotov
bb97134e10 Add comments on each test helper function 2025-08-22 08:30:35 -05:00
Volodymyr Zotov
904d269e7b Roll back changes to customization yaml 2025-08-21 17:01:10 -05:00
Volodymyr Zotov
cf9b267eaf Remove commented code 2025-08-21 16:02:04 -05:00
Volodymyr Zotov
4d64beab86 Exclude e2e tests from make test command 2025-08-21 15:52:38 -05:00
Volodymyr Zotov
ca051a08cf Move testhelper package to pkg so it can be installed as dependency in secrets injector repo 2025-08-21 15:52:06 -05:00
Volodymyr Zotov
22a7c8f586 Create 1password-credentials.json from env var 2025-08-21 14:57:24 -05:00
Volodymyr Zotov
2003d13788 Fix lint issues and CheckSecretExists function 2025-08-21 10:38:19 -05:00
Volodymyr Zotov
7187f41ef1 Checking that all secrets are created before running tests 2025-08-21 10:17:19 -05:00
Volodymyr Zotov
d0b11c70f0 Roll back Connect test 2025-08-21 10:11:06 -05:00
Volodymyr Zotov
9825cb57c9 Test with service account 2025-08-21 10:02:13 -05:00
Volodymyr Zotov
6bb6088353 Use GetProjectRoot to create secret 2025-08-21 09:56:37 -05:00
Volodymyr Zotov
5a56fd3330 Wait for Connect pod is running 2025-08-20 15:51:50 -05:00
Volodymyr Zotov
dcd7eefac0 Increase timeout to 1 minute 2025-08-20 15:39:44 -05:00
Volodymyr Zotov
29b7ed7899 Run correct make command that starts e2e tests 2025-08-20 15:33:08 -05:00
Volodymyr Zotov
331e8d7bfb Add e2e tests workflow 2025-08-20 15:29:58 -05:00
Volodymyr Zotov
c144bd3d01 Remove PatchOperatorManageConnect as manifest has MANAGE_CONNECT: true set already 2025-08-20 15:02:21 -05:00
Volodymyr Zotov
299689fe13 Extract setting context namespace to standalone function SetContextNamespace 2025-08-20 14:57:47 -05:00
Volodymyr Zotov
882d8e951d Never pull the image, but use local when deploying the operator. Deploy along with Connect 2025-08-20 14:56:32 -05:00
Volodymyr Zotov
7885ba649b Set to namespace to default 2025-08-20 14:42:08 -05:00
Volodymyr Zotov
600adf2670 Move cmd package to testhelper and rename to be system 2025-08-20 14:27:12 -05:00
Volodymyr Zotov
88b2dfbf67 Use GetProjectRoot in Run 2025-08-20 14:15:26 -05:00
Volodymyr Zotov
e167db2357 Remove secret from previous step 2025-08-20 10:30:28 -05:00
Volodymyr Zotov
91a9bb6d63 Create op-credentials secret to use operator with Connect 2025-08-20 10:24:16 -05:00
Volodymyr Zotov
116c8c92a7 Update item path to point to test secret 2025-08-20 10:23:44 -05:00
Volodymyr Zotov
4307e9d713 Add 1password-credentials.json and op-session to git ignore
Add 1password-credentials.json to git ignore
2025-08-20 10:23:44 -05:00
Volodymyr Zotov
1759055edd Update sqlite-permissions to run as root, so it can start Connect in e2e tests 2025-08-20 09:10:32 -05:00
Volodymyr Zotov
c1e9934088 Fix typo 2025-08-19 14:51:32 -05:00
Volodymyr Zotov
19b629f2ee Move BuildOperatorImage function to testhelper.operator package 2025-08-19 14:50:39 -05:00
Volodymyr Zotov
174f952691 Split testing flow for Connect and Service Accounts 2025-08-19 12:05:29 -05:00
Volodymyr Zotov
f8704223c8 Move all helpers to testhelper package 2025-08-19 12:04:56 -05:00
Volodymyr Zotov
5630d788a2 Create kube package that abstracts interactions with kubernetes cluster 2025-08-19 11:52:28 -05:00
Volodymyr Zotov
d504e5ef35 Add e2e tests using Service Accounts 2025-08-19 10:51:43 -05:00
Volodymyr Zotov
7d2596a4aa Create e2e tests package 2025-08-15 13:28:39 -05:00
Volodymyr Zotov
f6b267726d Merge pull request #216 from 1Password/vzt/speedup-local-builds
Speedup local builds
2025-07-15 17:12:40 -05:00
Volodymyr Zotov
bf8c1291b2 Update CONTRIBUTING.md after resolving conflicts 2025-07-15 17:09:21 -05:00
Volodymyr Zotov
cd504ec7df Merge branch 'main' into vzt/speedup-local-builds
# Conflicts:
#	Makefile
2025-07-15 17:08:31 -05:00
Eduard Filip
cabc020cc6 Upgrade to Operator SDK 1.41.1 (#211)
* Add missing improvements from Operator SDK 1.34.1

These were not mentioned in the upgrade documentation for version 1.34.x (https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.34.0/), but I've found them by compating the release with the previous one (https://github.com/operator-framework/operator-sdk/compare/v1.33.0...v1.34.1).

* Upgrade to Operator SDK 1.36.0

Source of upgrade steps: https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.36.0/
Key differences:
- Go packages `k8s.io/*` are already at a version higher than the one in the upgrade.
- `ENVTEST_K8S_VERSION` is at a version higher than the one in the upgrade
- We didn't have the golangci-lint make command before, thus we only needed to add things.

* Upgrade to Operator SDK 1.38.0

Source of upgrade steps: https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.38.0/

* Upgrade to Operator SDK 1.39.0

Source of upgrade steps: https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.39.0/

* Upgrade to Operator SDK 1.40.0

Source of upgrade steps: https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.40.0/

I didn't do the "Add app.kubernetes.io/name label to your manifests" since it seems that we have it already, and it's customized.

* Address lint errors

* Update golangci-lint version used to support Go 1.24

* Improve workflows

- Make workflow targets more specific.
- Make build workflow only build (i.e. remove test part of it).
- Rearrange steps and improve naming for build workflow.

* Add back deleted test

Initially the test has been removed due to lint saying that it was duplicate code, but it falsely errored since the values are different.

* Improve code and add missing upgrade pieces

* Upgrade to Operator SDK 1.41.1

Source of upgrade steps: https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.41.0/

Upgrading to 1.41.1 from 1.40.0 doesn't have any migration steps.

Key elements:
- Upgrade to golangci-lint v2
- Made the manifests using the updated controller tools

* Address linter errors

golanci-lint v2 seems to be more robust than the previous one, which is beneficial. Thus, we address the linter errors thrown by v2 and improve our code even further.

* Add Makefile improvements

These were brought in by comparing the Makefile of a freshly created operator using the latest operator-sdk with ours.

* Add missing default kustomization for 1.40.0 upgrade

* Bring default kustomization to latest version

This is done by putting the file's content from a newly-generated operator.

* Switch metrics-bind-address default value back to 8080

This ensures that the upgrade is backwards-compatible.

* Add webhook-related scaffolding

This enables us to easily add support for webhooks by running `operator-sdk create webhook` whenever we want to add them.

* Fix typo
2025-07-14 19:32:30 +02:00
Volodymyr Zotov
54eed0c81c Merge pull request #217 from 1Password/release/v1.9.1
Prepare Release - v1.9.1
v1.9.1
2025-07-14 10:47:55 -05:00