Skip to content

Commit 9b4ae24

Browse files
authored
Add flooefi back to sandbox/staging platforms as a core experiment (#934)
* Revert "Removes floofi daemonset and related configs" This reverts commit 8b5ad87. * Adds Google-internal service "flooefi" back to sandbox and staging nodes This will only run on hardware and circuits donated by Google. * References netattachdef index 7 by namespace flooefi runs in the "flooefi" namespace, but needs to load a Network Attachment Definition from the default namespace. I _think_ this change may accomplish that? * Adds single quotes around netattachdef value for flooefi DS
1 parent 344bdb4 commit 9b4ae24

File tree

3 files changed

+86
-0
lines changed

3 files changed

+86
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
local expName = 'flooefi';
2+
3+
{
4+
apiVersion: 'apps/v1',
5+
kind: 'DaemonSet',
6+
metadata: {
7+
name: expName,
8+
namespace: expName,
9+
},
10+
spec: {
11+
selector: {
12+
matchLabels: {
13+
workload: expName,
14+
},
15+
},
16+
template: {
17+
metadata: {
18+
annotations: {
19+
'k8s.v1.cni.cncf.io/networks': 'default/index2ip-index-7-conf',
20+
'prometheus.io/scrape': 'true',
21+
'prometheus.io/scheme': 'http'
22+
},
23+
labels: {
24+
workload: expName,
25+
},
26+
},
27+
spec: {
28+
containers: [
29+
{
30+
args: [
31+
'--floo_client_debug_string=$(HOSTNAME)',
32+
],
33+
env: [
34+
{
35+
name: 'DNS_RESOLVERS',
36+
value: '8.8.8.8,8.8.4.4',
37+
},
38+
{
39+
name: 'HOSTNAME',
40+
valueFrom: {
41+
fieldRef: {
42+
fieldPath: 'spec.nodeName',
43+
},
44+
},
45+
},
46+
],
47+
image: 'gcr.io/google.com/floonet/flooefi-prod:latest',
48+
name: expName,
49+
ports: [
50+
{
51+
containerPort: 33465,
52+
},
53+
],
54+
},
55+
],
56+
nodeSelector: {
57+
'mlab/type': 'physical',
58+
'mlab/donated': 'false',
59+
},
60+
dnsConfig: {
61+
options: [
62+
{
63+
name: 'ndots',
64+
value: '2',
65+
},
66+
],
67+
}
68+
},
69+
},
70+
updateStrategy: {
71+
rollingUpdate: {
72+
maxUnavailable: 2,
73+
},
74+
type: 'RollingUpdate',
75+
},
76+
},
77+
}

manage-cluster/apply_k8s_configs.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ fi
4040
# ... but otherwise it can't really hurt.
4141
gcloud --quiet components update kubectl
4242

43+
# A seperate namespace for experimenting with deploying a Google-internal
44+
# service named flooefi in sandbox and staging.
45+
kubectl create namespace flooefi --dry-run=client -o json | kubectl apply -f -
46+
4347
# We call 'kubectl apply -f system.json' several times because kubectl doesn't
4448
# support defining and declaring certain objects in the same file. This is a
4549
# bug in kubectl, and so we call it twice here and a final time at the end of

system.jsonnet

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
// uncomment the following line.
3939
//import 'k8s/daemonsets/experiments/responsiveness.jsonnet',
4040
] else []
41+
) + (
42+
if std.extVar('PROJECT_ID') != 'mlab-oti' then [
43+
// A internal Google service used only on equipment and circuits donated by Google.
44+
import 'k8s/daemonsets/core/flooefi.jsonnet',
45+
] else []
4146
) + [
4247
// Deployments
4348
import 'k8s/deployments/kube-state-metrics.jsonnet',

0 commit comments

Comments
 (0)