This repository has been archived by the owner on Apr 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding deployment scripts for kubernetes
Run the following command to start the kubectl create -f firmament-deployment.yaml kubectl create -f poseidon-scheduler.yaml This will create two services 'firmament-service' and 'poseidon-stats'. poseidon-scheduler pod will wait till the firmament pods are created. Change-Id: I0ee8d8021eb0fa1f3f075c8612ed42d1a0e1efe9 Affected-Modules: k8sclient
- Loading branch information
1 parent
b3dee43
commit 8bb2279
Showing
3 changed files
with
68 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,36 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: firmament-service | ||
namespace: kube-system | ||
spec: | ||
selector: | ||
scheduler: firmament | ||
ports: | ||
- protocol: TCP | ||
port: 9090 | ||
targetPort: 9090 | ||
--- | ||
apiVersion: apps/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: firmament-scheduler | ||
namespace: kube-system | ||
labels: | ||
app: firmament | ||
name: firmament-deployment | ||
scheduler: firmament | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: firmament | ||
name: firmament | ||
labels: | ||
scheduler: firmament | ||
spec: | ||
containers: | ||
- name: firmament | ||
image: camsas/firmament:dev | ||
command: ["/firmament/src/firmament_scheduler", "--flagfile=/firmament/default.conf"] | ||
ports: | ||
- containerPort: 9090 | ||
- command: [/firmament/src/firmament_scheduler, --flagfile=/firmament/default.conf, --firmament_scheduler_service_address=0.0.0.0] | ||
image: camsas/firmament:dev | ||
name: firmament-scheduler | ||
ports: | ||
- containerPort: 9090 | ||
hostNetwork: true | ||
hostPID: false | ||
volumes: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,47 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: poseidon-stats | ||
namespace: kube-system | ||
spec: | ||
selector: | ||
poseidonservice: stats | ||
ports: | ||
- protocol: TCP | ||
port: 9091 | ||
targetPort: 9091 | ||
--- | ||
apiVersion: apps/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: poseidon | ||
name: poseidon-deployment | ||
component: scheduler | ||
tier: control-plane | ||
poseidonservice: stats | ||
name: poseidon | ||
namespace: kube-system | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: poseidon | ||
name: poseidon | ||
labels: | ||
component: scheduler | ||
tier: control-plane | ||
version: first | ||
poseidonservice: stats | ||
spec: | ||
containers: | ||
- name: poseidon | ||
image: camsas/poseidon:dev | ||
command: | ||
- poseidon | ||
- --logtostderr | ||
- --kubeConfig=<path_kubeconfig_file> | ||
- --firmamentAddress=<host>:9090 | ||
- --statsServerAddress=<host>:9091 | ||
- --kubeVersion=1.5 | ||
ports: | ||
- containerPort: 9091 | ||
- command: [ /go/bin/poseidon ,--logtostderr ,--kubeConfig="", --firmamentAddress="", --firmamentAddress="", --kubeVersion=="1.6" ] | ||
image: camsas/poseidon:dev | ||
name: poseidon | ||
initContainers: | ||
- name: init-firmamentservice | ||
image: radial/busyboxplus:curl | ||
command: ['sh', '-c', 'until nslookup firmament-service.kube-system; do echo waiting for firmamentservice; sleep 1; done;'] | ||
securityContext: | ||
privileged: false | ||
volumeMounts: [] | ||
hostNetwork: true | ||
hostPID: false | ||
volumes: [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters