Skip to content

Commit

Permalink
fix: single endpoint for vm (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
bo0tzz authored Dec 6, 2024
1 parent 0c802ed commit ae64d32
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 76 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMAuth
metadata:
name: vmetrics-ingress
namespace: monitoring-dev
spec:
userSelector: {}
userNamespaceSelector: {}
selectAllByDefault: true
ingress:
tlsSecretName: vmetrics-tls
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production
class_name: nginx
tlsHosts:
- api.monitoring.dev.immich.cloud
- cf-workers.monitoring.dev.immich.cloud
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./ingress.yaml
- ./write.yaml
- ./read.yaml
19 changes: 0 additions & 19 deletions kubernetes/apps/monitoring-dev/victoria-metrics/ingress/read.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ kind: VMUser
metadata:
name: read
namespace: monitoring-dev
labels:
vm-user: "read"
spec:
tokenRef:
name: vmetrics-read-token
Expand All @@ -23,20 +21,3 @@ spec:
name: vmetrics-dev
namespace: monitoring-dev
paths: ["/api/v1/query","/api/v1/query_range","/api/v1/series","/api/v1/labels"]
---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMAuth
metadata:
name: vmetrics-read-ingress
namespace: monitoring-dev
spec:
userSelector:
matchLabels:
vm-user: "read"
ingress:
tlsSecretName: vmetrics-read-tls
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production
class_name: nginx
tlsHosts:
- read.monitoring.dev.immich.cloud
20 changes: 0 additions & 20 deletions kubernetes/apps/monitoring-dev/victoria-metrics/ingress/write.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ kind: VMUser
metadata:
name: write
namespace: monitoring-dev
labels:
vm-user: "write"
spec:
tokenRef:
name: vmetrics-write-token
Expand All @@ -23,21 +21,3 @@ spec:
name: vmetrics-dev
namespace: monitoring-dev
paths: ["/write"]
---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMAuth
metadata:
name: vmetrics-write-ingress
namespace: monitoring-dev
spec:
userSelector:
matchLabels:
vm-user: "write"
ingress:
tlsSecretName: vmetrics-write-tls
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production
class_name: nginx
tlsHosts:
- write.monitoring.dev.immich.cloud
- cf-workers.monitoring.dev.immich.cloud
17 changes: 17 additions & 0 deletions kubernetes/apps/monitoring/victoria-metrics/ingress/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMAuth
metadata:
name: vmetrics-ingress
namespace: monitoring
spec:
userSelector: {}
userNamespaceSelector: {}
selectAllByDefault: true
ingress:
tlsSecretName: vmetrics-tls
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production
class_name: nginx
tlsHosts:
- api.monitoring.immich.cloud
- cf-workers.monitoring.immich.cloud
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./ingress.yaml
- ./write.yaml
- ./read.yaml
20 changes: 1 addition & 19 deletions kubernetes/apps/monitoring/victoria-metrics/ingress/read.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ kind: VMUser
metadata:
name: read
namespace: monitoring
labels:
vm-user: "read"
spec:
tokenRef:
name: vmetrics-read-token
Expand All @@ -23,20 +21,4 @@ spec:
name: vmetrics
namespace: monitoring
paths: ["/api/v1/query","/api/v1/query_range","/api/v1/series","/api/v1/labels"]
---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMAuth
metadata:
name: vmetrics-read-ingress
namespace: monitoring
spec:
userSelector:
matchLabels:
vm-user: "read"
ingress:
tlsSecretName: vmetrics-read-tls
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production
class_name: nginx
tlsHosts:
- read.monitoring.immich.cloud

18 changes: 0 additions & 18 deletions kubernetes/apps/monitoring/victoria-metrics/ingress/write.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,3 @@ spec:
name: vmetrics
namespace: monitoring
paths: ["/write"]
---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMAuth
metadata:
name: vmetrics-write-ingress
namespace: monitoring
spec:
userSelector:
matchLabels:
vm-user: "write"
ingress:
tlsSecretName: vmetrics-write-tls
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production
class_name: nginx
tlsHosts:
- write.monitoring.immich.cloud
- cf-workers.monitoring.immich.cloud

0 comments on commit ae64d32

Please sign in to comment.