|
@@ -16,6 +16,15 @@ spec:
|
|
|
labels:
|
|
|
app: $DRONE_REPO_NAME
|
|
|
spec:
|
|
|
+ terminationGracePeriodSeconds: 180
|
|
|
+ initContainers:
|
|
|
+ - name: init
|
|
|
+ image: $JNLP_REPO/dev/busybox
|
|
|
+ command: ["chmod","777","-R","$JNLP_MOUNT_PATH"]
|
|
|
+ imagePullPolicy: Always
|
|
|
+ volumeMounts:
|
|
|
+ - name: volume
|
|
|
+ mountPath: $JNLP_MOUNT_PATH
|
|
|
containers:
|
|
|
- name: $DRONE_REPO_NAME
|
|
|
image: $JNLP_REPO/$JNLP_ENV/$DRONE_REPO_NAME:$JNLP_TAG
|
|
@@ -33,6 +42,15 @@ spec:
|
|
|
port: $JNLP_CONTAINER_PORT
|
|
|
initialDelaySeconds: $JNLP_READINESS_INIT
|
|
|
periodSeconds: $JNLP_READINESS_PER
|
|
|
+ volumeClaimTemplates:
|
|
|
+ - metadata:
|
|
|
+ name: volume
|
|
|
+ spec:
|
|
|
+ accessModes: ["ReadWriteOnce"]
|
|
|
+ storageClassName: rbd
|
|
|
+ resources:
|
|
|
+ requests:
|
|
|
+ storage: $JNLP_STORAGE_CAPACITY
|
|
|
-------------
|
|
|
apiVersion: v1
|
|
|
kind: Service
|