|
@@ -1,116 +0,0 @@
|
|
|
----
|
|
|
-apiVersion: apps/v1
|
|
|
-kind: StatefulSet
|
|
|
-metadata:
|
|
|
- name: nginx-material
|
|
|
- namespace: pro
|
|
|
- labels:
|
|
|
- app: nginx-material
|
|
|
-spec:
|
|
|
- serviceName: nginx-material
|
|
|
- replicas: 1
|
|
|
- selector:
|
|
|
- matchLabels:
|
|
|
- app: nginx-material
|
|
|
- template:
|
|
|
- metadata:
|
|
|
- labels:
|
|
|
- app: nginx-material
|
|
|
- spec:
|
|
|
- terminationGracePeriodSeconds: 180
|
|
|
- dnsPolicy: ClusterFirstWithHostNet
|
|
|
- dnsConfig:
|
|
|
- nameservers:
|
|
|
- - 223.5.5.5
|
|
|
- - 10.26.22.50
|
|
|
- initContainers:
|
|
|
- - name: init
|
|
|
- image: hub.evbj.easou.com/dev/busybox
|
|
|
- command: [ "chmod","777","-R","/data" ]
|
|
|
- imagePullPolicy: IfNotPresent
|
|
|
- volumeMounts:
|
|
|
- - name: volume
|
|
|
- mountPath: /data
|
|
|
- #nodeSelector:
|
|
|
- # app.touchrs: touchrs
|
|
|
-# affinity:
|
|
|
-# podAntiAffinity:
|
|
|
-# preferredDuringSchedulingIgnoredDuringExecution:
|
|
|
-# - weight: 100
|
|
|
-# podAffinityTerm:
|
|
|
-# labelSelector:
|
|
|
-# matchExpressions:
|
|
|
-# - key: app
|
|
|
-# operator: In
|
|
|
-# values:
|
|
|
-# - nginx-material
|
|
|
-# topologyKey: kubernetes.io/hostname
|
|
|
- containers:
|
|
|
- - name: nginx-material
|
|
|
- image: $JNLP_REPO/$JNLP_ENV/$DRONE_REPO_NAME:$JNLP_TAG
|
|
|
- imagePullPolicy: IfNotPresent
|
|
|
- ports:
|
|
|
- - containerPort: 80
|
|
|
- name: port
|
|
|
- volumeMounts:
|
|
|
- - name: volume
|
|
|
- mountPath: /data
|
|
|
- readinessProbe:
|
|
|
- tcpSocket:
|
|
|
- port: 80
|
|
|
- initialDelaySeconds: 40
|
|
|
- periodSeconds: 15
|
|
|
-# - image: hub.evbj.easou.com/pro/filebeat:7.13.3
|
|
|
-# imagePullPolicy: IfNotPresent
|
|
|
-# name: filebeat
|
|
|
-# volumeMounts:
|
|
|
-# - name: volume #日志同时挂载在nginx和filebeat中
|
|
|
-# mountPath: /data
|
|
|
-# - name: filebeat-config
|
|
|
-# mountPath: /usr/share/filebeat/filebeat.yml
|
|
|
-# subPath: filebeat.yml
|
|
|
-
|
|
|
- volumeClaimTemplates:
|
|
|
- - metadata:
|
|
|
- name: volume
|
|
|
- spec:
|
|
|
- accessModes: [ "ReadWriteOnce" ]
|
|
|
- storageClassName: rbd
|
|
|
- resources:
|
|
|
- requests:
|
|
|
- storage: 2000Gi
|
|
|
----
|
|
|
-apiVersion: v1
|
|
|
-kind: Service
|
|
|
-metadata:
|
|
|
- name: nginx-material-svc
|
|
|
- namespace: pro
|
|
|
- labels:
|
|
|
- app: nginx-material-svc
|
|
|
-spec:
|
|
|
- type: NodePort
|
|
|
- ports:
|
|
|
- - port: 80
|
|
|
- targetPort: 80
|
|
|
- name: "main"
|
|
|
- selector:
|
|
|
- app: nginx-material
|
|
|
----
|
|
|
-apiVersion: networking.k8s.io/v1
|
|
|
-kind: Ingress
|
|
|
-metadata:
|
|
|
- name: nginx-material-ingress
|
|
|
- namespace: pro
|
|
|
-spec:
|
|
|
- rules:
|
|
|
- - host: pro-nginx-material.ieasou.cn
|
|
|
- http:
|
|
|
- paths:
|
|
|
- - path: /
|
|
|
- pathType: Prefix
|
|
|
- backend:
|
|
|
- service:
|
|
|
- name: nginx-material-svc
|
|
|
- port:
|
|
|
- number: 80
|
|
|
- ingressClassName: nginx
|