Skip to content

Commit

Permalink
Update readmes and define make in its own step
Browse files Browse the repository at this point in the history
  • Loading branch information
jriguera committed Mar 13, 2024
1 parent 6333f7f commit 51444f7
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 21 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,25 @@ env:
permissions: {}

jobs:
make:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run make all and generate definitions
run: |
# This step is not needed per se, but runs all the tests
# and generate the manifests
make && cp -v config/crd/bases/* charts/mimirrules-controller/crds/
build-image:
permissions:
packages: write # needed for ghcr access
needs:
- make
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -65,6 +81,7 @@ jobs:
contents: write # to push chart release and create a release (helm/chart-releaser-action)
packages: write
needs:
- make
- build-image
runs-on: ubuntu-latest
steps:
Expand All @@ -78,12 +95,6 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Run make and generate definitions
run: |
# This step is not needed per se, but runs all the tests
# and generate the manifests
make && cp -v config/crd/bases/* charts/mimirrules-controller/crds/
- name: Set up Helm
uses: azure/setup-helm@v4

Expand Down
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# o11y-rules-telemetry-operator

K8S controller to manage Mimir Alerting and Recording rules with dynamic tenants, based on namespace name or annotations.
Visit https://springernature.github.io/o11y-rules-telemetry-operator to see how to install with Helm.

**This repository uses GitHub pages with [chart-releaser](https://github.com/helm/chart-releaser) in a workflow with [chart-releaser-action](https://github.com/helm/chart-releaser-action) to automatically create an manage a Helm repository. See below for more info**
## Production installation

1. Follow the instructions at https://springernature.github.io/o11y-rules-telemetry-operator
2. See all available settings in the Chart: https://github.com/springernature/o11y-rules-telemetry-operator/blob/main/charts/Readme.md

## Description

Expand All @@ -14,7 +16,7 @@ apiVersion: mimirrules.telemetry.springernature.com/v1beta1
kind: MimirRules
metadata:
annotations:
"change.telemetry.springernature.com/o11y-tenant": "jose"
"telemetry.springernature.com/o11y-tenant": "jose"
name: mimirrules-sample
spec:
groups:
Expand All @@ -25,20 +27,25 @@ spec:
labels:
severity: warning
```
The operator applies the rules to Mimir (Ruler) Api using the tenant defined in the annotation, or
It updates the status according to the results and emits events.
The operator applies the rules to Mimir (Ruler) Api using the tenant defined in the annotation or namespace and it updates the status according to the results and emits events.


## Getting Started developing
# Getting Started developing

**This repository uses GitHub pages with [chart-releaser](https://github.com/helm/chart-releaser) in a workflow with [chart-releaser-action](https://github.com/helm/chart-releaser-action) to automatically create an manage a Helm repository. See below for more info**

Code:
- `cmd/main.go`: Arguments and environment variables
- `api/v1beta1/mimirrules_types.go`: CR definition
- `internal/controller/mimirrules_controller.go`: Controller logic
- `internal/controller/mimirrules.go`: Mimir Rule API HTTP client

More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)

## Cheat sheet

Run `make help` for more information on all potential `make` targets

### Prerequisites

- go version v1.21.0+
Expand Down Expand Up @@ -128,6 +135,12 @@ make uninstall
make undeploy
```

**Generate K8S manifests:**

```sh
make build-installer
```

## Project Distribution

Following are the steps to build the installer and distribute this project to users.
Expand All @@ -151,14 +164,9 @@ Users can just run kubectl apply -f <URL for YAML BUNDLE> to install the project
kubectl apply -f https://raw.githubusercontent.com/<org>/o11y-rules-telemetry-operator/<v1 or branch>/dist/install.yaml
```

## Contributing
Run `make help` for more information on all potential `make` targets

More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)

## License
# License

Copyright 2024.
Copyright Springer Nature 2024.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions charts/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Github repository: https://github.com/springernature/o11y-rules-telemetry-operat
To install the app chart in the Kubernetes cluster.

```console
helm upgrade --install mimirrules o11y-rules-telemetry-operator/mimirrules
helm upgrade --install mimirrules-controller o11y-rules-telemetry-operator/mimirrules-controller --set config.mimirAPI=http://your.mimir.api
```

This will install CRD `MimirRules`. Take this into account for CRD updates or when deleting the controller, those operations will require manual steps with `kubectl delete/apply`.
This command install CRD `MimirRules`. Take this into account for CRD updates or when deleting the controller, those operations will require manual steps with `kubectl delete/apply`.


### Values
Expand Down

0 comments on commit 51444f7

Please sign in to comment.