-
-
Notifications
You must be signed in to change notification settings - Fork 768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Deploy] Add Kubernetes deployment file #2041
Open
Herklos
wants to merge
3
commits into
dev
Choose a base branch
from
feature/add-kub-file
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+105
−0
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,105 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
service: octobot | ||
name: octobot | ||
spec: | ||
ports: | ||
- port: 5001 | ||
selector: | ||
service: octobot | ||
type: LoadBalancer | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
service: octobot | ||
name: octobot | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
service: octobot | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
service: octobot | ||
spec: | ||
containers: | ||
- image: drakkarsoftware/octobot:stable | ||
name: octobot | ||
ports: | ||
- containerPort: 5001 | ||
name: octobot | ||
env: | ||
- name: IS_CLOUD_ENV | ||
value: "true" | ||
volumeMounts: | ||
- mountPath: /octobot/logs | ||
name: octobot-logs | ||
- mountPath: /octobot/backtesting | ||
name: octobot-backtesting | ||
- mountPath: /octobot/tentacles | ||
name: octobot-tentacles | ||
- mountPath: /octobot/user | ||
name: octobot-user | ||
restartPolicy: Always | ||
volumes: | ||
- name: octobot-logs | ||
emptyDir: {} | ||
- name: octobot-backtesting | ||
persistentVolumeClaim: | ||
claimName: octobot-backtesting | ||
- name: octobot-tentacles | ||
persistentVolumeClaim: | ||
claimName: octobot-tentacles | ||
- name: octobot-user | ||
persistentVolumeClaim: | ||
claimName: octobot-user | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
labels: | ||
service: octobot | ||
name: octobot-backtesting | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 100Mi | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We may switch to https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/ for |
||
metadata: | ||
labels: | ||
service: octobot | ||
name: octobot-tentacles | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 100Mi | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
labels: | ||
service: octobot | ||
name: octobot-user | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 100Mi |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does that mean we not save logs for an execution to another ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logs will also be retrieved with the console output of the containers so I don't think we need to store them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The console output has to be as detailed as the logfiles one for kub in this case 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we want to store hundreds of megabytes per bot per day with the DEBUG level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should not be that much, it's reduced by a lot now. For example right now I have a 1h runing bot with 31Ko logs. It's to be analysed if we need debug logs or not I think in cloud bots
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be easier to have the logs collected in the output of the console even if it means modifying the logs level when we are in the cloud. It will be much simpler rather than going to recover log files if needed