From a80e5ce2610326ea676f112ccd0ea6c781ab41ca Mon Sep 17 00:00:00 2001 From: Ingrid Crant Date: Fri, 9 Feb 2024 15:06:15 -0500 Subject: [PATCH 1/3] CONTRIBUTING.md --- CONTRIBUTING.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..3335b46 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,33 @@ +# Contributing + +Thank you for your interest in contributing to the 1Password kubernetes-secrets-injector project 👋! Before you start, please take a moment to read through this guide to understand our contribution process. + +## Getting Started + +## Testing + +## Sign your commits + +To get your PR merged, we require you to sign your commits. + +### Sign commits with 1Password + +You can also sign commits using 1Password, which lets you sign commits with biometrics without the signing key leaving the local 1Password process. + +Learn how to use [1Password to sign your commits](https://developer.1password.com/docs/ssh/git-commit-signing/). + +### Sign commits with ssh-agent + +Follow the steps below to set up commit signing with `ssh-agent`: + +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) +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) +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) + +### Sign commits with gpg + +Follow the steps below to set up commit signing with `gpg`: + +1. [Generate a GPG key](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key) +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) +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) From bf64b1066a4f08e0d256ae0d32780750b1232068 Mon Sep 17 00:00:00 2001 From: Ingrid Crant Date: Fri, 9 Feb 2024 15:08:16 -0500 Subject: [PATCH 2/3] take out empty sections --- CONTRIBUTING.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3335b46..89193cc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,10 +2,6 @@ Thank you for your interest in contributing to the 1Password kubernetes-secrets-injector project 👋! Before you start, please take a moment to read through this guide to understand our contribution process. -## Getting Started - -## Testing - ## Sign your commits To get your PR merged, we require you to sign your commits. From 6f59485c9295047eab89b39c82876124d5495598 Mon Sep 17 00:00:00 2001 From: Ingrid Crant Date: Mon, 12 Feb 2024 11:51:18 -0500 Subject: [PATCH 3/3] contributing.md changes --- CONTRIBUTING.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 89193cc..3c0a320 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,42 @@ Thank you for your interest in contributing to the 1Password kubernetes-secrets-injector project 👋! Before you start, please take a moment to read through this guide to understand our contribution process. +## Testing + +- For functional testing, run the local version of the injector. From the project root: + + ``` + # Go to the K8s environment (e.g. minikube) + eval $(minikube docker-env) + + # Build the local Docker image for the injector + make build/secrets-injector/local + + # Deploy the injector + make deploy + + # Remove the injector from K8s + make undeploy + ``` + +- Run tests for the operator: + + ``` + make test + ``` + +## Debugging + +- 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.). +- 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. +- Running `kubectl exec ${POD_NAME} -c ${CONTAINER_NAME} -- ${CMD}` allows executing a command inside a specific container. + +For more debugging documentation, see: https://kubernetes.io/docs/tasks/debug/debug-application/debug-pods/ + +## Documentation Updates + +If applicable, update the [README.md](./README.md) to reflect any changes introduced by the new code. + ## Sign your commits To get your PR merged, we require you to sign your commits.