-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from KhaosResearch/feat/kubernetes
Add reference Kubernetes manifest for deploying eidos
- Loading branch information
Showing
3 changed files
with
88 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Kubernetes deployment of eidos | ||
This folder contains all required files and configuration to have a working deployment of `eidos` in Kubernetes. | ||
|
||
The configuration provided creates a deployment with 3 replicas using the base `eidos` instance (to deploy a instance with custom functions just change the docker image) behind a service for load balancing between the different pods. | ||
|
||
# Disclaimer | ||
|
||
The provided Kubernetes manifests are for reference only. You must review and adjust these manifests to suit your specific cluster and configuration. Ensure that resource requests and limits, image names, environment variables, and other configurations are appropriate for your setup. |
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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: eidos-namespace | ||
labels: | ||
app: eidos | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: eidos-deployment | ||
labels: | ||
app: eidos | ||
namespace: eidos-namespace | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: eidos | ||
template: | ||
metadata: | ||
labels: | ||
app: eidos | ||
namespace: eidos-namespace | ||
spec: | ||
containers: | ||
- name: eidos | ||
image: ghcr.io/khaosresearch/eidos:v1.0.0 # This image must be changed to deploy a custom functions | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 80 | ||
resources: | ||
limits: | ||
memory: "1Gi" | ||
cpu: "1" | ||
requests: | ||
memory: "256Mi" | ||
cpu: "500m" | ||
env: | ||
- name: API_KEY | ||
valueFrom: | ||
configMapKeyRef: | ||
name: eidos-configmap | ||
key: EIDOS_API_KEY | ||
- name: ROOT_PATH | ||
valueFrom: | ||
configMapKeyRef: | ||
name: eidos-configmap | ||
key: EIDOS_ROOT_PATH | ||
- name: FUNCTIONS_FOLDER | ||
valueFrom: | ||
configMapKeyRef: | ||
name: eidos-configmap | ||
key: EIDOS_FUNCTIONS_FOLDER | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: eidos-service | ||
namespace: eidos-namespace | ||
spec: | ||
type: NodePort | ||
selector: | ||
app: eidos | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 80 | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: eidos-configmap | ||
namespace: eidos-namespace | ||
data: | ||
EIDOS_API_KEY: "Sample_API_key_for_eidos" | ||
EIDOS_ROOT_PATH: "/eidos" | ||
EIDOS_FUNCTIONS_FOLDER: "functions" |