Skip to content
Merged
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
13 changes: 13 additions & 0 deletions .github/workflows/pr-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,19 @@ jobs:
echo "Info: Installing prometheus setup"
kubectl apply -f setup --server-side

echo "Info: Waiting for Prometheus CRDs to be established..."
kubectl wait --for=condition=Established --timeout=120s \
customresourcedefinitions.apiextensions.k8s.io/alertmanagerconfigs.monitoring.coreos.com \
customresourcedefinitions.apiextensions.k8s.io/alertmanagers.monitoring.coreos.com \
customresourcedefinitions.apiextensions.k8s.io/podmonitors.monitoring.coreos.com \
customresourcedefinitions.apiextensions.k8s.io/probes.monitoring.coreos.com \
customresourcedefinitions.apiextensions.k8s.io/prometheuses.monitoring.coreos.com \
customresourcedefinitions.apiextensions.k8s.io/prometheusagents.monitoring.coreos.com \
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
Resolved
customresourcedefinitions.apiextensions.k8s.io/prometheusrules.monitoring.coreos.com \
customresourcedefinitions.apiextensions.k8s.io/scrapeconfigs.monitoring.coreos.com \
customresourcedefinitions.apiextensions.k8s.io/servicemonitors.monitoring.coreos.com \
customresourcedefinitions.apiextensions.k8s.io/thanosrulers.monitoring.coreos.com

echo "Info: Installing prometheus manifests"
kubectl apply -f . --server-side

Expand Down
160 changes: 160 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# Contributing to Kruize Operator

Thank you for your interest in the Kruize Operator! We welcome your contributions to the project.

## Submitting a Contribution

The Kruize Operator is [Apache 2.0](https://github.com/kruize/kruize-operator/blob/main/LICENSE) licensed and uses GitHub to manage reviews of pull requests. This document outlines the contribution workflow, commit message formatting, contact details and other resources to make it easier to get your contribution accepted.

### Contribution Workflow

These steps outline the general contribution workflow:

- Fork and set up the [kruize-operator](https://github.com/kruize/kruize-operator) repository on your workstation
- Create a topic branch based off the `mvp_demo` branch
- Follow the coding guidelines while making code changes
- Install the required software to build and deploy the operator (see [Prerequisites](#prerequisites))
- Make sure the tests pass, and add any new tests if appropriate (see [Testing](#testing))
- Make commits of logical units
- Make sure your commit messages are in the proper format (see [Commit Message](#commit-message))
- Push your changes to a topic branch in your fork of the repository
- Submit a pull request to the original repository
- Ensure the PR checks pass (see [PR Checks](#pr-checks))
- For any queries, open a [GitHub Discussion](https://github.com/kruize/kruize-operator/discussions) or an [issue](https://github.com/kruize/kruize-operator/issues)

If this is your first pull request on GitHub, click [here](https://www.freecodecamp.org/news/how-to-make-your-first-pull-request-on-github-3/) to quickly get started.

---

## Prerequisites

See the [Prerequisites section in README.md](README.md#prerequisites) for the full list of required tools and versions.

---

## Building

```sh
# Generate code and manifests
make generate manifests

# Build the operator image
make docker-build IMG=<registry>/kruize-operator:tag

# Build and push
make docker-build docker-push IMG=<registry>/kruize-operator:tag
```

For a streamlined build and push workflow with prerequisite checks and version management, use the provided script:

```sh
./scripts/operator_build_and_push.sh -o <operator_image> -b <bundle_image>
```

---

## Testing

Before submitting a pull request, ensure all tests pass:

```sh
# Run unit tests
make test

# Run end-to-end tests (requires a running cluster)
make test-e2e
```

See [test/Operator_tests.md](test/Operator_tests.md) for detailed testing documentation.

---

## PR Checks

All pull requests are subject to automated checks defined in [`.github/workflows/pr-check.yaml`](.github/workflows/pr-check.yaml). Ensure:

- Unit tests pass (`make test`)
- Code compiles without errors (`make build` or `make generate manifests`)
- No linting errors

---

## Commit Message

We use GPG keys for signing commits. Refer to [Generating a new GPG key](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key) for details.

The commit message should indicate **what** has changed and **why** the change was made. Sign off on your commit in the footer. By doing this, you assert original authorship of the commit and that you are permitted to contribute it.

This can be automatically added to your commit by passing `-S` (GPG sign) and `-s` (sign-off) to `git commit`:

```sh
git commit -S -s -m "your commit message"
```

Or by manually adding the following line to the footer of the commit:

```
Signed-off-by: Full Name <email>
```

### Commit Message Format

```
<type>: <short summary>

<optional body explaining why the change was made>

Signed-off-by: Full Name <email>
```

**Types:** `fix`, `feat`, `docs`, `refactor`, `test`, `chore`, `ci`

**Examples:**

```
fix: correct finalizer cleanup timeout handling

The finalizer was not respecting the FINALIZER_TIMEOUT_SECONDS env var
during resource deletion, causing indefinite hangs on slow clusters.

Signed-off-by: Jane Doe <jane@example.com>
```

```
feat: add support for KIND cluster overlay

Signed-off-by: John Smith <john@example.com>
```

---

## Code Style and Guidelines

- Follow standard [Go conventions](https://google.github.io/styleguide/go/)
- Run `gofmt` before committing: `gofmt -w ./...`
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
Resolved
- Keep changes focused — one logical change per commit and per PR
- Add or update documentation in `docs/` for non-trivial changes
- Do not hardcode secrets, image digests, or environment-specific values

---

## Reporting Issues

If you find a bug or want to request a feature, please [open an issue](https://github.com/kruize/kruize-operator/issues/new) with:

- A clear description of the problem or request
- Steps to reproduce (for bugs)
- The Kubernetes/OpenShift version and cluster type (Minikube, KIND, OpenShift)
- Relevant logs or error messages

---

## Additional Resources

- [Kruize Operator README](README.md)
- [Operator SDK Documentation](https://sdk.operatorframework.io/)
- [Operator Lifecycle Manager](https://github.com/operator-framework/operator-lifecycle-manager)

---

Thank you for contributing!
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.5)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.5)
VERSION ?= 0.0.7
VERSION ?= 0.0.8

# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,15 @@ This requires a Kubernetes or OpenShift cluster. Recommended: Minikube, KIND, or
**For detailed testing documentation**, see:
- [Operator Tests Documentation](test/Operator_tests.md)

## Contributing

We welcome your contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md) for more details.

Join the [Kruize Slack](http://kruizeworkspace.slack.com/) to connect with the community, ask questions, and collaborate!

or Scan the QR Code
![Slack QR code](docs/images/kruize_slack_QR.jpeg)

## License

Apache License 2.0, see [LICENSE](/LICENSE).
Expand Down
14 changes: 7 additions & 7 deletions bundle/manifests/kruize-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ metadata:
"name": "kruize-sample"
},
"spec": {
"autotune_image": "quay.io/kruize/autotune_operator:0.11",
"autotune_image": "quay.io/kruize/autotune_operator:0.12",
"autotune_ui_image": "quay.io/kruize/kruize-ui:0.1.0",
"cluster_type": "openshift",
"kruize": {
Expand Down Expand Up @@ -57,7 +57,7 @@ metadata:
]
},
"namespace": "openshift-tuning",
"optimizer_image": "quay.io/kruize/kruize-optimizer:0.0.1",
"optimizer_image": "quay.io/kruize/kruize-optimizer:0.0.2",
"persistentVolume": {
"accessModes": [
"ReadWriteMany"
Expand Down Expand Up @@ -95,14 +95,14 @@ metadata:
]
capabilities: Basic Install
categories: Monitoring, Developer Tools
containerImage: quay.io/kruize/kruize-operator:0.0.7
createdAt: "2026-07-03T11:55:58Z"
containerImage: quay.io/kruize/kruize-operator:0.0.8
createdAt: "2026-11-09T10:58:16Z"
description: Resource optimization tool for Kubernetes workloads
operators.operatorframework.io/builder: operator-sdk-v1.42.2
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
repository: https://github.com/kruize/kruize-operator
support: Kruize Community
name: kruize-operator.v0.0.7
name: kruize-operator.v0.0.8
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
Resolved
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -523,7 +523,7 @@ spec:
- --metrics-bind-address=:8443
command:
- /app/manager
image: quay.io/kruize/kruize-operator:0.0.7
image: quay.io/kruize/kruize-operator:0.0.8
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -627,4 +627,4 @@ spec:
minKubeVersion: 1.23.0
provider:
name: Kruize
version: 0.0.7
version: 0.0.8
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: Kustomization
images:
- name: controller
newName: quay.io/kruize/kruize-operator
newTag: 0.0.7
newTag: 0.0.8
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
alm-examples: '[]'
capabilities: Basic Install
categories: Monitoring, Developer Tools
containerImage: quay.io/kruize/kruize-operator:0.0.7
containerImage: quay.io/kruize/kruize-operator:0.0.8
description: Resource optimization tool for Kubernetes workloads
operators.operatorframework.io/builder: operator-sdk-v1.42.2
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
Expand Down
4 changes: 2 additions & 2 deletions config/samples/v1alpha1_kruize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ metadata:
spec:
# Supported values: "openshift", "minikube", "kind"
cluster_type: "openshift"
autotune_image: "quay.io/kruize/autotune_operator:0.11"
autotune_image: "quay.io/kruize/autotune_operator:0.12"
autotune_ui_image: "quay.io/kruize/kruize-ui:0.1.0"
optimizer_image: "quay.io/kruize/kruize-optimizer:0.0.1"
optimizer_image: "quay.io/kruize/kruize-optimizer:0.0.2"
# For OpenShift, use: "openshift-tuning", Minikube/KIND, use: "monitoring"
namespace: "openshift-tuning"

Expand Down
Binary file added docs/images/kruize_slack_QR.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions internal/constants/kruize_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ const (
// Default container image versions
const (
// defaultAutotuneImageTag is the default tag for Kruize Autotune image
defaultAutotuneImageTag = "0.11"
defaultAutotuneImageTag = "0.12"

// defaultUIImageTag is the default tag for Kruize UI image
defaultUIImageTag = "0.1.0"

// defaultOptimizerImageTag is the default tag for Kruize Optimizer image
defaultOptimizerImageTag = "0.0.1"
defaultOptimizerImageTag = "0.0.2"

// defaultAutotuneImageRepo is the default repository for Kruize Autotune image
defaultAutotuneImageRepo = "quay.io/kruize/autotune_operator"
Expand Down
Loading