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
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@

A lightweight Quarkus‑based microservice that automates configuration, experiment creation, profile validation, and health orchestration for Kruize Autotune, simplifying the experience for SREs and Platform Engineers.

## Deployment

### Deploy to Kind (local development)

```bash
kubectl apply -k deployment/overlays/kind
```

This deploys to the `monitoring` namespace.

### Deploy to OpenShift

```bash
kubectl apply -k deployment/overlays/openshift
```

This deploys to the `openshift-tuning` namespace.


## Running the application in dev mode

Expand Down
94 changes: 94 additions & 0 deletions deployment/base/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: kruize-optimizer
# Namespace is set via kustomize overlays to avoid duplicating manifests per environment
labels:
app: kruize-optimizer
spec:
replicas: 1
selector:
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
matchLabels:
app: kruize-optimizer
template:
metadata:
labels:
app: kruize-optimizer
spec:
containers:
- name: kruize-optimizer
# TODO: This image will be updated with kruize org image
image: quay.io/rh-ee-shesaxen/optimizer:06042026
imagePullPolicy: Always
ports:
- containerPort: 8080
env:
# Swagger UI Configuration
- name: ENABLE_SWAGGER
value: "false"

# Kruize Service URL
# In k8s: http://<service-name>.<namespace>:<port>
- name: KRUIZE_URL
value: "http://kruize:8080"

# State Refresh Configuration
# Interval to refresh state and install missing profiles
- name: KRUIZE_STATE_REFRESH_INTERVAL
value: "60m"

# Bulk Scheduler Configuration
# Interval to call bulk API (cron format or duration)
- name: KRUIZE_BULK_SCHEDULER_INTERVAL
value: "15m"

# Startup delay before first bulk API call
- name: KRUIZE_BULK_SCHEDULER_STARTUP_DELAY
value: "1m"

# Measurement duration for bulk API calls
- name: KRUIZE_BULK_MEASUREMENT_DURATION
value: "15min"

# Webhook Configuration
# Webhook URL for bulk API callbacks
- name: KRUIZE_WEBHOOK_URL
value: "http://kruize-optimizer:8080/webhook"

# Target Labels Configuration
# Max number of labels to process
- name: KRUIZE_TARGET_LABEL_LIMIT
value: "1"

# Pass labels as a JSON String (Object or Array of "key=value")
- name: KRUIZE_TARGET_LABELS
value: '{"kruize/autotune": "enabled"}'

# Default Configuration
# Default datasource name
- name: KRUIZE_DEFAULT_DATASOURCE
value: "prometheus-1"

# Default metadata profile name
- name: KRUIZE_DEFAULT_METADATA_PROFILE
value: "cluster-metadata-local-monitoring"

# Default metric profile name
- name: KRUIZE_DEFAULT_METRIC_PROFILE
value: "resource-optimization-local-monitoring"
---
apiVersion: v1
kind: Service
metadata:
name: kruize-optimizer
# Namespace is set via kustomize overlays
spec:
type: ClusterIP
selector:
app: kruize-optimizer
ports:
- name: http
port: 8080
targetPort: 8080

# Made with Bob
6 changes: 6 additions & 0 deletions deployment/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- deployment.yaml

8 changes: 8 additions & 0 deletions deployment/overlays/kind/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: monitoring

resources:
- ../../base

8 changes: 8 additions & 0 deletions deployment/overlays/openshift/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: openshift-tuning

resources:
- ../../base