From 530defbfdada9a09eb42f12fdb2000e9d7af6900 Mon Sep 17 00:00:00 2001 From: wb-wc495872 Date: Fri, 1 Mar 2024 14:07:07 +0800 Subject: [PATCH] update service type and annfinity --- .../audit-apiserver/audit-apiserver-ds.yaml | 6 ++- .../templates/filebeat/filebeat-ds.yaml | 9 ++++- .../templates/lunettes/lunettes-deploy.yaml | 11 ------ deploy/helm/lunettes/values.yaml | 2 +- docs/quick_start.md | 38 +++++++------------ 5 files changed, 25 insertions(+), 41 deletions(-) diff --git a/deploy/helm/lunettes/templates/audit-apiserver/audit-apiserver-ds.yaml b/deploy/helm/lunettes/templates/audit-apiserver/audit-apiserver-ds.yaml index 1ed5e45b..d2b32d65 100644 --- a/deploy/helm/lunettes/templates/audit-apiserver/audit-apiserver-ds.yaml +++ b/deploy/helm/lunettes/templates/audit-apiserver/audit-apiserver-ds.yaml @@ -20,8 +20,10 @@ spec: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: node-role.kubernetes.io/master - operator: Exists + - key: kubernetes.io/hostname + operator: In + values: + - master tolerations: - key: node-role.kubernetes.io/control-plane operator: Exists diff --git a/deploy/helm/lunettes/templates/filebeat/filebeat-ds.yaml b/deploy/helm/lunettes/templates/filebeat/filebeat-ds.yaml index 89c5f024..176feb7f 100644 --- a/deploy/helm/lunettes/templates/filebeat/filebeat-ds.yaml +++ b/deploy/helm/lunettes/templates/filebeat/filebeat-ds.yaml @@ -52,13 +52,18 @@ spec: - key: "node-role.kubernetes.io/master" operator: "Exists" effect: "NoSchedule" + - key: node-role.kubernetes.io/control-plane + operator: Exists + effect: NoSchedule affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: # 硬策略 nodeSelectorTerms: - matchExpressions: - - key: node-role.kubernetes.io/master - operator: Exists + - key: kubernetes.io/hostname + operator: In + values: + - master volumes: - configMap: defaultMode: 420 diff --git a/deploy/helm/lunettes/templates/lunettes/lunettes-deploy.yaml b/deploy/helm/lunettes/templates/lunettes/lunettes-deploy.yaml index 174e5945..5c70a898 100644 --- a/deploy/helm/lunettes/templates/lunettes/lunettes-deploy.yaml +++ b/deploy/helm/lunettes/templates/lunettes/lunettes-deploy.yaml @@ -108,17 +108,6 @@ spec: resources: {{ toYaml .Values.lunettesResources | indent 10 }} serviceAccountName: lunettes-sa - tolerations: - - key: "node-role.kubernetes.io/master" - operator: "Exists" - effect: "NoSchedule" - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: # 硬策略 - nodeSelectorTerms: - - matchExpressions: - - key: node-role.kubernetes.io/master - operator: Exists volumes: - hostPath: path: {{ .Values.lunettesLogsHostPath }} diff --git a/deploy/helm/lunettes/values.yaml b/deploy/helm/lunettes/values.yaml index 957d2bdc..f77e8b6a 100644 --- a/deploy/helm/lunettes/values.yaml +++ b/deploy/helm/lunettes/values.yaml @@ -29,7 +29,7 @@ lunettesImage: lunettes/lunettes:latest lunettesNodeport: 30880 lunettesLogsPath: /logs lunettesLogsHostPath: /home/var/logs/lunettes -lunettesType: LoadBalancer +lunettesType: NodePort apiserverEnabled: true traceEnable: false lunettesResources: diff --git a/docs/quick_start.md b/docs/quick_start.md index 03ba1612..0668e80a 100644 --- a/docs/quick_start.md +++ b/docs/quick_start.md @@ -1,14 +1,11 @@ - -## Dependency - -1. [install Docker](https://docs.docker.com/get-docker/) -2. [kubectl](https://kubernetes.io/docs/tasks/tools/) -3. [Installing Helm](https://helm.sh/docs/intro/install/) - # Deploy Lunettes with kind quickly -[kind](https://kind.sigs.k8s.io/) +## Dependency +1. [kind](https://kind.sigs.k8s.io/) +2. [install Docker](https://docs.docker.com/get-docker/) +3. [kubectl](https://kubernetes.io/docs/tasks/tools/) +4. [Installing Helm](https://helm.sh/docs/intro/install/) ## Running local Kubernetes clusters @@ -22,20 +19,15 @@ kind create cluster \ --config ./hack/kind.yaml ``` -# Deploy Lunettes with kind quickly - -[minikube](https://minikube.sigs.k8s.io/docs/start/) - -## Running Kubernetes v1.22.2 - -```bash -minikube start --kubernetes-version=v1.22.2 -``` - ## Deploy Lunettes with helm ```bash -helm install lunettes oci://registry-1.docker.io/lunettes/lunettes-chart --version [version] --set enableAuditApiserver=true +helm install lunettes oci://registry-1.docker.io/lunettes/lunettes-chart --version [version] \ + --set enableAuditApiserver=true \ + --set lunettesType=NodePort \ + --set grafanadiType=NodePort \ + --set grafanaType=NodePort \ + --set jaegerType=NodePort ``` see available [version](https://hub.docker.com/r/lunettes/lunettes-chart/tags) @@ -45,7 +37,7 @@ see available [version](https://hub.docker.com/r/lunettes/lunettes-chart/tags) kubectl run nginx --image=nginx ``` -## Visit(deploy by kind) +## Visit Open broswer to visit - lunettes @@ -56,8 +48,4 @@ Open broswer to visit - debugslo: [http://localhost:9097/d/lunettes-debugslo/lunettes-debugslo?orgId=1](http://localhost:9097/d/lunettes-debugslo/lunettes-debugslo?orgId=1) - jaejer: [http://localhost:9095/search](http://localhost:9095/search) - kibana: [http://localhost:9092](http://localhost:9092) -- prometheus: [http://localhost:9091/graph?](http://localhost:9091/graph?) - -## Visit(deploy by minikube) - -- minikube service grafana -n lunettes (The default username and password are admin/admin) \ No newline at end of file +- prometheus: [http://localhost:9091/graph?](http://localhost:9091/graph?) \ No newline at end of file