| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- ---
- apiVersion: apps/v1
- kind: $JNLP_CONTROL
- metadata:
- name: $DRONE_REPO_NAME
- namespace: $JNLP_ENV
- labels:
- app: $DRONE_REPO_NAME
- spec:
- serviceName: $DRONE_REPO_NAME
- replicas: $JNLP_REPLICAS
- selector:
- matchLabels:
- app: $DRONE_REPO_NAME
- template:
- metadata:
- labels:
- app: $DRONE_REPO_NAME
- spec:
- terminationGracePeriodSeconds: 180
- dnsPolicy: None
- dnsConfig:
- nameservers:
- - 10.26.22.50
- - 223.6.6.6
- containers:
- - name: $DRONE_REPO_NAME
- image: $JNLP_REPO/$JNLP_ENV/$DRONE_REPO_NAME:$JNLP_TAG
- imagePullPolicy: Always
- env:
- - name: JAVA_OPTS
- value: $JNLP_JAVA_OPTS -Dserver.port=$JNLP_CONTAINER_PORT -Dspring.profiles.active=$JNLP_ACTIVE_PROFILE
- ports:
- - containerPort: $JNLP_CONTAINER_PORT
- name: port
- lifecycle:
- preStop:
- exec:
- command: ["/bin/sh","-c","curl -H 'loginName:admin' -H 'password:ea1so2ua3dm4in5' -X POST 127.0.0.1:8080/actuator/shutdown"]
- livenessProbe:
- tcpSocket:
- port: $JNLP_CONTAINER_PORT
- initialDelaySeconds: $JNLP_LIVENESS_INIT
- periodSeconds: $JNLP_LIVENESS_PER
- readinessProbe:
- tcpSocket:
- port: $JNLP_CONTAINER_PORT
- initialDelaySeconds: $JNLP_READINESS_INIT
- periodSeconds: $JNLP_READINESS_PER
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: $DRONE_REPO_NAME-svc
- namespace: $JNLP_ENV
- labels:
- app: $DRONE_REPO_NAME-svc
- spec:
- type: NodePort
- ports:
- - port: $JNLP_CONTAINER_PORT
- targetPort: $JNLP_CONTAINER_PORT
- selector:
- app: $DRONE_REPO_NAME
- ---
- apiVersion: networking.k8s.io/v1
- kind: Ingress
- metadata:
- name: $DRONE_REPO_NAME-ingress
- namespace: $JNLP_ENV
- spec:
- rules:
- - host: $JNLP_ENV-$DRONE_REPO_NAME$JNLP_DOMAIN
- http:
- paths:
- - path: /
- pathType: Prefix
- backend:
- service:
- name: $DRONE_REPO_NAME-svc
- port:
- number: $JNLP_CONTAINER_PORT
- ingressClassName: nginx
|