-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathonboarding-server.yml
198 lines (198 loc) · 5.37 KB
/
onboarding-server.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
---
apiVersion: v1
kind: Service
metadata:
labels:
app: fdo
fdo-service: owner-onboarding
name: onboarding-server-svc
spec:
ports:
- protocol: TCP
port: 9003
targetPort: 9003
selector:
app: fdo
fdo-service: owner-onboarding
type: NodePort
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: onboarding-server-ingress
labels:
app: fdo
fdo-service: owner-onboarding
spec:
ingressClassName: nginx
rules:
- host: onboarding-192.168.122.70.sslip.io
http:
paths:
- backend:
service:
name: onboarding-server-svc
port:
number: 9003
path: /
pathType: Prefix
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: onboarding-server
labels:
app: fdo
fdo-service: owner-onboarding
spec:
replicas: 1
selector:
matchLabels:
app: fdo
fdo-service: owner-onboarding
template:
metadata:
annotations:
labels:
app: fdo
fdo-service: owner-onboarding
name: onboarding-server
spec:
containers:
- image: quay.io/fido-fdo/owner-onboarding-server:latest
name: owner-onboarding-server
ports:
- containerPort: 9003
volumeMounts:
- name: owner-onboarding-config
mountPath: /etc/fdo/owner-onboarding-server.conf.d/
readOnly: true
- name: ownership-vouchers
mountPath: /etc/fdo/ownership_vouchers
- name: owner-cert
mountPath: /etc/fdo/keys/owner_cert.pem
subPath: owner_cert.pem
readOnly: true
- name: owner-key
mountPath: /etc/fdo/keys/owner_key.der
subPath: owner_key.der
readOnly: true
- name: device-ca-cert-chain
mountPath: /etc/fdo/keys/device_ca_cert.pem
subPath: device_ca_cert.pem
readOnly: true
- name: sessions
mountPath: /etc/fdo/sessions
# securityContext:
# allowPrivilegeEscalation: false
# capabilities:
# drop: ["ALL"]
- image: quay.io/fido-fdo/serviceinfo-api-server:latest
name: serviceinfo-api-server
ports:
- containerPort: 9004
volumeMounts:
- name: serviceinfo-api-config
mountPath: /etc/fdo/serviceinfo-api-server.conf.d/
readOnly: true
- name: device-specific-serviceinfo
mountPath: /etc/fdo/device_specific_serviceinfo
# ServiceInfoFiles:
# - name: service-info-file-1
# mountPath: /etc/fdo/files/service-info-file-1
# readOnly: true
# securityContext:
# allowPrivilegeEscalation: false
# capabilities:
# drop: ["ALL"]
volumes:
- name: owner-onboarding-config
configMap:
name: owner-onboarding-config
- name: owner-cert
secret:
secretName: owner-cert-pem
- name: owner-key
secret:
secretName: owner-key-der
- name: device-ca-cert-chain
secret:
secretName: device-ca-cert-pem
- name: ownership-vouchers
emptyDir: {}
# persistentVolumeClaim:
# claimName: fdo-ownership-vouchers-pvc
- name: sessions
emptyDir: {}
- name: serviceinfo-api-config
configMap:
name: serviceinfo-api-config
- name: device-specific-serviceinfo
emptyDir: {}
# ServiceInfoFiles:
# - name: service-info-file-1
# configMap:
# name: fdo-service-info-file-1
# securityContext:
# runAsNonRoot: true
# seccompProfile:
# type: RuntimeDefault
---
apiVersion: v1
kind: ConfigMap
metadata:
name: owner-onboarding-config
labels:
app: fdo
fdo-service: owner-onboarding
data:
owner-onboarding-server.yml: |+
---
session_store_driver:
Directory:
path: /etc/fdo/sessions
ownership_voucher_store_driver:
Directory:
path: /etc/fdo/ownership_vouchers/
trusted_device_keys_path: /etc/fdo/keys/device_ca_cert.pem
owner_private_key_path: /etc/fdo/keys/owner_key.der
owner_public_key_path: /etc/fdo/keys/owner_cert.pem
owner_addresses:
- transport: HTTP
port: 80
addresses:
- dns_name: onboarding-192.168.122.70.sslip.io
# - ip_address: 192.168.122.1
report_to_rendezvous_endpoint_enabled: false
ov_registration_period: 600
ov_re_registration_window: 61
bind: 0.0.0.0:9003
service_info_api_url: "http://localhost:9004/device_info"
service_info_api_authentication:
BearerToken:
token: TestAuthToken
---
apiVersion: v1
kind: ConfigMap
metadata:
name: serviceinfo-api-config
labels:
app: fdo
fdo-service: owner-onboarding
data:
serviceinfo-api-server.yml: |+
---
bind: 0.0.0.0:9004
device_specific_store_driver:
Directory:
path: /etc/fdo/device_specific_serviceinfo
service_info_auth_token: TestAuthToken
# admin_auth_token: TestAdminToken
service_info:
commands:
- command: ls
args:
- /etc/hosts
return_stdout: true
return_stderr: true
after_onboarding_reboot: true