Skip to content
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

Add a Prometheus Operator Component #32

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
15 changes: 15 additions & 0 deletions kustomization/components/operator-prometheus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Prometheus Operator Component

This will deploy the
[Prometheus Operator](https://operatorhub.io/operator/prometheus)

## Example Usage

```yaml
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

components:
- https://github.com/marinatedconcrete/config/kustomization/components/operator-prometheus
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

resources:
- subscription.yml
12 changes: 12 additions & 0 deletions kustomization/components/operator-prometheus/subscription.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: my-prometheus
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never did like the my prefix on names. Can we drop it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure; I guess this should really be something like prometheus-subscription

namespace: operators
spec:
channel: beta
name: prometheus
source: operatorhubio-catalog
sourceNamespace: olm
Comment on lines +7 to +11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not being familiar with Prometheus or the operator framework, these lines could use some commenting to explain what they do and how to customize them (if possible, necessary), or perhaps docs on the operator framework component itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is taken verbatim from the install instructions on https://operatorhub.io/operator/prometheus

The operatorhubio-catalog is part of the olm installation, which lives in the olm namespace.