Browse Source

update

master
dengbiao 2 months ago
parent
commit
ecbe9b1539
6 changed files with 35 additions and 7 deletions
  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 View File

@@ -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 View File

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


+ 1
- 1
docs/swagger.json View File

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


+ 1
- 1
docs/swagger.yaml View File

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


+ 14
- 3
k8s/container.yaml View File

@@ -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 View File

@@ -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

Loading…
Cancel
Save