Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!--
Thanks for contributing to Valkey Operator!

Please make sure you are aware of our contributing guidelines [available
here](https://github.com/valkey-io/valkey-operator/blob/main/CONTRIBUTING.md)

-->

This PR closes <Issue #>

### Summary

<!--
Add a summary describing the changes
-->

### Features / Behaviour Changes

<!--
Outline the feature support or behaviour changes included in this PR
-->

### Implementation

<!--
Describe the implementation details. Highlight key code changes and call out any areas where you want reviewers to pay extra attention
-->

### Limitations

<!--
Describe any features or use cases that are not implemented or are only partially supported
-->

### Testing

<!--
Describe what tests have been conducted and any relevant test results
-->

### Checklist

Before submitting the PR make sure the following are checked:

- [ ] This Pull Request is related to one issue.
- [ ] Commit message explains what changed and why
- [ ] Tests are added or updated.
- [ ] Documentation files are updated.
- [ ] I have run pre-commit locally (`pre-commit run --all-files` or hooks on commit)
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: "2"
run:
allow-parallel-runners: true
go: "1.25"
linters:
default: none
enable:
Expand Down
30 changes: 30 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
default_stages: [pre-commit]
minimum_pre_commit_version: "2.0.0"
repos:
- repo: local
hooks:
- id: make-generate
name: generate code and manifests
language: system
entry: bash -c "make manifests generate"
types: [go]
pass_filenames: false

- id: go-mod-tidy
name: run go mod tidy
language: system
entry: go mod tidy
files: ^go\.(mod|sum)$
pass_filenames: false

- id: make-lint
name: run golangci-lint
language: system
entry: bash -c "GOTOOLCHAIN=go1.25.3 make lint"
types: [go]
pass_filenames: false

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v0.7.1
hooks:
- id: check-merge-conflict
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,33 @@ Thank you for your interest in contributing to the Valkey Operator! We welcome c
- kubectl v1.11.3+
- Access to a Kubernetes cluster (kind, minikube, or cloud provider)

### Development Tools

This project uses the following tools during development.

#### golangci-lint

To install `golangci-lint` locally follow the [official documentation](https://golangci-lint.run/usage/install/#local-installation).

#### pre-commit

To install `pre-commit` locally follow the [official documentation](https://pre-commit.com/#install).
`pre-commit` uses the [.pre-commit-config.yaml](.pre-commit-config.yaml) configuration file located in the root of the
project.

To set up the `git` hook script execute the following command so that the pre-commit steps runs automatically on
each commit.
```bash
pre-commit install
```

### Development Setup

See the [Developer Guide](./docs/developer-guide.md) for detailed setup instructions.

#### Optional: kubebuilder
[Kubebuilder](https://kubebuilder.io/) is the framework we use for the operator. You will normally not need to use the kubebuilder CLI directly unless you are adding new CRDs or making major changes to the project structure.

Quick start:

```bash
Expand Down