Skip to content

Commit

Permalink
feat(vm): gke cluster add lb
Browse files Browse the repository at this point in the history
  • Loading branch information
incubator4 committed Dec 31, 2023
1 parent 7c34c08 commit 0c43e99
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
2 changes: 1 addition & 1 deletion victoriametrics/dev/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- additional-scrape-configs.yaml
- svc.yaml
- ../prod/svc.yaml

helmCharts:
- name: victoria-metrics-k8s-stack
Expand Down
7 changes: 4 additions & 3 deletions victoriametrics/dev/svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ metadata:
name: victoriametrics
namespace: guardian
annotations:
service.beta.kubernetes.io/alibaba-cloud-loadbalancer-name: "victoriametrics-dev"
service.beta.kubernetes.io/alibaba-cloud-loadbalancer-spec: "slb.s1.small"
service.beta.kubernetes.io/alibaba-cloud-loadbalancer-address-type: "intranet"
networking.gke.io/load-balancer-type: "Internal"
# cloud.google.com/l4-rbs: "enabled"
networking.gke.io/internal-load-balancer-subnet: "dev-loadbalancer"
networking.gke.io/internal-load-balancer-allow-global-access: "true"
spec:
type: LoadBalancer
selector:
Expand Down
1 change: 1 addition & 0 deletions victoriametrics/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- additional-scrape-configs.yaml
- svc.yaml

helmCharts:
- name: victoria-metrics-k8s-stack
Expand Down
21 changes: 21 additions & 0 deletions victoriametrics/prod/svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: Service
metadata:
name: victoriametrics
namespace: guardian
annotations:
networking.gke.io/load-balancer-type: "Internal"
# cloud.google.com/l4-rbs: "enabled"
networking.gke.io/internal-load-balancer-subnet: "prod-loadbalancer"
networking.gke.io/internal-load-balancer-allow-global-access: "true"
spec:
type: LoadBalancer
selector:
app.kubernetes.io/component: monitoring
app.kubernetes.io/instance: victoriametrics
app.kubernetes.io/name: vmsingle
ports:
- name: http
protocol: TCP
port: 8429
targetPort: 8429

0 comments on commit 0c43e99

Please sign in to comment.