Bläddra i källkod

update

master
dengbiao 3 månader sedan
förälder
incheckning
ecbe9b1539
6 ändrade filer med 35 tillägg och 7 borttagningar
  1. +1
    -1
      app/hdl/hdl_login.go
  2. +1
    -1
      docs/docs.go
  3. +1
    -1
      docs/swagger.json
  4. +1
    -1
      docs/swagger.yaml
  5. +14
    -3
      k8s/container.yaml
  6. +17
    -0
      k8s/ingress.yaml

+ 1
- 1
app/hdl/hdl_login.go Visa fil

@@ -18,7 +18,7 @@ import (
// @Description 登入
// @Accept json
// @Produce json
// @Param req body md.LoginReq true "用户名密码"
// @Param req body md.LoginReq true "用户名密码"
// @Success 200 {object} md.LoginResponse "token"
// @Failure 400 {object} md.Response "具体错误"
// @Router /admin/login [post]


+ 1
- 1
docs/docs.go Visa fil

@@ -40,7 +40,7 @@ const docTemplate = `{
"summary": "登陆",
"parameters": [
{
"description": "用户名密码",
"description": "用户名密码",
"name": "req",
"in": "body",
"required": true,


+ 1
- 1
docs/swagger.json Visa fil

@@ -32,7 +32,7 @@
"summary": "登陆",
"parameters": [
{
"description": "用户名密码",
"description": "用户名密码",
"name": "req",
"in": "body",
"required": true,


+ 1
- 1
docs/swagger.yaml Visa fil

@@ -153,7 +153,7 @@ paths:
- application/json
description: 登入
parameters:
- description: 用户名密码
- description: 用户名密码
in: body
name: req
required: true


+ 14
- 3
k8s/container.yaml Visa fil

@@ -35,13 +35,24 @@ spec:
# 这里的名字就是前面创建的configMap的名字
name: advertisement-medium-cfg
defaultMode: 420
# pvc
- name: advertisement-medium-pvc # 在该部署中的名称,后面使用改名称挂载
persistentVolumeClaim:
claimName: advertisement-medium-pvc # pvc的名称
# Nginx配置
- name: advertisement-medium-nginx
configMap:
name: advertisement-medium-nginx # 外部configMap的名称
items:
- key: go.conf
path: default.conf
containers:
# 主容器
- name: advertisement-medium-container
# 镜像地址(提前打包好并推送的镜像仓库)
image: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/advertisement-medium:0.0.1'
ports:
- name: advertisement-tcp-1004
- name: ad-medium-1004
# 容器端口号(注意与golang web server启动的端口一致)
containerPort: 1004
protocol: TCP
@@ -56,8 +67,8 @@ spec:
mountPath: /var/zyos
imagePullPolicy: Always
# Nginx 容器
- name: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/nginx:latest'
image: nginx
- name: nginx
image: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/nginx:latest'
ports:
- name: http-80
containerPort: 80


+ 17
- 0
k8s/ingress.yaml Visa fil

@@ -0,0 +1,17 @@
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: advertisement-medium # ingress名称
namespace: advertisement
annotations:
kubesphere.io/creator: dengbiao
spec:
rules:
- host: 123456.medium.dengbiao.top # 使用的域名
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
serviceName: advertisement-medium # 流量转发到的服务
servicePort: 80

Laddar…
Avbryt
Spara