Skip to content

Instantly share code, notes, and snippets.

@mysticrenji
Last active Oct 28, 2020
Embed
What would you like to do?
apiVersion: apps/v1
kind: Deployment
metadata:
name: aziot-devops-agent-deployment
labels:
app: aziot-devops-agent-deployment
spec:
replicas: 2
selector:
matchLabels:
app: aziot-devops-agent-deployment
template:
metadata:
labels:
app: aziot-devops-agent-deployment
spec:
securityContext:
fsGroup: 995 # Group ID of docker group
containers:
- name: dockeragent
image: mysticrenji/azdevopsagentsiotedgeamd64:latest
env:
- name: AZP_TOKEN
valueFrom:
secretKeyRef:
name: azdo-secret-config
key: AZP_TOKEN
- name: AZP_URL
valueFrom:
configMapKeyRef:
name: azdo-environment-config
key: AZP_URL
- name: AZP_AGENT_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: AZP_POOL
valueFrom:
configMapKeyRef:
name: azdo-environment-config
key: AZP_POOL
volumeMounts:
- name: dockersock
mountPath: "/var/run/docker.sock"
volumes:
- name: dockersock
hostPath:
path: /var/run/docker.sock
---
apiVersion: v1
kind: Secret
metadata:
name: azdo-secret-config
data:
AZP_TOKEN: <PAT Token Encoded in Base64>
---
apiVersion: v1
kind: ConfigMap
metadata:
name: azdo-environment-config
data:
AZP_URL: https://dev.azure.com/<ORGNAME>/ # Change your Az Devops organization here
AZP_AGENT_NAME: <AGENTNAME>
AZP_POOL: <AGENTPOOL> # App Pool Name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment