Hi,
I’m trying to implement drone as a kubernetes pod with server/agent containers living side by side. Here is a copy of my deployment:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: drone
namespace: staging
spec:
replicas: 1
minReadySeconds: 20
template:
metadata:
labels:
app: drone
spec:
imagePullSecrets:
- name: registrypullsecret
containers:
- name: drone-server
image: drone/drone:0.7
imagePullPolicy: Always
env:
- name: DRONE_OPEN
value: "true"
- name: DRONE_ORGS
value: *********
- name: DRONE_ADMIN
value: ******
- name: DRONE_GITHUB
value: "true"
- name: DRONE_GITHUB_CLIENT
value: ***************
- name: DRONE_GITHUB_SECRET
value: ***************
- name: DRONE_SECRET
value: testing123
ports:
- containerPort: 80
- containerPort: 8000
volumeMounts:
- name: podinfo
mountPath: /mnt/annotations
readOnly: false
- name: drone-persistent-storage
mountPath: /var/lib/drone
readOnly: false
- name: drone-agent
command: ["agent"]
image: drone/drone:0.7
imagePullPolicy: Always
env:
- name: BRANCH_STAGE
value: staging
- name: ANNOTATIONS_FILE
value: /mnt/annotations/annotations
- name: DRONE_SERVER
value: ws://drone-server:8000/ws/broker
- name: DRONE_SECRET
value: testing123
volumeMounts:
- name: podinfo
mountPath: /mnt/annotations
readOnly: false
- name: docker-socket
mountPath: /var/run/docker.sock
readOnly: false
- name: drone-persistent-storage
mountPath: /var/lib/drone
readOnly: false
volumes:
- name: podinfo
downwardAPI:
items:
- path: "annotations"
fieldRef:
fieldPath: metadata.annotations
- name: drone-persistent-storage
awsElasticBlockStore:
volumeID: vol-0e183010b26ef1
fsType: ext4
- name: docker-socket
hostPath:
path: /var/run/docker.sock
The problem is the agent container refuses to start with “failed to “StartContainer” for “drone-agent” with RunContainerError: “runContainer: Error response from daemon: Container command ‘agent’ not found or does not exist.””
Am I missing something while converting the docker-compose to a deployment yaml.