Skip to content

Commit a32542e

Browse files
authored
Merge branch '1Password:main' into feat/add-empty-value-field
2 parents d1973da + 8c0f1a7 commit a32542e

File tree

504 files changed

+30611
-7122
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

504 files changed

+30611
-7122
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
- name: Set up Go 1.x
1010
uses: actions/setup-go@v4
1111
with:
12-
go-version: ^1.20
12+
go-version: ^1.21
1313

1414
- name: Check out code into the Go module directory
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616

1717
- name: Build
1818
run: go build -v ./...

.github/workflows/release-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
-
1818
id: is_release_branch_without_pr
1919
name: Find matching PR
20-
uses: actions/github-script@v6
20+
uses: actions/github-script@v7
2121
with:
2222
github-token: ${{ secrets.GITHUB_TOKEN }}
2323
script: |
@@ -43,7 +43,7 @@ jobs:
4343
name: Create Release Pull Request
4444
runs-on: ubuntu-latest
4545
steps:
46-
- uses: actions/checkout@v3
46+
- uses: actions/checkout@v4
4747

4848
- name: Parse release version
4949
id: get_version

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ jobs:
1212
DOCKER_CLI_EXPERIMENTAL: "enabled"
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
1818

1919
- name: Docker meta
2020
id: meta
21-
uses: docker/metadata-action@v4
21+
uses: docker/metadata-action@v5
2222
with:
2323
images: |
2424
1password/onepassword-operator
@@ -33,19 +33,19 @@ jobs:
3333
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
3434

3535
- name: Set up QEMU
36-
uses: docker/setup-qemu-action@v2
36+
uses: docker/setup-qemu-action@v3
3737

3838
- name: Set up Docker Buildx
39-
uses: docker/setup-buildx-action@v2
39+
uses: docker/setup-buildx-action@v3
4040

4141
- name: Docker Login
42-
uses: docker/login-action@v2
42+
uses: docker/login-action@v3
4343
with:
4444
username: ${{ secrets.DOCKERHUB_USERNAME }}
4545
password: ${{ secrets.DOCKERHUB_TOKEN }}
4646

4747
- name: Build and push
48-
uses: docker/build-push-action@v3
48+
uses: docker/build-push-action@v5
4949
with:
5050
context: .
5151
file: Dockerfile

CONTRIBUTING.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Contributing
2+
3+
Thank you for your interest in contributing to the 1Password Kubernetes Operator project 👋! Before you start, please take a moment to read through this guide to understand our contribution process.
4+
5+
## Testing
6+
7+
- For functional testing, run the local version of the operator. From the project root:
8+
9+
```sh
10+
# Go to the K8s environment (e.g. minikube)
11+
eval $(minikube docker-env)
12+
13+
# Build the local Docker image for the operator
14+
make docker-build
15+
16+
# Deploy the operator
17+
make deploy
18+
19+
# Remove the operator from K8s
20+
make undeploy
21+
```
22+
23+
- For testing the changes made to the `OnePasswordItem` Custom Resource Definition (CRD), you need to re-generate the object:
24+
```sh
25+
make manifests
26+
```
27+
28+
- Run tests for the operator:
29+
30+
```sh
31+
make test
32+
```
33+
34+
You can check other available commands that may come in handy by running `make help`.
35+
36+
## Debugging
37+
38+
- Running `kubectl describe pod` will fetch details about pods. This includes configuration information about the container(s) and Pod (labels, resource requirements, etc) and status information about the container(s) and Pod (state, readiness, restart count, events, etc.).
39+
- Running `kubectl logs ${POD_NAME} ${CONTAINER_NAME}` will print the logs from the container(s) in a pod. This can help with debugging issues by inspection.
40+
- Running `kubectl exec ${POD_NAME} -c ${CONTAINER_NAME} -- ${CMD}` allows executing a command inside a specific container.
41+
42+
For more debugging documentation, see: https://kubernetes.io/docs/tasks/debug/debug-application/debug-pods/
43+
44+
## Documentation Updates
45+
46+
If applicable, update the [USAGEGUIDE.md](./USAGEGUIDE.md) and [README.md](./README.md) to reflect any changes introduced by the new code.
47+
48+
## Sign your commits
49+
50+
To get your PR merged, we require you to sign your commits. There are three options you can choose from.
51+
52+
### Sign commits with 1Password
53+
54+
You can sign commits using 1Password, which lets you sign commits with biometrics without the signing key leaving the local 1Password process.
55+
56+
Learn how to use [1Password to sign your commits](https://developer.1password.com/docs/ssh/git-commit-signing/).
57+
58+
### Sign commits with ssh-agent
59+
60+
Follow the steps below to set up commit signing with `ssh-agent`:
61+
62+
1. [Generate an SSH key and add it to ssh-agent](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
63+
2. [Add the SSH key to your GitHub account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)
64+
3. [Configure git to use your SSH key for commits signing](https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key#telling-git-about-your-ssh-key)
65+
66+
### Sign commits with gpg
67+
68+
Follow the steps below to set up commit signing with `gpg`:
69+
70+
1. [Generate a GPG key](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key)
71+
2. [Add the GPG key to your GitHub account](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account)
72+
3. [Configure git to use your GPG key for commits signing](https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key#telling-git-about-your-gpg-key)

Makefile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ endif
5050

5151
# Set the Operator SDK version to use. By default, what is installed on the system is used.
5252
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
53-
OPERATOR_SDK_VERSION ?= v1.33.0
53+
OPERATOR_SDK_VERSION ?= v1.34.1
5454

5555
# Image URL to use all building/pushing image targets
5656
IMG ?= 1password/onepassword-operator:latest
5757
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
58-
ENVTEST_K8S_VERSION = 1.28.3
58+
ENVTEST_K8S_VERSION = 1.29.1
5959

6060
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
6161
ifeq (,$(shell go env GOBIN))
@@ -146,14 +146,11 @@ docker-push: ## Push docker image with the manager.
146146
# To properly provided solutions that supports more than one platform you should use this option.
147147
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
148148
.PHONY: docker-buildx
149-
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
150-
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
151-
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
149+
docker-buildx: ## Build and push docker image for the manager for cross-platform support
152150
- $(CONTAINER_TOOL) buildx create --name project-v3-builder
153151
$(CONTAINER_TOOL) buildx use project-v3-builder
154-
- $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross .
152+
- $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile .
155153
- $(CONTAINER_TOOL) buildx rm project-v3-builder
156-
rm Dockerfile.cross
157154

158155
##@ Deployment
159156

@@ -197,7 +194,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
197194

198195
## Tool Versions
199196
KUSTOMIZE_VERSION ?= v5.3.0
200-
CONTROLLER_TOOLS_VERSION ?= v0.13.0
197+
CONTROLLER_TOOLS_VERSION ?= v0.14.0
201198

202199
.PHONY: kustomize
203200
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading.

go.mod

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,79 +6,78 @@ toolchain go1.21.5
66

77
require (
88
github.com/1Password/connect-sdk-go v1.5.3
9-
github.com/onsi/ginkgo/v2 v2.13.2
9+
github.com/onsi/ginkgo/v2 v2.14.0
1010
github.com/onsi/gomega v1.30.0
11-
github.com/stretchr/testify v1.8.4
12-
k8s.io/api v0.29.0
13-
k8s.io/apimachinery v0.29.0
14-
k8s.io/client-go v0.29.0
11+
github.com/stretchr/testify v1.9.0
12+
k8s.io/api v0.29.3
13+
k8s.io/apimachinery v0.29.3
14+
k8s.io/client-go v0.29.3
1515
k8s.io/kubectl v0.29.0
16-
sigs.k8s.io/controller-runtime v0.16.3
16+
sigs.k8s.io/controller-runtime v0.17.2
1717
)
1818

1919
require (
2020
github.com/beorn7/perks v1.0.1 // indirect
2121
github.com/cespare/xxhash/v2 v2.2.0 // indirect
2222
github.com/davecgh/go-spew v1.1.1 // indirect
23-
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
23+
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
2424
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
25-
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
26-
github.com/fsnotify/fsnotify v1.6.0 // indirect
27-
github.com/go-logr/logr v1.3.0 // indirect
28-
github.com/go-logr/zapr v1.2.4 // indirect
29-
github.com/go-openapi/jsonpointer v0.19.6 // indirect
30-
github.com/go-openapi/jsonreference v0.20.2 // indirect
31-
github.com/go-openapi/swag v0.22.3 // indirect
25+
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
26+
github.com/fsnotify/fsnotify v1.7.0 // indirect
27+
github.com/go-logr/logr v1.4.1 // indirect
28+
github.com/go-logr/zapr v1.3.0 // indirect
29+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
30+
github.com/go-openapi/jsonreference v0.21.0 // indirect
31+
github.com/go-openapi/swag v0.23.0 // indirect
3232
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
3333
github.com/gogo/protobuf v1.3.2 // indirect
3434
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
35-
github.com/golang/protobuf v1.5.3 // indirect
35+
github.com/golang/protobuf v1.5.4 // indirect
3636
github.com/google/gnostic-models v0.6.8 // indirect
3737
github.com/google/go-cmp v0.6.0 // indirect
3838
github.com/google/gofuzz v1.2.0 // indirect
3939
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
40-
github.com/google/uuid v1.3.0 // indirect
41-
github.com/imdario/mergo v0.3.6 // indirect
40+
github.com/google/uuid v1.6.0 // indirect
41+
github.com/imdario/mergo v0.3.16 // indirect
4242
github.com/josharian/intern v1.0.0 // indirect
4343
github.com/json-iterator/go v1.1.12 // indirect
4444
github.com/mailru/easyjson v0.7.7 // indirect
45-
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
4645
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4746
github.com/modern-go/reflect2 v1.0.2 // indirect
4847
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4948
github.com/opentracing/opentracing-go v1.2.0 // indirect
5049
github.com/pkg/errors v0.9.1 // indirect
5150
github.com/pmezard/go-difflib v1.0.0 // indirect
52-
github.com/prometheus/client_golang v1.16.0 // indirect
53-
github.com/prometheus/client_model v0.4.0 // indirect
54-
github.com/prometheus/common v0.44.0 // indirect
55-
github.com/prometheus/procfs v0.10.1 // indirect
51+
github.com/prometheus/client_golang v1.19.0 // indirect
52+
github.com/prometheus/client_model v0.6.0 // indirect
53+
github.com/prometheus/common v0.51.1 // indirect
54+
github.com/prometheus/procfs v0.13.0 // indirect
5655
github.com/spf13/pflag v1.0.5 // indirect
5756
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
5857
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
59-
go.uber.org/atomic v1.10.0 // indirect
58+
go.uber.org/atomic v1.11.0 // indirect
6059
go.uber.org/multierr v1.11.0 // indirect
61-
go.uber.org/zap v1.25.0 // indirect
62-
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
63-
golang.org/x/net v0.17.0 // indirect
64-
golang.org/x/oauth2 v0.10.0 // indirect
65-
golang.org/x/sys v0.14.0 // indirect
66-
golang.org/x/term v0.13.0 // indirect
67-
golang.org/x/text v0.13.0 // indirect
68-
golang.org/x/time v0.3.0 // indirect
69-
golang.org/x/tools v0.14.0 // indirect
60+
go.uber.org/zap v1.27.0 // indirect
61+
golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 // indirect
62+
golang.org/x/net v0.22.0 // indirect
63+
golang.org/x/oauth2 v0.18.0 // indirect
64+
golang.org/x/sys v0.18.0 // indirect
65+
golang.org/x/term v0.18.0 // indirect
66+
golang.org/x/text v0.14.0 // indirect
67+
golang.org/x/time v0.5.0 // indirect
68+
golang.org/x/tools v0.19.0 // indirect
7069
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
71-
google.golang.org/appengine v1.6.7 // indirect
72-
google.golang.org/protobuf v1.31.0 // indirect
70+
google.golang.org/appengine v1.6.8 // indirect
71+
google.golang.org/protobuf v1.33.0 // indirect
7372
gopkg.in/inf.v0 v0.9.1 // indirect
7473
gopkg.in/yaml.v2 v2.4.0 // indirect
7574
gopkg.in/yaml.v3 v3.0.1 // indirect
76-
k8s.io/apiextensions-apiserver v0.28.3 // indirect
77-
k8s.io/component-base v0.29.0 // indirect
78-
k8s.io/klog/v2 v2.110.1 // indirect
79-
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
80-
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
75+
k8s.io/apiextensions-apiserver v0.29.3 // indirect
76+
k8s.io/component-base v0.29.3 // indirect
77+
k8s.io/klog/v2 v2.120.1 // indirect
78+
k8s.io/kube-openapi v0.0.0-20240322212309-b815d8309940 // indirect
79+
k8s.io/utils v0.0.0-20240310230437-4693a0247e57 // indirect
8180
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
8281
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
83-
sigs.k8s.io/yaml v1.3.0 // indirect
82+
sigs.k8s.io/yaml v1.4.0 // indirect
8483
)

0 commit comments

Comments
 (0)