mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-04-21 18:26:42 +00:00
111 lines
2.8 KiB
YAML
111 lines
2.8 KiB
YAML
---
|
|
apiVersion: apps/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
name: ide
|
|
name: ide
|
|
namespace: ide
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
name: ide
|
|
template:
|
|
metadata:
|
|
labels:
|
|
name: ide
|
|
spec:
|
|
serviceAccount: ide
|
|
serviceAccountName: ide
|
|
initContainers:
|
|
- name: git-clone-cluster
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- test -d /workspace/cluster || git clone -b master ssh://git@gitsrv/git-server/repos/cluster.git
|
|
image: stefanprodan/k9c:v2-gcloud
|
|
imagePullPolicy: IfNotPresent
|
|
volumeMounts:
|
|
- mountPath: /workspace
|
|
name: ide-workspace-data
|
|
- mountPath: /root/.ssh
|
|
name: ssh-git
|
|
- name: git-clone-podinfo
|
|
command:
|
|
- /bin/bash
|
|
- -c
|
|
- /root/gcp-clone.sh https://source.developers.google.com/p/dx-general/r/podinfo
|
|
image: stefanprodan/k9c:v2-gcloud
|
|
imagePullPolicy: IfNotPresent
|
|
volumeMounts:
|
|
- mountPath: /workspace
|
|
name: ide-workspace-data
|
|
- mountPath: /root/gcp-clone.sh
|
|
subPath: gcp-clone.sh
|
|
name: git-init
|
|
containers:
|
|
- name: ide
|
|
args:
|
|
- --auth
|
|
- username:password
|
|
image: stefanprodan/k9c:v2-gcloud
|
|
imagePullPolicy: IfNotPresent
|
|
livenessProbe:
|
|
failureThreshold: 3
|
|
httpGet:
|
|
httpHeaders:
|
|
- name: Authorization
|
|
value: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
|
|
path: /ide.html
|
|
port: http
|
|
scheme: HTTP
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 5
|
|
successThreshold: 1
|
|
timeoutSeconds: 1
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|
|
protocol: TCP
|
|
readinessProbe:
|
|
failureThreshold: 3
|
|
httpGet:
|
|
httpHeaders:
|
|
- name: Authorization
|
|
value: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
|
|
path: /ide.html
|
|
port: http
|
|
scheme: HTTP
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 1
|
|
successThreshold: 1
|
|
timeoutSeconds: 1
|
|
volumeMounts:
|
|
- mountPath: /workspace
|
|
name: ide-workspace-data
|
|
- mountPath: /var/run/docker.sock
|
|
name: dockersocket
|
|
- mountPath: /root/.ssh
|
|
name: ssh-git
|
|
volumes:
|
|
- name: ssh-git
|
|
secret:
|
|
defaultMode: 0600
|
|
secretName: ssh-git
|
|
- name: git-init
|
|
configMap:
|
|
defaultMode: 0744
|
|
name: k9-cfg
|
|
- name: dockersocket
|
|
hostPath:
|
|
path: /var/run/docker.sock
|
|
type: ""
|
|
- name: ide-workspace-data
|
|
emptyDir: {}
|
|
# - name: ide-workspace-data
|
|
# persistentVolumeClaim:
|
|
# claimName: ide-workspace-data
|