Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update ci #1785

Merged
merged 1 commit into from
Sep 6, 2023
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
9 changes: 9 additions & 0 deletions deploy/kubernetes/helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,15 @@ Create the name of the service account to use
location /log/ {
proxy_pass http://dongtai-logstash-svc:8082/;
}
{{- if .Values.max }}
location /doc/ {
proxy_pass http://dongtai-doc-svc/;
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header X-Host $http_x_forwarded_host;
}
{{- end }}
location = /50x.html {
root /usr/share/nginx/html;
}
Expand Down
43 changes: 43 additions & 0 deletions deploy/kubernetes/helm/templates/deployments/dongtai-doc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{{- if .Values.max }}
---
# dongtai-doc服务
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "dongtai.fullname" . }}-doc
namespace: {{.Release.Namespace}}
annotations:
kubesphere.io/description: {{ template "dongtai.fullname" . }}-doc
labels:
app: {{ template "dongtai.fullname" . }}-doc
{{- include "dongtai.labels" . | nindent 4 }}
spec:
replicas: {{.Values.replicaCount}}
selector:
matchLabels:
app: {{ template "dongtai.fullname" . }}-doc
{{- include "dongtai.labels" . | nindent 6 }}
template:
metadata:
annotations:
doc_number: {{.Values.build.server_number}}
labels:
app: {{ template "dongtai.fullname" . }}-doc
{{- include "dongtai.labels" . | nindent 8 }}
spec:
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
containers:
- name: {{ template "dongtai.fullname" . }}-doc-container
image: {{ .Values.images }}/dongtai-doc:{{ .Values.tag }}
imagePullPolicy: Always
resources:
limits:
cpu: 500m
memory: 500Mi
requests:
cpu: 500m
memory: 500Mi
{{- end }}
17 changes: 17 additions & 0 deletions deploy/kubernetes/helm/templates/service/dongtai-doc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.max }}
---
apiVersion: v1
kind: Service
metadata:
name: dongtai-doc-svc
namespace: {{.Release.Namespace}}
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80
selector:
app: {{ template "dongtai.fullname" . }}-doc
type: ClusterIP
{{- end }}
Loading