yapi部署yaml

明月清风 2020-07-27 233浏览 0条评论
首页/正文
分享到: / / / /

https://hub.docker.com/r/jayfong/yapi

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: yapi
  name: yapi
  namespace: public-service
spec:
  selector:
    matchLabels:
      app: yapi
  template:
    metadata:
      labels:
        app: yapi
    spec:
      containers:
      - env:
        - name: YAPI_ADMIN_ACCOUNT
          value: admin@admin.com
        - name: YAPI_ADMIN_PASSWORD
          value: ***
        - name: YAPI_CLOSE_REGISTER
          value: "true"
        - name: YAPI_DB_AUTH_SOURCE
          value: admin
        - name: YAPI_DB_DATABASE
          value: yapi
        - name: YAPI_DB_PASS
          value: ***
        - name: YAPI_DB_PORT
          value: "3717"
        - name: YAPI_DB_SERVERNAME
          value: ***
        - name: YAPI_DB_USER
          value: root
        - name: YAPI_LDAP_LOGIN_BASE_DN
          value: cn=admin,dc=***,dc=com
        - name: YAPI_LDAP_LOGIN_BIND_PASSWORD
          value: ***
        - name: YAPI_LDAP_LOGIN_ENABLE
          value: "true"
        - name: YAPI_LDAP_LOGIN_SEARCH_DN
          value: ou=people,dc=***,dc=com
        - name: YAPI_LDAP_LOGIN_SEARCH_STANDARD
          value: uid
        - name: YAPI_LDAP_LOGIN_SERVER
          value: ldap://openldap
        - name: YAPI_LDAP_LOGIN_USERNAME_KEY
          value: sn
        - name: YAPI_MAIL_AUTH_PASS
          value: ***
        - name: YAPI_MAIL_AUTH_USER
          value: system@***.com
        - name: YAPI_MAIL_ENABLE
          value: "true"
        - name: YAPI_MAIL_FROM
          value: system@***.com
        - name: YAPI_MAIL_HOST
          value: smtp.exmail.qq.com
        - name: YAPI_MAIL_PORT
          value: "465"
        - name: YAPI_NPM_REGISTRY
          value: https://registry.npm.taobao.org/
        image: jayfong/yapi:1.9.2
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 3
          initialDelaySeconds: 300
          periodSeconds: 10
          successThreshold: 1
          tcpSocket:
            port: 3000
          timeoutSeconds: 30
        name: yapi
        ports:
        - containerPort: 3000
          name: 3000tcp02
          protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
 
  labels:
    app: yapi
  name: yapi
  namespace: public-service
spec:
  ports:
  - name: yapi
    port: 3000
    protocol: TCP
    targetPort: 3000
  selector:
    app: yapi
  type: ClusterIP
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: 200m
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
  name: yapi
  namespace: public-service
spec:
  rules:
  - host: ***.com
    http:
      paths:
      - backend:
          serviceName: yapi
          servicePort: 3000
        path: /
  tls:
  - secretName: ***.com

 

最后修改:2020-07-27 16:34:04 © 著作权归作者所有
如果觉得我的文章对你有用,请随意赞赏
扫一扫支付

上一篇
登录即可评论哦~

评论列表

还没有人评论哦~赶快抢占沙发吧~