Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
commander-deploy
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpd
commander-deploy
Commits
df84d093
Commit
df84d093
authored
Oct 14, 2025
by
李辉02
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(添加ingress): plateform-api
parent
638ae3fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
2 deletions
+40
-2
ingress.yaml
charts/commander-plateform-api/templates/ingress.yaml
+27
-0
service.yaml
charts/commander-plateform-api/templates/service.yaml
+13
-2
No files found.
charts/commander-plateform-api/templates/ingress.yaml
0 → 100644
View file @
df84d093
apiVersion
:
networking.k8s.io/v1
kind
:
Ingress
metadata
:
annotations
:
nginx.ingress.kubernetes.io/rewrite-target
:
/$2
nginx.ingress.kubernetes.io/use-regex
:
"
true"
nginx.ingress.kubernetes.io/upstream-vhost
:
{{
printf "%s.%s.svc.cluster.local" .Chart.Name .Values.global.app.namespace
}}
name
:
{{
printf "%s-ingress" .Chart.Name
}}
namespace
:
default
spec
:
ingressClassName
:
nginx
tls
:
-
hosts
:
-
api.aipark.com
secretName
:
aipark-2025
rules
:
-
host
:
"
api.aipark.com"
http
:
paths
:
-
path
:
/api/2.0/{{ .Values.global.app.namespace}}/{{ .Chart.Name }}(/|$)(.*)
pathType
:
ImplementationSpecific
backend
:
service
:
name
:
{{
printf "%s-external" .Chart.Name
}}
# 指向default命名空间中的ExternalName Service
port
:
number
:
80
charts/commander-plateform-api/templates/service.yaml
View file @
df84d093
...
@@ -10,4 +10,15 @@ spec:
...
@@ -10,4 +10,15 @@ spec:
ports
:
ports
:
-
protocol
:
TCP
-
protocol
:
TCP
port
:
80
port
:
80
targetPort
:
{{
index .Values.global .Chart.Name "port"
}}
targetPort
:
{{
index .Values.global .Chart.Name "port"
}}
.
\ No newline at end of file
---
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
{{
printf "%s-external" .Chart.Name
}}
namespace
:
default
spec
:
type
:
ExternalName
externalName
:
{{
printf "%s.%s.svc.cluster.local" .Chart.Name .Values.global.app.namespace
}}
sessionAffinity
:
None
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment