mirror of
				https://github.com/1Password/onepassword-operator.git
				synced 2025-10-31 03:39:39 +00:00 
			
		
		
		
	Compare commits
	
		
			26 Commits
		
	
	
		
			goreleaser
			...
			deploy-1.2
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | cd43475098 | ||
|   | 9dabac4a55 | ||
|   | d927a08790 | ||
|   | 933f7c4e2c | ||
|   | 81eb9a521f | ||
|   | eb32bd7f94 | ||
|   | a5781af949 | ||
|   | 0aa5781acd | ||
|   | 700be4426f | ||
|   | 76ef9aa372 | ||
|   | d7e6704314 | ||
|   | 2443979602 | ||
|   | 5b65196d31 | ||
|   | e7df8a485d | ||
|   | ded76138da | ||
|   | a5db6aeb81 | ||
|   | d45f682c37 | ||
|   | d0c1235e58 | ||
|   | 9e8f621020 | ||
|   | 8dd7a28456 | ||
|   | 43b06dd7aa | ||
|   | e8e01d6578 | ||
|   | b53e017b77 | ||
|   | b2565cebf8 | ||
|   | 9459d2e292 | ||
|   | 0409b17ef4 | 
							
								
								
									
										36
									
								
								.github/ISSUE_TEMPLATE/bug_report.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								.github/ISSUE_TEMPLATE/bug_report.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | ||||
| --- | ||||
| name: Bug report | ||||
| about: Report bugs and errors found while using the Operator. | ||||
| title: '' | ||||
| labels: bug | ||||
| assignees: '' | ||||
|  | ||||
| --- | ||||
|  | ||||
| ### Your environment | ||||
|  | ||||
| <!-- Version of the Operator when the error occurred --> | ||||
| Operator Version: | ||||
|  | ||||
| <!-- What version of the Connect server are you running? | ||||
| You can get this information from the Integrations section in 1Password | ||||
| https://start.1password.com/integrations/active | ||||
| --> | ||||
| Connect Server Version: | ||||
|  | ||||
| <!-- What version of Kubernetes have you deployed the operator to? --> | ||||
| Kubernetes Version: | ||||
|  | ||||
| ## What happened? | ||||
| <!-- Describe the bug or error --> | ||||
|  | ||||
| ## What did you expect to happen? | ||||
| <!-- Describe what should have happened --> | ||||
|  | ||||
| ## Steps to reproduce | ||||
| 1. <!-- Describe Steps to reproduce the issue --> | ||||
|  | ||||
|  | ||||
| ## Notes & Logs | ||||
| <!-- Paste any logs here that may help with debugging. | ||||
| Remember to remove any sensitive information before sharing! --> | ||||
							
								
								
									
										9
									
								
								.github/ISSUE_TEMPLATE/config.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								.github/ISSUE_TEMPLATE/config.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| # docs: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser | ||||
| blank_issues_enabled: true | ||||
| contact_links: | ||||
|   - name: 1Password Community | ||||
|     url: https://1password.community/categories/secrets-automation | ||||
|     about: Please ask general Secrets Automation questions here. | ||||
|   - name: 1Password Security Bug Bounty | ||||
|     url: https://bugcrowd.com/agilebits | ||||
|     about: Please report security vulnerabilities here. | ||||
							
								
								
									
										32
									
								
								.github/ISSUE_TEMPLATE/feature_request.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								.github/ISSUE_TEMPLATE/feature_request.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,32 @@ | ||||
| --- | ||||
| name: Feature request | ||||
| about: Suggest an idea for the Operator | ||||
| title: '' | ||||
| labels: feature-request | ||||
| assignees: '' | ||||
|  | ||||
| --- | ||||
|  | ||||
| ### Summary | ||||
| <!-- Briefly describe the feature in one or two sentences. You can include more details later. --> | ||||
|  | ||||
| ### Use cases | ||||
| <!-- Describe the use cases that make this feature useful to others. | ||||
| The description should help the reader understand why the feature is necessary. | ||||
| The better we understand your use case, the better we can help create an appropriate solution. --> | ||||
|  | ||||
| ### Proposed solution | ||||
| <!-- If you already have an idea for how the feature should work, use this space to describe it. | ||||
| We'll work with you to find a workable approach, and any implementation details are appreciated. | ||||
| --> | ||||
|  | ||||
| ### Is there a workaround to accomplish this today? | ||||
| <!-- If there's a way to accomplish this feature request without changes to the codebase, we'd like to hear it. | ||||
| --> | ||||
|  | ||||
| ### References & Prior Work | ||||
| <!-- If a similar feature was implemented in another project or tool, add a link so we can better understand your request. | ||||
| Links to relevant documentation or RFCs are also appreciated. --> | ||||
|  | ||||
| * <!-- Reference 1 --> | ||||
| * <!-- Reference 2, etc --> | ||||
							
								
								
									
										52
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										52
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,13 +1,15 @@ | ||||
| name: goreleaser | ||||
| name: release | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     tags: | ||||
|       - '*' | ||||
|       - 'v*' | ||||
|  | ||||
| jobs: | ||||
|   goreleaser: | ||||
|   release-docker: | ||||
|     runs-on: ubuntu-latest | ||||
|     env: | ||||
|       DOCKER_CLI_EXPERIMENTAL: "enabled" | ||||
|     steps: | ||||
|       - | ||||
|         name: Checkout | ||||
| @@ -15,15 +17,41 @@ jobs: | ||||
|         with: | ||||
|           fetch-depth: 0 | ||||
|       - | ||||
|         name: Set up Go | ||||
|         uses: actions/setup-go@v2 | ||||
|         name: Docker meta | ||||
|         id: meta | ||||
|         uses: crazy-max/ghaction-docker-meta@v2 | ||||
|         with: | ||||
|           go-version: 1.15 | ||||
|           images: | | ||||
|             1password/onepassword-operator | ||||
|           # Publish image for x.y.z and x.y | ||||
|           # The latest tag is automatically added for semver tags | ||||
|           tags: | | ||||
|             type=semver,pattern={{version}} | ||||
|             type=semver,pattern={{major}}.{{minor}} | ||||
|       - name: Get the version from tag | ||||
|         id: get_version | ||||
|         run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v} | ||||
|       - | ||||
|         name: Run GoReleaser | ||||
|         uses: goreleaser/goreleaser-action@v2 | ||||
|         name: Set up QEMU | ||||
|         uses: docker/setup-qemu-action@v1 | ||||
|       - | ||||
|         name: Set up Docker Buildx | ||||
|         uses: docker/setup-buildx-action@v1 | ||||
|       - | ||||
|         name: Docker Login | ||||
|         uses: docker/login-action@v1 | ||||
|         with: | ||||
|           version: latest | ||||
|           args: release --rm-dist | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
|           username: ${{ secrets.DOCKERHUB_USERNAME }} | ||||
|           password: ${{ secrets.DOCKERHUB_TOKEN }} | ||||
|       - | ||||
|         name: Build and push | ||||
|         uses: docker/build-push-action@v2 | ||||
|         with: | ||||
|           context: . | ||||
|           file: Dockerfile | ||||
|           platforms: linux/amd64,linux/arm64,linux/arm/v7 | ||||
|           push: true | ||||
|           tags: ${{ steps.meta.outputs.tags }} | ||||
|           labels: ${{ steps.meta.outputs.labels }} | ||||
|           build-args: | | ||||
|             operator_version=${{ steps.get_version.outputs.VERSION }} | ||||
|   | ||||
| @@ -12,6 +12,15 @@ | ||||
|  | ||||
| --- | ||||
|  | ||||
| [//]: # (START/v1.0.1) | ||||
| # v1.0.1 | ||||
|  | ||||
| ## Features | ||||
| * This release also contains an arm64 Docker image. {#20} | ||||
| * Docker images are also pushed to the :latest and :<major>.<minor> tags. | ||||
|  | ||||
| --- | ||||
|  | ||||
| [//]: # (START/v1.0.0) | ||||
| # v1.0.0 | ||||
|  | ||||
|   | ||||
| @@ -14,11 +14,9 @@ COPY vendor/ vendor/ | ||||
| # Build | ||||
| ARG operator_version=dev | ||||
| RUN CGO_ENABLED=0 \ | ||||
|     GOOS=linux \ | ||||
|     GOARCH=amd64 \ | ||||
|     GO111MODULE=on \ | ||||
|     go build \ | ||||
|     -ldflags "-X version.Version=$operator_version" \ | ||||
|     -ldflags "-X \"github.com/1Password/onepassword-operator/version.Version=$operator_version\"" \ | ||||
|     -mod vendor \ | ||||
|     -a -o manager main.go | ||||
|  | ||||
|   | ||||
							
								
								
									
										25
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								README.md
									
									
									
									
									
								
							| @@ -13,8 +13,8 @@ Prerequisites: | ||||
| - [1Password Command Line Tool Installed](https://1password.com/downloads/command-line/) | ||||
| - [kubectl installed](https://kubernetes.io/docs/tasks/tools/install-kubectl/) | ||||
| - [docker installed](https://docs.docker.com/get-docker/) | ||||
| - [Generated a 1password-credentials.json file and issued a 1Password Connect API Token for the K8s Operator integration](https://support.b5dev.com/cs/connect) | ||||
| - [1Password Connect deployed to Kubernetes](https://support.b5dev.com/cs/connect-deploy-kubernetes/#step-2-deploy-a-connect-server). **NOTE**: If customization of the 1Password Connect deployment is not required you can skip this prerequisite. | ||||
| - [Generated a 1password-credentials.json file and issued a 1Password Connect API Token for the K8s Operator integration](https://support.1password.com/secrets-automation/) | ||||
| - [1Password Connect deployed to Kubernetes](https://support.1password.com/connect-deploy-kubernetes/#step-2-deploy-a-1password-connect-server). **NOTE**: If customization of the 1Password Connect deployment is not required you can skip this prerequisite. | ||||
|  | ||||
| ### Quickstart for Deploying 1Password Connect to Kubernetes | ||||
|  | ||||
| @@ -53,15 +53,15 @@ Adding this environment variable will have the operator automatically deploy a d | ||||
| "Create a Connect token for the operator and save it as a Kubernetes Secret:  | ||||
|  | ||||
| ```bash | ||||
| $ kubectl create secret generic op-operator-connect-token --from-literal=token=<OP_CONNECT_TOKEN>" | ||||
| $ kubectl create secret generic onepassword-token --from-literal=token=<OP_CONNECT_TOKEN>" | ||||
| ``` | ||||
|  | ||||
| If you do not have a token for the operator, you can generate a token and save it to kubernetes with the following command: | ||||
| ```bash | ||||
| $ kubectl create secret generic op-operator-connect-token --from-literal=token=$(op create connect token <server> op-k8s-operator --vault <vault>) | ||||
| $ kubectl create secret generic onepassword-token --from-literal=token=$(op create connect token <server> op-k8s-operator --vault <vault>) | ||||
| ``` | ||||
|  | ||||
| [More information on generating a token can be found here](https://support.1password.com/cs/secrets-automation/#appendix-issue-additional-access-tokens) | ||||
| [More information on generating a token can be found here](https://support.1password.com/secrets-automation/#appendix-issue-additional-access-tokens) | ||||
|  | ||||
| **Set Permissions For Operator** | ||||
|  | ||||
| @@ -102,7 +102,7 @@ To create a Kubernetes Secret from a 1Password item, create a yaml file with the | ||||
|  | ||||
| ```yaml | ||||
| apiVersion: onepassword.com/v1 | ||||
| kind: OnePasswordItem # {insert_new_name} | ||||
| kind: OnePasswordItem | ||||
| metadata: | ||||
|   name: <item_name> #this name will also be used for naming the generated kubernetes secret | ||||
| spec: | ||||
| @@ -131,8 +131,8 @@ kind: Deployment | ||||
| metadata: | ||||
|   name: deployment-example | ||||
|   annotations: | ||||
|     operator.1password.io/item-path: "vaults/{vault_id_or_title}/items/{item_id_or_title}" | ||||
|     operator.1password.io/item-name: "{secret_name}" | ||||
|     operator.1password.io/item-path: "vaults/<vault_id_or_title>/items/<item_id_or_title>" | ||||
|     operator.1password.io/item-name: "<secret_name>" | ||||
| ``` | ||||
|  | ||||
| Applying this yaml file will create a Kubernetes Secret with the name `<secret_name>` and contents from the location specified at the specified Item Path. | ||||
| @@ -163,7 +163,8 @@ apiVersion: v1 | ||||
| kind: Namespace | ||||
| metadata: | ||||
|   name: "example-namespace" | ||||
|   operator.1password.io/auto-restart: "true" | ||||
|   annotations: | ||||
|     operator.1password.io/auto-restart: "true" | ||||
| ``` | ||||
| If the value is not set, the auto reset settings on the operator will be used. This value can be overwritten by deployment. | ||||
|  | ||||
| @@ -175,7 +176,8 @@ apiVersion: v1 | ||||
| kind: Deployment | ||||
| metadata: | ||||
|   name: "example-deployment" | ||||
|   operator.1password.io/auto-restart: "true" | ||||
|   annotations: | ||||
|     operator.1password.io/auto-restart: "true" | ||||
| ``` | ||||
| If the value is not set, the auto reset settings on the namespace will be used. | ||||
|  | ||||
| @@ -187,7 +189,8 @@ apiVersion: onepassword.com/v1 | ||||
| kind: OnePasswordItem | ||||
| metadata: | ||||
|   name: example | ||||
|   operator.1password.io/auto-restart: "true" | ||||
|   annotations: | ||||
|     operator.1password.io/auto-restart: "true" | ||||
| ``` | ||||
| If the value is not set, the auto reset settings on the deployment will be used. | ||||
|  | ||||
|   | ||||
| @@ -11,7 +11,7 @@ spec: | ||||
|     metadata: | ||||
|       labels: | ||||
|         app: onepassword-connect | ||||
|         version: "1.0.0" | ||||
|         version: "1.2.0" | ||||
|     spec: | ||||
|       volumes: | ||||
|         - name: shared-data | ||||
|   | ||||
		Reference in New Issue
	
	Block a user