Eddy Filip
87ff93daad
Add some tests for both the API Resource Controller and the Deployment Controller
2022-09-13 16:34:36 +03:00
Eddy Filip
5e496d2e77
Upgrade to GinkGo v2
...
Ginkgo has switched to v2 and we should make use of it instead. It doesn't affect how we make tests, but we get the latest enhancements and improvements on the ways tests are executed.
2022-09-13 16:31:08 +03:00
Eddy Filip
1d75f78891
Update packages and add vendor directory
2022-09-13 16:24:52 +03:00
Eddy Filip
23b66f73af
Update Dockerfile and Makefile
2022-09-13 16:23:01 +03:00
Eddy Filip
e8c380464b
Update license in README
2022-09-13 16:19:04 +03:00
Eddy Filip
f1da40aef7
Migrate yaml files.
...
- `deploy/deployment.yaml` is now `config/manager/manager.yaml`
- `deploy/crds/onepassword.com_v1_onepassworditem_cr.yaml` is now `config/samples/onepassword_v1_onepassworditem.yaml`
2022-09-13 16:18:51 +03:00
Eddy Filip
75501e5b1c
Add missing packages
...
- `version` is used for getting the operator version and the operator SDK version in the logs.
- `k8suitl` is extracted from the operator-sdk to be able to fetch the namespace the operator is deployed to. This is used to deploy Connect in the same namespace if `MANAGE_CONNECT` is set to `true`. In the future, we may want to no rely on this, since this functionality is internal in the operator-sdk.
2022-09-13 16:10:25 +03:00
Eddy Filip
28c3ffade7
Add yaml files for deploying Connect
...
These yaml files are used when the environment variable `MANAGE_CONNECT` for the operator is set to `true`.
2022-09-13 16:08:26 +03:00
Eddy Filip
946e986048
Migrate main.go
2022-09-13 16:07:06 +03:00
Eddy Filip
250785f4af
Migrate Deployment Controller
2022-09-13 16:05:29 +03:00
Eddy Filip
e276ca1148
Clean test code
2022-09-13 15:57:53 +03:00
Eddy Filip
be7b63c37e
Update Connect mock client to reflect the latest version of Connect client
2022-09-13 15:56:42 +03:00
Eddy Filip
622fcd64b8
Add packages
...
- Add the packages that help the operator work as expected.
- Update `go.mod` by running `go mod tidy`.
2022-09-13 15:40:39 +03:00
Eddy Filip
96b78795af
Implement the OnePasswordItem Controller
...
- Migrate the functionality of the Controller for the OnePasswordItem resource.
- Add the RBAC markers that will generate the RBAC permissions.
- Run `make manifests` to generate the RBAC permissions.
2022-09-13 15:21:40 +03:00
Eddy Filip
20b7a2c5cf
Implement API and generate manifests
...
- Define the API by modifying the `onepassworditem_types.go`.
- Commands executed after the API is defined: `make generate && make manifests`.
2022-09-13 15:08:51 +03:00
Eddy Filip
a3de05fbdb
Create OnePasswordItem API and controller
...
Command executed: `operator-sdk create api --version v1 --kind OnePasswordItem --resource --controller`
`--group` flag is skipped because we don't have a group in the previous version of the operator and we want to make things consistent and not bring any breaking changes.
2022-09-13 14:51:50 +03:00
Eddy Filip
a0460ce870
Initialize operator project
...
Command executed: `operator-sdk init --domain onepassword.com --repo github.com/1Password/onepassword-operator --plugins=go/v4-alpha --license=none`
- `--plugin=go/v4-alpha` is used to enable support for Apple Sillicon environments.
- `--license=none` is used since the only option is Apache, and we use the MIT license. `hack/boilerplate.go.txt` is updated with the MIT license instead.
2022-09-13 14:48:07 +03:00
Eddy Filip
1aa1a3f546
Clear repo
...
To be able to perform the migration, we need to start from an empty directory/repo.
2022-09-13 12:26:08 +03:00
Joris Coenen
69857c3d47
Merge pull request #119 from 1Password/release/v1.5.0
...
Release v1.5.0
v1.5.0
2022-06-28 14:42:18 +02:00
Joris Coenen
ad276cb296
Fix typo
2022-06-28 11:38:48 +02:00
Joris Coenen
eab5a4ad92
Prepare release v1.5.0
2022-06-28 11:37:17 +02:00
Joris Coenen
128b9b2eb3
Merge pull request #118 from 1Password/item-status
...
Add Status field to OnePasswordItem resource
2022-06-28 11:28:18 +02:00
Joris Coenen
867e699030
Remove ready field from status
...
The usage of such a field is considered deprecated, conditions
should be used instead.
If there is a use-case that is not covered by conditions only
we can always reconsider adding an extra field to the status.
See the k8s guidelines for more details on the deprecation:
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
2022-06-22 11:39:54 +02:00
Joris Coenen
ffab2cfdab
Merge remote-tracking branch 'origin/main' into item-status
2022-06-22 11:33:23 +02:00
Joris Coenen
00436b4aee
Place back description in CRD
...
This comment was placed manually and therefore
disappeared when regenerating the CRDs.
2022-06-21 14:38:48 +02:00
Joris Coenen
0ca3415a47
Merge pull request #113 from tim-oster/main
...
Fix auto deployment restart dropping original pod annotations
2022-06-15 18:21:59 +02:00
Joris Coenen
4aa1f7a669
Merge pull request #109 from slok/slok/opaque-empty-type
...
Avoid returning an error on secret update when secret types 'Opaque' and 'empty string' are treated as different
2022-06-15 18:03:28 +02:00
Joris Coenen
6c20db47d6
Add Status field to OnePasswordItem resource
...
This makes it easier to see whehter the controller
succeeded in creating the Kubernetes secret for a
OnePasswordItem. If something failed, the `ready` field
will be `false` and the `OnePasswordItemReady` condition
will have a `status` of `False` with the error messages
in the `message` field.
2022-06-15 17:46:56 +02:00
Tim Oster
874d5c57f9
Fix auto deployment restart dropping original pod annotations
2022-05-16 12:10:13 +02:00
Xabier Larrakoetxea
123cfa2c86
Avoid returning an error on secret update when secret types 'Opaque' and 'empty string' are treated as different
...
Signed-off-by: Xabier Larrakoetxea <me@slok.dev >
2022-04-14 11:08:51 +02:00
Jillian W
0796b9c5e2
Merge pull request #105 from 1Password/release/v1.4.1
...
Prepare Release - v1.4.1
v1.4.1
2022-04-12 13:49:26 -03:00
Joris Coenen
37a0f4b51e
Prepare release v1.4.1
2022-04-12 18:46:06 +02:00
Joris Coenen
004e0101ff
Merge pull request #104 from 1Password/secret-annotations
...
Stop copying annotations from OnePasswordItem and Deployment to Secret
2022-04-12 18:22:24 +02:00
Joris Coenen
6326a856ae
Fix test
...
Annotations are no longer copied from the deployment to the secret,
so the test should not assert that the secret has a name annotation.
2022-04-12 10:41:11 +02:00
Joris Coenen
1ddf92c5a0
Merge branch 'main' into secret-annotations
2022-04-12 10:15:32 +02:00
Joris Coenen
f5c6fa5860
Merge pull request #103 from 1Password/owner-reference-item-update
...
Persist OwnerReferences when item is updated
2022-04-12 10:14:21 +02:00
Joris Coenen
afa076d321
Stop copying annotations from OnePasswordItem and Deployment to Secret
...
There is no reason for random annotations to be carried over. This
can lead to weird problems like the `kubectl.kubernetes.io/last-applied-configuration`
annotation ending up on a Secret.
2022-04-11 15:55:28 +02:00
Joris Coenen
d4b04c233c
Add missing error checks
2022-04-11 12:12:58 +02:00
Joris Coenen
ea68cfc2b4
Persist OwnerReferences when 1Password item is updated
2022-04-11 12:12:58 +02:00
Jillian W
58b4ff8ecf
Merge pull request #99 from 1Password/release/v1.4.0
...
preparing release 1.4.0
v1.4.0
2022-04-07 11:59:20 -03:00
jillianwilson
d93fecdc76
preparing release 1.4.0
2022-04-07 10:23:12 -03:00
Jillian W
486465247d
Merge pull request #97 from slok/slok/owner-references
...
Add owner reference to the created secrets by the operator
2022-04-07 09:19:54 -03:00
Xabier Larrakoetxea
79868ae374
Add owner reference to the created secrets
...
Signed-off-by: Xabier Larrakoetxea <me@slok.dev >
2022-04-05 20:31:42 +02:00
Marton Soos
6286f7e306
Merge pull request #54 from mcmarkj/secret-path-updates
...
Deal with itemPath's changing
2022-03-28 15:33:34 +02:00
Marton Soos
0b5efc8690
Merge branch 'main' into secret-path-updates
2022-03-28 15:30:46 +02:00
Marton Soos
c00baeedcb
Merge pull request #94 from 1Password/release/v1.3.0
...
Prepare Release - v1.3.0
v1.3.0
2022-03-25 15:51:18 +01:00
Marton Soos
a37bddbfd9
Update release notes
2022-03-25 14:58:07 +01:00
Marton Soos
bd9922f635
Merge pull request #93 from 1Password/feature/file-support
...
Support loading file fields into Kubernetes secrets
2022-03-24 18:59:28 +01:00
Marton Soos
8fa4413880
Update readme to mention that non-file fields take precedence over file-fields
2022-03-24 18:00:24 +01:00
Marton Soos
62e55a3f19
Update tests and mock client
2022-03-24 12:13:34 +01:00