Skip to content
This repository was archived by the owner on Dec 3, 2021. It is now read-only.

Commit 202bc54

Browse files
committed
Catch up
Signed-off-by: Matt Oswalt <[email protected]>
1 parent 94b66c9 commit 202bc54

9 files changed

+335
-214
lines changed

Vagrantfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Vagrant.configure("2") do |config|
103103
# end
104104

105105
# /shared
106-
config.vm.synced_folder "../nrelabs-curriculum", "/antidote", type: "nfs"
106+
config.vm.synced_folder "../nrelabs-curriculum", "/curriculum", type: "nfs"
107107

108108
# Disable default synced folder
109109
config.vm.synced_folder ".", "/vagrant", disabled: true

antidote-config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22

33
# Antidote Version
4-
version: "0.4.0"
4+
version: "0.6.0"
55

66
# Customizable configuration options are provided here for the vagrant up command.
77
# This is used in conjuction with the vagrantfile. Any changes in this file require
88
# vagrant reload --provision
99
#
1010
vm_config:
11-
memory: 8192
11+
memory: 4096
1212
cores: 2
1313
provider: virtualbox

manifests/acore.yaml

+188
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
---
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: antidotesa
6+
namespace: default
7+
8+
---
9+
apiVersion: rbac.authorization.k8s.io/v1
10+
kind: ClusterRole
11+
metadata:
12+
name: antidote-role
13+
namespace: default
14+
rules:
15+
- apiGroups:
16+
- '*'
17+
resources:
18+
- '*'
19+
verbs:
20+
- '*'
21+
- nonResourceURLs:
22+
- '*'
23+
verbs:
24+
- '*'
25+
26+
---
27+
apiVersion: rbac.authorization.k8s.io/v1
28+
kind: ClusterRoleBinding
29+
metadata:
30+
name: antidote-binding
31+
namespace: default
32+
roleRef:
33+
apiGroup: rbac.authorization.k8s.io
34+
kind: ClusterRole
35+
name: antidote-role
36+
subjects:
37+
- kind: ServiceAccount
38+
name: antidotesa
39+
40+
41+
---
42+
apiVersion: v1
43+
kind: ConfigMap
44+
metadata:
45+
name: acore-conf
46+
labels:
47+
name: acore-conf
48+
data:
49+
antidote-config.yml: |-
50+
curriculumDir: /curriculum
51+
instanceId: selfmedicate
52+
alwaysPull: false
53+
tier: local
54+
domain: antidote-local
55+
enabledServices:
56+
- api
57+
- stats
58+
- scheduler
59+
60+
---
61+
apiVersion: extensions/v1beta1
62+
kind: Deployment
63+
metadata:
64+
name: acore
65+
spec:
66+
replicas: 1
67+
revisionHistoryLimit: 3
68+
template:
69+
metadata:
70+
name: acore
71+
labels:
72+
app: acore
73+
antidote_role: infra
74+
spec:
75+
initContainers:
76+
- name: copy-local-files
77+
image: antidotelabs/deployer
78+
env:
79+
- name: SOURCE_DIR
80+
value: /antidote-ro
81+
- name: DEST_DIR
82+
value: /curriculum
83+
command:
84+
- /copy.sh
85+
volumeMounts:
86+
- mountPath: /curriculum
87+
name: local-copy
88+
readOnly: false
89+
- mountPath: /antidote-ro
90+
name: host-volume
91+
readOnly: true
92+
serviceAccount: antidotesa
93+
containers:
94+
- name: acore
95+
image: antidotelabs/antidote-core:latest # TEMPORARY - will be set to 0.6.0 after release
96+
imagePullPolicy: Always
97+
ports:
98+
# Only accessible from within the container
99+
# - containerPort: 50099 # GRPC
100+
- containerPort: 8086 # REST/HTTP
101+
readinessProbe:
102+
httpGet:
103+
path: /
104+
port: 8086
105+
volumeMounts:
106+
- name: antidote-config-volume
107+
mountPath: /etc/antidote/
108+
- mountPath: /curriculum
109+
name: local-copy
110+
readOnly: false
111+
- mountPath: /antidote-ro
112+
name: host-volume
113+
readOnly: true
114+
- image: nats
115+
name: nats
116+
ports:
117+
- containerPort: 4222
118+
protocol: TCP
119+
- containerPort: 6222
120+
protocol: TCP
121+
- containerPort: 8222
122+
protocol: TCP
123+
- image: jaegertracing/jaeger-agent:1.9 # Ensure this matches what's deployed in the jaeger collector deployment
124+
name: jaeger-agent
125+
ports:
126+
- containerPort: 5775
127+
protocol: UDP
128+
- containerPort: 6831
129+
protocol: UDP
130+
- containerPort: 6832
131+
protocol: UDP
132+
- containerPort: 5778
133+
protocol: TCP
134+
# args: ["--reporter.grpc.host-port=127.0.0.1:30840"]
135+
# args: ["--reporter.grpc.host-port=jaeger:14267"]
136+
args: ["--collector.host-port=jaeger.prod.svc.cluster.local:14267"] #OLD
137+
# NOTE that grpc probably has a different port. Might want to label things properly and link to docs
138+
# also for testing if you're using nodeport might want to pick your ports so they don't change.
139+
140+
volumes:
141+
- name: antidote-config-volume
142+
configMap:
143+
defaultMode: 420
144+
name: acore-conf
145+
- name: host-volume
146+
hostPath:
147+
path: "/curriculum"
148+
- name: local-copy
149+
emptyDir: {}
150+
151+
---
152+
kind: Service
153+
apiVersion: v1
154+
metadata:
155+
name: acore
156+
spec:
157+
selector:
158+
app: acore
159+
ports:
160+
# Only enable HTTP - grpc only accessible within the pod
161+
- name: http
162+
port: 8086
163+
targetPort: 8086
164+
type: ClusterIP
165+
166+
---
167+
apiVersion: extensions/v1beta1
168+
kind: Ingress
169+
metadata:
170+
annotations:
171+
# https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/
172+
ingress.kubernetes.io/ingress.class: "nginx"
173+
ingress.kubernetes.io/ssl-services: "acore"
174+
ingress.kubernetes.io/ssl-redirect: "true"
175+
ingress.kubernetes.io/force-ssl-redirect: "true"
176+
ingress.kubernetes.io/rewrite-target: "/"
177+
nginx.ingress.kubernetes.io/rewrite-target: "/"
178+
nginx.ingress.kubernetes.io/limit-connections: "10"
179+
nginx.ingress.kubernetes.io/limit-rps: "5"
180+
name: acore
181+
spec:
182+
rules:
183+
- http:
184+
paths:
185+
- path: "/acore"
186+
backend:
187+
serviceName: acore
188+
servicePort: 8086

manifests/antidote-web.yaml

-80
This file was deleted.

manifests/aweb.yaml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
apiVersion: extensions/v1beta1
3+
kind: Deployment
4+
metadata:
5+
name: aweb
6+
spec:
7+
replicas: 1
8+
revisionHistoryLimit: 3
9+
template:
10+
metadata:
11+
name: aweb
12+
labels:
13+
app: aweb
14+
antidote_role: infra
15+
spec:
16+
containers:
17+
- name: aweb
18+
image: antidotelabs/antidote-web:latest # TEMPORARY - will be set to 0.6.0 after release
19+
imagePullPolicy: Always
20+
env:
21+
- name: WEBSSH2_LOCATION
22+
value: "http://127.0.0.1:30010"
23+
ports:
24+
- containerPort: 80
25+
readinessProbe:
26+
httpGet:
27+
path: /
28+
port: 80
29+
30+
---
31+
kind: Service
32+
apiVersion: v1
33+
metadata:
34+
name: aweb
35+
spec:
36+
selector:
37+
app: aweb
38+
ports:
39+
- port: 80
40+
targetPort: 80
41+
type: ClusterIP
42+
43+
---
44+
apiVersion: extensions/v1beta1
45+
kind: Ingress
46+
metadata:
47+
annotations:
48+
ingress.kubernetes.io/ingress.class: "nginx"
49+
ingress.kubernetes.io/ssl-services: "aweb"
50+
ingress.kubernetes.io/ssl-redirect: "false"
51+
ingress.kubernetes.io/force-ssl-redirect: "false"
52+
nginx.ingress.kubernetes.io/limit-connections: "10"
53+
nginx.ingress.kubernetes.io/limit-rps: "5"
54+
name: aweb
55+
spec:
56+
rules:
57+
- http:
58+
paths:
59+
- path: "/"
60+
backend:
61+
serviceName: aweb
62+
servicePort: 80

0 commit comments

Comments
 (0)