-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] added contributing.md file to assist new contributors #946
Open
kernelpanic77
wants to merge
10
commits into
devfile:main
Choose a base branch
from
kernelpanic77:contribute
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a53f8d8
added contributing.md file to assist new contributors
kernelpanic77 c8dc4a9
Merge branch 'devfile:main' into contribute
kernelpanic77 079f79b
Update docs/CONTRIBUTING.md
kernelpanic77 b171c16
Update docs/CONTRIBUTING.md
kernelpanic77 a370293
added contributing.md file to assist new contributors
kernelpanic77 1435065
Update docs/CONTRIBUTING.md
kernelpanic77 654a59f
Update docs/CONTRIBUTING.md
kernelpanic77 0c0520a
updated contributing.md
kernelpanic77 2d9d4c7
updated contributing.md
kernelpanic77 614092f
changes for contributing.md 'testing controller'
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
# Contributing to Devworkspace-Operator | ||
|
||
Hello there! Thank you for choosing to the contributing to devfile/devworkspace-operator. Navigate through the following to understand more about contributing here. | ||
kernelpanic77 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- [Contributing to Devworkspace-Operator](#contributing-to-devworkspace-operator) | ||
kernelpanic77 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- [How to Contribute](#how-to-contribute) | ||
- [Set up your Development Environment](#set-up-your-development-environment) | ||
- [Running the controller locally.](#running-the-controller-locally) | ||
- [Testing Changes](#testing-changes) | ||
- [Test run the controller](#test-run-the-controller) | ||
- [Developing Webhooks](#developing-webhooks) | ||
- [Signing-off on Commits](#signing-off-on-commits) | ||
|
||
# How to Contribute | ||
To contribute to the devworkspace-operator project, developers should follow the fork and pull request workflow. | ||
kernelpanic77 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
## Set up your Development Environment | ||
|
||
|
||
**1.** Fork [Devworkspace operator](https://github.com/devfile/devworkspace-operator) repository. | ||
kernelpanic77 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
**2.** Clone your forked copy of the project. | ||
|
||
``` | ||
git clone https://github.com/<your-github-username>/devworkspace-operator.git | ||
``` | ||
|
||
#### Running the controller locally. | ||
|
||
In the steps listed below, we set up the development environment using a minikube cluster. | ||
kernelpanic77 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
**1.** Start the minikube cluster. | ||
|
||
``` | ||
minikube start | ||
``` | ||
|
||
**2.** Enable the ingress add-on for your minikube cluster. | ||
|
||
``` | ||
minikube addons enable ingress | ||
``` | ||
|
||
**3.** Set the namespace environment variable for the development environment to avoid changes inside the default namespace. | ||
|
||
``` | ||
export NAMESPACE="devworkspace-controller" | ||
``` | ||
|
||
**4.** Install the kubernetes certificate management controller to generate and manage TLS certificates for your cluster. | ||
|
||
``` | ||
make install_cert_manager. | ||
``` | ||
Please note that the above step is not specific to minikube. The cert-manager is required for all deployments on kubernetes. | ||
kernelpanic77 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
**5.** Install the dependencies for running the devworkspace-operator in your cluster. | ||
kernelpanic77 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
``` | ||
make install | ||
``` | ||
|
||
**6.** Scale down the replicas controller-manager pods to 0. | ||
|
||
``` | ||
kubectl patch deployment/devworkspace-controller-manager --patch "{\"spec\":{\"replicas\":0}}" -n $NAMESPACE | ||
``` | ||
|
||
**7.** Run the devworkspace-operator. | ||
|
||
``` | ||
make run | ||
``` | ||
|
||
This will run the devworkspace-controller in your local system. | ||
kernelpanic77 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
**8.** Make your changes in the new branch and test the changes. | ||
kernelpanic77 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
## Testing Changes | ||
|
||
#### Test run the controller | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the Test run the controller and Developing Webhooks sections, there is a missing newline for each instruction number, making everything appear as a paragraph. I think you need to add a newline between each number point. |
||
|
||
**1.** Take a look samples devworkspace configuration in `./samples` folder. | ||
kernelpanic77 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
**2.** Apply any of them by executing `kubectl apply -f ./samples/theia-latest.yaml -n <namespace>`. | ||
**3.** As soon as devworkspace is started you're able to get IDE url by executing `kubectl get devworkspace -n <namespace>` | ||
kernelpanic77 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
#### Developing Webhooks | ||
|
||
**1.** Make a change to the webhook. | ||
**2.** Ensure the `DWO_IMG` environment variable points to your container image repository, eg. export `DWO_IMG=quay.io/aobuchow/dwo-webhook:next`. | ||
kernelpanic77 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
**3.** Run `make docker restart` (assuming DWO is already deployed to the cluster, otherwise make docker install). | ||
kernelpanic77 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Wait for the webhook deployment to update with your image that contains your latest changes. | ||
## Signing-off on Commits | ||
|
||
To contribute to this project, you must agree to the **code fo conduct** for each commit you make. | ||
kernelpanic77 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
See the [code of conduct](https://github.com/devfile/api/blob/main/CODE_OF_CONDUCT.md) file for the full text of what you must agree to. | ||
To signify that you agree to the DCO for contributions, you simply add a line to each of your | ||
git commit messages: | ||
|
||
``` | ||
Signed-off-by: John Doe <john.doe@example.com> | ||
``` | ||
|
||
**Note:** you don't have to manually include this line on your commits, git does that for you as shown below: | ||
|
||
``` | ||
$ git commit -s -m “my commit message w/signoff” | ||
``` | ||
|
||
In most cases, git automatically adds the signoff to your commit with the use of | ||
`-s` or `--signoff` flag to `git commit`. You must use your real name and a reachable email | ||
address (sorry, no pseudonyms or anonymous contributions). | ||
|
||
To ensure all your commits are signed, you may choose to add this alias to your global `.gitconfig`: | ||
|
||
_~/.gitconfig_ | ||
|
||
``` | ||
[alias] | ||
amend = commit -s --amend | ||
cm = commit -s -m | ||
commit = commit -s | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the README, the project should be referred to as "DevWorkspace Operator". @amisevsk correct me if I am wrong.