Skip to content

Commit

Permalink
recover svc service & resources requests
Browse files Browse the repository at this point in the history
  • Loading branch information
LearningGp committed Feb 23, 2023
1 parent ff379d3 commit 4a6c895
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ spec:
value: {{ .Values.MSE_DEBUG_HOST }}
{{ end }}
name: "spring-cloud-zuul"
resources:
{{ if .Values.resources.enableRequests }}
requests:
cpu: 1
memory: 2Gi
{{ end }}
limits:
cpu: 1
memory: 2Gi
ports:
- containerPort: 20000
hostAliases:
Expand Down
13 changes: 13 additions & 0 deletions mse-simple-demo/helm/mse-simple-demo/templates/sc-a-svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: sc-a
namespace: {{ .Release.Namespace }}
spec:
ports:
- port: 20001
protocol: TCP
targetPort: 20001
selector:
app: spring-cloud-a
type: ClusterIP
13 changes: 13 additions & 0 deletions mse-simple-demo/helm/mse-simple-demo/templates/sc-b-svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: sc-b
namespace: {{ .Release.Namespace }}
spec:
ports:
- port: 20002
protocol: TCP
targetPort: 20002
selector:
app: spring-cloud-b
type: ClusterIP
13 changes: 13 additions & 0 deletions mse-simple-demo/helm/mse-simple-demo/templates/sc-c-svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: sc-c
namespace: {{ .Release.Namespace }}
spec:
ports:
- port: 20003
protocol: TCP
targetPort: 20003
selector:
app: spring-cloud-c
type: ClusterIP
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ spec:
- name: MSE_DEBUG_HOST
value: {{ .Values.MSE_DEBUG_HOST }}
{{ end }}
resources:
{{ if .Values.resources.enableRequests }}
requests:
cpu: 1
memory: 2Gi
{{ end }}
limits:
cpu: 1
memory: 2Gi
ports:
- name: http-port
containerPort: 20001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ spec:
- name: MSE_DEBUG_HOST
value: {{ .Values.MSE_DEBUG_HOST }}
{{ end }}
resources:
{{ if .Values.resources.enableRequests }}
requests:
cpu: 1
memory: 2Gi
{{ end }}
limits:
cpu: 1
memory: 2Gi
ports:
- name: http-port
containerPort: 20001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ spec:
- name: MSE_DEBUG_HOST
value: {{ .Values.MSE_DEBUG_HOST }}
{{ end }}
resources:
{{ if .Values.resources.enableRequests }}
requests:
cpu: 1
memory: 2Gi
{{ end }}
limits:
cpu: 1
memory: 2Gi
ports:
- name: http-port
containerPort: 20002
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ spec:
- name: MSE_DEBUG_HOST
value: {{ .Values.MSE_DEBUG_HOST }}
{{ end }}
resources:
{{ if .Values.resources.enableRequests }}
requests:
cpu: 1
memory: 2Gi
{{ end }}
limits:
cpu: 1
memory: 2Gi
ports:
- name: http-port
containerPort: 20003
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ spec:
- name: MSE_DEBUG_HOST
value: {{ .Values.MSE_DEBUG_HOST }}
{{ end }}
resources:
{{ if .Values.resources.enableRequests }}
requests:
cpu: 1
memory: 2Gi
{{ end }}
limits:
cpu: 1
memory: 2Gi
ports:
- name: http-port
containerPort: 20002
Expand Down
3 changes: 3 additions & 0 deletions mse-simple-demo/helm/mse-simple-demo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ nacos:
namespace: public

autoscaling: false

resources:
enableRequests: false

0 comments on commit 4a6c895

Please sign in to comment.