-
Notifications
You must be signed in to change notification settings - Fork 3
/
example-deployment.yml
55 lines (54 loc) · 1.23 KB
/
example-deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: netbox-ip-controller
name: netbox-ip-controller
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: netbox-ip-controller
template:
metadata:
labels:
app: netbox-ip-controller
spec:
serviceAccountName: netbox-ip-controller
containers:
name: controller
image: digitalocean/netbox-ip-controller:<tag>
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8001 # for metrics
protocol: TCP
- env:
- name: NETBOX_API_URL
value: https://some-netbox-api.example.com/api
- name: NETBOX_TOKEN
valueFrom:
secretKeyRef:
key: netbox-token
name: netbox-ip-controller
- name: POD_PUBLISH_LABELS
value: app,k8s-app
- name: SERVICE_PUBLISH_LABELS
value: app,k8s-app
---
apiVersion: v1
kind: Secret
metadata:
labels:
app: netbox-ip-controller
name: netbox-ip-controller
namespace: default
type: Opaque
data:
netbox-token: your-token-base64-encoded
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: netbox-ip-controller
namespace: default