Skip to content

Commit e298861

Browse files
add release drafter workflow and add badge to readme, add tests
1 parent 0e7a78a commit e298861

File tree

5 files changed

+101
-1
lines changed

5 files changed

+101
-1
lines changed

.e2e/chainsaw-tests.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,32 @@ spec:
2525
---
2626
apiVersion: chainsaw.kyverno.io/v1alpha1
2727
kind: Test
28+
metadata:
29+
name: sm-without-ns-selector
30+
spec:
31+
steps:
32+
- try:
33+
- assert:
34+
resource:
35+
apiVersion: monitoring.coreos.com/v1
36+
kind: ServiceMonitor
37+
metadata:
38+
name: sm-without-ns-selector-x-default-x-vcluster
39+
namespace: default
40+
spec:
41+
namespaceSelector: {}
42+
selector:
43+
# Resources are deployed to default namespace of vcluster
44+
matchExpressions:
45+
- key: vcluster.loft.sh/namespace
46+
operator: In
47+
values:
48+
- default
49+
matchLabels:
50+
vcluster.loft.sh/label-vcluster-x-a172cedcae: example-app
51+
---
52+
apiVersion: chainsaw.kyverno.io/v1alpha1
53+
kind: Test
2854
metadata:
2955
name: pm-with-ns-selector
3056
spec:

.e2e/vcluster-resources.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,21 @@ spec:
1717
- port: web
1818
---
1919
apiVersion: monitoring.coreos.com/v1
20+
kind: ServiceMonitor
21+
metadata:
22+
name: sm-without-ns-selector
23+
namespace: default
24+
labels:
25+
team: frontend
26+
spec:
27+
namespaceSelector: {}
28+
selector:
29+
matchLabels:
30+
app: example-app
31+
endpoints:
32+
- port: web
33+
---
34+
apiVersion: monitoring.coreos.com/v1
2035
kind: PodMonitor
2136
metadata:
2237
name: pm-with-ns-selector

.github/release-drafter.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name-template: "v$RESOLVED_VERSION"
2+
tag-template: "v$RESOLVED_VERSION"
3+
categories:
4+
- title: "🚀 Features"
5+
labels:
6+
- "feature"
7+
- "enhancement"
8+
- title: "🐛 Bug Fixes"
9+
labels:
10+
- "fix"
11+
- "bugfix"
12+
- "bug"
13+
- title: "🧰 Maintenance"
14+
label: "chore"
15+
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
16+
change-title-escapes: '\<*_&'
17+
exclude-labels:
18+
- "no-release"
19+
version-resolver:
20+
major:
21+
labels:
22+
- "major"
23+
minor:
24+
labels:
25+
- "minor"
26+
- "feature"
27+
- "enhancement"
28+
patch:
29+
labels:
30+
- "patch"
31+
- "fix"
32+
- "bugfix"
33+
- "bug"
34+
- "dependencies"
35+
default: patch
36+
template: |
37+
## Changes
38+
$CHANGES

.github/workflows/draft-release.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Draft Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, reopened, synchronize]
9+
10+
jobs:
11+
update_release_draft:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: release-drafter/release-drafter@v5
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
with:
18+
publish: false
19+
config-name: release-drafter.yaml

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# vCluster Prometheus operator plugin
22

3+
[![Codefresh build status]( https://g.codefresh.io/api/badges/pipeline/codefresh-inc/codefresh-contrib%2Fvcluster-prometheus-operator-plugin%2Fci?type=cf-1)]( https://g.codefresh.io/public/accounts/codefresh-inc/pipelines/new/667d09d7db9387f8b1294868)
4+
35
This repository contains a [vCluster plugin](https://www.vcluster.com/docs/v0.19/advanced-topics/plugins-overview) that syncs [Prometheus operator](https://github.com/prometheus-operator/prometheus-operator) resources from virtual clusters to the host cluster.
46

57
Currently only the very basic functionality is implemented so the plugin only supports syncing of `PodMonitor` and `ServiceMonitor` resources. This is to allow scraping of metrics from workloads running on virtual clusters from a signle Prometheus or Open Telemetry collector on the host (with [target allocator](https://github.com/open-telemetry/opentelemetry-operator/blob/main/cmd/otel-allocator/README.md) that supports Prometheus operator CRDs).
@@ -9,4 +11,4 @@ This compatibility is required as Syncer arhitecture was overhauled by loft.sh i
911

1012
`v1` - Compatible with older versions of vCluster - latest confirmed & tested version is `0.16.4`
1113

12-
`v2` - Compatibe with vCluster version 0.20.0 which was the highest version at the time of writing.
14+
`v2` - Compatibe with vCluster version `0.20.0-beta.9` which was the latest version at the time of writing.

0 commit comments

Comments
 (0)