Commit 247eeb03 authored by carlosribas's avatar carlosribas
Browse files

First version of the helm charts

parent 709ee028
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
apiVersion: v2
name: helm
description: A Helm chart for Kubernetes
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 1.16.0
apiVersion: v1
kind: Service
metadata:
name: memcached
labels:
app: memcached
spec:
ports:
- port: {{ .Values.memcachedPort }}
protocol: TCP
targetPort: {{ .Values.memcachedPort }}
selector:
app: memcached
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: memcached
spec:
replicas: {{ .Values.memcachedReplicas }}
selector:
matchLabels:
app: memcached
template:
metadata:
labels:
app: memcached
spec:
containers:
- image: memcached:1.6.7-alpine
name: memcached
resources:
requests:
memory: {{ .Values.memcachedRequestsMemory }}
cpu: {{ .Values.memcachedRequestsCPU }}
limits:
memory: {{ .Values.memcachedLimitssMemory }}
cpu: {{ .Values.memcachedLimitsCPU }}
args:
- "-m {{ .Values.memcachedRequestsCPU }} -p {{ .Values.memcachedPort }}"
ports:
- containerPort: {{ .Values.memcachedPort }}
restartPolicy: Always
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: nginx
labels:
app: nginx
spec:
ports:
- port: {{ .Values.nginxPort }}
targetPort: {{ .Values.nginxTargetPort }}
protocol: TCP
selector:
app: rnacentral
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-config
data:
local.conf: |-
# Gunicorn application
upstream rnacentral {
server rnacentral:{{ .Values.rnacentralPort }};
}
server {
listen {{ .Values.nginxTargetPort }};
location /static/ {
autoindex on;
alias /srv/rnacentral/static/;
}
location / {
# everything is passed to Gunicorn
proxy_pass http://rnacentral;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
replicas: {{ .Values.nginxReplicas }}
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: nginx:1.17-alpine
name: nginx
resources:
requests:
memory: {{ .Values.nginxRequestsMemory }}
cpu: {{ .Values.nginxRequestsCPU }}
limits:
memory: {{ .Values.nginxLimitssMemory }}
cpu: {{ .Values.nginxLimitsCPU }}
ports:
- containerPort: {{ .Values.nginxTargetPort }}
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx/conf.d/local.conf
subPath: local.conf
- name: static-volume
mountPath: /srv/rnacentral/static
restartPolicy: Always
volumes:
- name: nginx-config
configMap:
name: nginx-config
- name: static-volume
persistentVolumeClaim:
claimName: static-volume
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: redis
labels:
app: redis
spec:
ports:
- port: {{ .Values.redisPort }}
protocol: TCP
targetPort: {{ .Values.redisPort }}
selector:
app: redis
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
spec:
replicas: {{ .Values.redisReplicas }}
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- image: redis:6.0.8-alpine
name: redis
resources:
requests:
memory: {{ .Values.redisRequestsMemory }}
cpu: {{ .Values.redisRequestsCPU }}
limits:
memory: {{ .Values.redisLimitssMemory }}
cpu: {{ .Values.redisLimitsCPU }}
args:
- "--port {{ .Values.redisPort }}"
ports:
- containerPort: {{ .Values.redisPort }}
restartPolicy: Always
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: rnacentral
labels:
app: rnacentral
spec:
type: NodePort
ports:
- port: {{ .Values.rnacentralPort }}
targetPort: {{ .Values.rnacentralPort }}
protocol: TCP
selector:
app: rnacentral
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: rnacentral
spec:
replicas: {{ .Values.rnacentralReplicas }}
selector:
matchLabels:
app: rnacentral
template:
metadata:
labels:
app: rnacentral
spec:
containers:
- image: rnacentral/rnacentral-webcode:python3.7
name: rnacentral
ports:
- containerPort: {{ .Values.rnacentralPort }}
resources:
requests:
memory: {{ .Values.rnacentralRequestsMemory }}
cpu: {{ .Values.rnacentralRequestsCPU }}
limits:
memory: {{ .Values.rnacentralLimitssMemory }}
cpu: {{ .Values.rnacentralLimitsCPU }}
volumeMounts:
- name: static-volume
mountPath: /srv/rnacentral/static
envFrom:
- secretRef:
name: {{ .Values.database }}
- configMapRef:
name: {{ .Values.proxy }}
restartPolicy: Always
volumes:
- name: static-volume
persistentVolumeClaim:
claimName: static-volume
\ No newline at end of file
# Database
database: db-dev
# Proxy
proxy: proxy-hx
# Memcached
memcachedReplicas: 1
memcachedRequestsMemory: "1024Mi"
memcachedRequestsCPU: "250m"
memcachedLimitssMemory: "2048Mi"
memcachedLimitsCPU: "500m"
# Redis
redisReplicas: 1
redisRequestsMemory: "1024Mi"
redisRequestsCPU: "250m"
redisLimitssMemory: "2048Mi"
redisLimitsCPU: "500m"
# Nginx
nginxReplicas: 1
nginxRequestsMemory: "512Mi"
nginxRequestsCPU: "250m"
nginxLimitssMemory: "1024Mi"
nginxLimitsCPU: "500m"
# RNAcentral
rnacentralReplicas: 1
rnacentralRequestsMemory: "1536Mi"
rnacentralRequestsCPU: "250m"
rnacentralLimitssMemory: "3072Mi"
rnacentralLimitsCPU: "500m"
# Database
database: db-pro
# Proxy
proxy: proxy-hh
# Memcached
memcachedPort: 8052
memcachedReplicas: 2
memcachedRequestsMemory: "2048Mi"
memcachedRequestsCPU: "500m"
memcachedLimitssMemory: "4096Mi"
memcachedLimitsCPU: "1000m"
# Redis
redisPort: 8051
redisReplicas: 2
redisRequestsMemory: "2048Mi"
redisRequestsCPU: "500m"
redisLimitssMemory: "4096Mi"
redisLimitsCPU: "1000m"
# Nginx
nginxPort: 8000
nginxTargetPort: 80
nginxReplicas: 2
nginxRequestsMemory: "1024Mi"
nginxRequestsCPU: "500m"
nginxLimitssMemory: "2048Mi"
nginxLimitsCPU: "1000m"
# RNAcentral
rnacentralPort: 8000
rnacentralReplicas: 2
rnacentralRequestsMemory: "4096Mi"
rnacentralRequestsCPU: "500m"
rnacentralLimitssMemory: "6144Mi"
rnacentralLimitsCPU: "1000m"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment