Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions wb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apiVersion: v1
description: WaterButler is a Python web application for interacting with various file storage services via a single RESTful API
apiVersion: v2
name: wb
version: 0.9.1
description: WaterButler is a Python web application for interacting with various file storage services via a single RESTful API
type: application
version: 1.0.0
keywords:
- files
- storage
Expand All @@ -18,5 +19,18 @@ maintainers:
- name: Uditi Mehta
email: [email protected]
url: https://github.com/uditijmehta
engine: gotpl
tillerVersion: '>=2.7.0'
dependencies:
- name: cos-common
version: 1.0.0
repository: https://centerforopenscience.github.io/helm-charts/
# - name: cos-common
# version: 1.0.0
# repository: "file://../cos-common"
- name: maintenance
version: 0.2.0
repository: https://centerforopenscience.github.io/helm-charts/
condition: maintenance.enabled, global.maintenance.enabled
- name: redis
version: 1.1.3
repository: https://centerforopenscience.github.io/helm-charts/
condition: redis.enabled, global.redis.enabled
113 changes: 113 additions & 0 deletions wb/files/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
user nginx;
worker_processes {{ .Values.nginx.workerCount }};

load_module /usr/lib/nginx/modules/ngx_http_brotli_filter_module.so;
{{- if .Values.nginx.vts.enabled }}
load_module /usr/lib/nginx/modules/ngx_http_geoip_module.so;
load_module /usr/lib/nginx/modules/ngx_http_vhost_traffic_status_module.so;
{{- end }}

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $upstream_cache_status $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" "$http_x_forwarded_for" '
'rt=$request_time uct="$upstream_connect_time" uht="$upstream_header_time" urt="$upstream_response_time"';
access_log /var/log/nginx/access.log main;

real_ip_header {{ .Values.nginx.realIpHeader }};
real_ip_recursive {{ .Values.nginx.realIpRecursive }};
{{- range .Values.nginx.proxySourceRanges }}
set_real_ip_from {{ . }};
{{- end }}

{{- if .Values.nginx.vts.enabled }}
geoip_country /etc/nginx/GeoIP.dat;
geoip_city /etc/nginx/GeoLiteCity.dat;
geoip_proxy_recursive on;
{{- range .Values.nginx.proxySourceRanges }}
geoip_proxy {{ . }};
{{- end }}

vhost_traffic_status_zone shared:vhost_traffic_status:{{ .Values.nginx.vts.statusZoneSize }};
vhost_traffic_status_filter_by_set_key {{ .Values.nginx.vts.defaultFilterKey }};
{{- end }}

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 620s;
keepalive_requests 10000;
types_hash_max_size 2048;
server_tokens off;

gzip on;
gzip_proxied any;
gzip_disable "msie6";
gzip_min_length 1400;
gzip_vary off;
gzip_buffers 4 32k;
gzip_types text/plain text/css image/svg+xml application/javascript application/x-javascript text/xml text/javascript application/json application/vnd.api+json;

brotli on;
brotli_types text/plain text/css image/svg+xml application/javascript application/x-javascript text/xml text/javascript application/json application/vnd.api+json;

{{- if .Values.nginx.vts.enabled }}
server {
listen {{ .Values.nginx.vts.internalPort }};
server_name _;

location /healthz {
access_log off;
return 200;
}

location /nginx_status {
vhost_traffic_status_display;
vhost_traffic_status_display_format html;
}
}
{{- end }}

server {
listen {{ .Values.main.http.containers.nginx.internalPort }};
keepalive_timeout 620s;
client_max_body_size 9999m;
server_name _;

if ($http_x_forwarded_proto = "http") {
return 301 https://$host$request_uri;
}

location = /healthz {
access_log off;
return 200;
}

location = /robots.txt {
alias /usr/share/nginx/html/robots.txt;
}

location / {
add_header Cache-Control "no-cache, no-store, max-age=0, must-revalidate";
add_header Expires "-1";
add_header Pragma "no-cache";

proxy_buffering off;
proxy_request_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout {{ .Values.nginx.readTimeout }}s;
proxy_pass http://127.0.0.1:{{ .Values.main.http.containers.nginx.externalPort }};
}
}
}
9 changes: 0 additions & 9 deletions wb/requirements.lock

This file was deleted.

9 changes: 0 additions & 9 deletions wb/requirements.yaml

This file was deleted.

38 changes: 22 additions & 16 deletions wb/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.hostname }}
http://{{- .Values.ingress.hostname }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "wb.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "wb.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "wb.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "wb.fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:{{ .Values.service.externalPort }}
{{- $fullname := include "cos-common.fullname" (dict "root" . "name" "") | trim -}}
{{- $service := .Values.main.service -}}
{{- $externalPort := .Values.main.http.containers.nginx.externalPort -}}
{{- $internalPort := .Values.main.http.containers.nginx.internalPort -}}

1. Main service: {{ $fullname }}
{{- if and $service (eq $service.enabled true) }}
{{- if contains "LoadBalancer" $service.type }}
Wait for the external IP, then:
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ $fullname }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ $externalPort }}
{{- else if contains "NodePort" $service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ $fullname }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "cos-common.chartName" (dict "root" .) }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:{{ $internalPort }}
{{- end }}
{{- else }}
Service disabled.
{{- end }}
102 changes: 0 additions & 102 deletions wb/templates/_helpers.tpl

This file was deleted.

20 changes: 0 additions & 20 deletions wb/templates/certificate-networkpolicy.yaml

This file was deleted.

34 changes: 0 additions & 34 deletions wb/templates/certificate.yaml

This file was deleted.

Loading