12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- ---
- apiVersion: apps/v1
- kind: $JNLP_CONTROL
- metadata:
- name: $JNLP_CONTROL_NAME
- namespace: $JNLP_ENV
- labels:
- app: $JNLP_CONTROL_NAME
- spec:
- serviceName: $JNLP_CONTROL_NAME
- replicas: $JNLP_REPLICAS
- selector:
- matchLabels:
- app: $JNLP_CONTROL_NAME
- template:
- metadata:
- labels:
- app: $JNLP_CONTROL_NAME
- spec:
- terminationGracePeriodSeconds: 180
- initContainers:
- - name: init
- image: busybox
- command: ["chmod","777","-R","$JNLP_MOUNT_PATH"]
- imagePullPolicy: Always
- volumeMounts:
- - name: volume
- mountPath: $JNLP_MOUNT_PATH
- containers:
- - name: $JNLP_IMAGE
- image: $JNLP_HUB/$JNLP_ENV/$JNLP_IMAGE:$JNLP_TAG
- imagePullPolicy: Always
- ports:
- - containerPort: $JNLP_CONTAINER_PORT
- name: port
- volumeMounts:
- - name: volume
- mountPath: $JNLP_MOUNT_PATH
- 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
- volumeClaimTemplates:
- - metadata:
- name: volume
- spec:
- accessModes: ["ReadWriteOnce"]
- storageClassName: ceph
- resources:
- requests:
- storage: $JNLP_STORAGE_CAPACITY
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: $JNLP_CONTROL_NAME-svc
- namespace: $JNLP_ENV
- labels:
- app: $JNLP_CONTROL_NAME-svc
- spec:
- type: NodePort
- ports:
- - port: $JNLP_CONTAINER_PORT
- targetPort: $JNLP_CONTAINER_PORT
- selector:
- app: $JNLP_CONTROL_NAME
- ---
- apiVersion: extensions/v1beta1
- kind: Ingress
- metadata:
- name: $JNLP_CONTROL_NAME-ing
- namespace: $JNLP_ENV
- annotations:
- kubernetes.io/ingress.class: $JNLP_INGRESS
- spec:
- rules:
- hosts:
- - $JNLP_ENV-$JNLP_CONTROL_NAME$JNLP_DOMAIN
- - test-$JNLP_ENV-$JNLP_CONTROL_NAME$JNLP_DOMAIN
- http:
- paths:
- - path: /
- backend:
- serviceName: $JNLP_CONTROL_NAME-svc
- servicePort: $JNLP_CONTAINER_PORT
|