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
2 changes: 1 addition & 1 deletion .e2e/scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RESOURCES_FILE=$MYDIR/../../.e2e/vcluster-resources.yaml

kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.70.0/example/prometheus-operator-crd-full/monitoring.coreos.com_podmonitors.yaml
kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.70.0/example/prometheus-operator-crd-full/monitoring.coreos.com_servicemonitors.yaml
helm upgrade --install --repo https://charts.loft.sh vcluster vcluster --version v0.20.0-beta.5 --values $MYDIR/vcluster-values.yaml --values $ROOT_DIR/plugin.yaml --set plugins.prometheus-operator-resources.image=$PLUGIN_IMAGE --wait
helm upgrade --install --repo https://charts.loft.sh vcluster vcluster --version v0.30.0 --values $MYDIR/vcluster-values.yaml --values $ROOT_DIR/plugin.yaml --set plugins.prometheus-operator-resources.image=$PLUGIN_IMAGE --wait

vcluster connect vcluster -n default -- kubectl get servicemonitor && vcluster connect vcluster -n default -- kubectl get podmonitor

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker.io/docker/dockerfile-upstream:1.14.1-labs

# Build the manager binary
FROM golang:1.23.2 AS builder
FROM golang:1.25.3 AS builder
WORKDIR /vcluster

# Copy the Go Modules manifests
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This repository contains a [vCluster plugin](https://www.vcluster.com/docs/v0.19

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).

This plugin is compatibe with vCluster version `0.21.0` and above, tested on `v0.23.0`, which was latest at the time of writing this plugin.
This plugin in it's latest version is compatibe with vCluster version `0.30.0`

# Development

Expand Down
2 changes: 1 addition & 1 deletion codefresh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ steps:
image: "dtzar/helm-kubectl:3.15"
working_directory: '${{clone}}'
commands:
- curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/download/v0.23.0/vcluster-linux-amd64" && chmod +x ./vcluster && mv ./vcluster /usr/local/bin/vcluster
- curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/download/v0.30.0/vcluster-linux-amd64" && chmod +x ./vcluster && mv ./vcluster /usr/local/bin/vcluster
- kubectl config use-context $KUBE_CONTEXT
- .e2e/scripts/init.sh "${{steps.build.imageId}}"
when:
Expand Down
4 changes: 2 additions & 2 deletions devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ deployments:
chart:
name: vcluster
repo: https://charts.loft.sh
version: v0.23.0
version: v0.30.0
values:
controlPlane:
advanced:
Expand Down Expand Up @@ -64,7 +64,7 @@ deployments:
dev:
vcluster:
imageSelector: "ghcr.io/loft-sh/vcluster-pro"
devImage: golang:1.23.2
devImage: golang:1.25.3
workingDir: /plugins/prometheus-operator-resources
container: syncer
terminal:
Expand Down
2 changes: 1 addition & 1 deletion devspace_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ COLOR_RESET="\033[0m"
if [ ! -f "/vcluster/syncer" ]; then
echo "Downloading vCluster syncer..."
mkdir -p /vcluster
curl -L -o /vcluster/syncer "https://github.com/loft-sh/vcluster/releases/download/v0.23.0/syncer-linux-$(go env GOARCH)"
curl -L -o /vcluster/syncer "https://github.com/loft-sh/vcluster/releases/download/v0.30.0/syncer-linux-$(go env GOARCH)"
curl -L -o /usr/local/bin/kine "https://github.com/k3s-io/kine/releases/download/v0.13.8/kine-$(go env GOARCH)"
chmod +x /vcluster/syncer
chmod +x /usr/local/bin/kine
Expand Down
228 changes: 136 additions & 92 deletions go.mod

Large diffs are not rendered by default.

772 changes: 303 additions & 469 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/syncers/podmonitor/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func init() {
func NewPodMonitorSyncer(ctx *synccontext.RegisterContext) (syncertypes.Base, error) {
GVK := promoperatorv1.SchemeGroupVersion.WithKind("PodMonitor")

_, _, err := translate.EnsureCRDFromPhysicalCluster(ctx, ctx.PhysicalManager.GetConfig(), ctx.VirtualManager.GetConfig(), GVK)
_, _, err := translate.EnsureCRDFromPhysicalCluster(ctx, ctx.HostManager.GetConfig(), ctx.VirtualManager.GetConfig(), GVK)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/syncers/servicemonitor/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func init() {
func NewServiceMonitorSyncer(ctx *synccontext.RegisterContext) (syncertypes.Base, error) {
GVK := promoperatorv1.SchemeGroupVersion.WithKind("ServiceMonitor")

_, _, err := translate.EnsureCRDFromPhysicalCluster(ctx, ctx.PhysicalManager.GetConfig(), ctx.VirtualManager.GetConfig(), GVK)
_, _, err := translate.EnsureCRDFromPhysicalCluster(ctx, ctx.HostManager.GetConfig(), ctx.VirtualManager.GetConfig(), GVK)
if err != nil {
return nil, err
}
Expand Down
Loading