remove unused bagcache - project failed

This commit is contained in:
Tobias Brunner 2020-03-18 13:52:35 +01:00
parent a0e4a12f69
commit 65aed0faf0
6 changed files with 0 additions and 149 deletions

View file

@ -1,21 +0,0 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: bagcache
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: bagcache
server: https://kubernetes.default.svc
project: default
source:
path: bagcache
repoURL: https://git.tbrnt.ch/tobru/gitops-tbrnt.git
targetRevision: HEAD
---
apiVersion: v1
kind: Namespace
metadata:
name: bagcache

View file

@ -1,50 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-config
data:
bagcache.conf: |
proxy_cache_path /srv/cache use_temp_path=off levels=1:2 keys_zone=cache_zone:100m max_size=10g inactive=1y;
server {
resolver 1.1.1.1;
listen 8888;
location / {
expires 30d;
proxy_cache cache_zone;
proxy_cache_lock on;
proxy_cache_revalidate on;
proxy_cache_background_update on;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_cache_valid 200 302 301 10m;
proxy_cache_key $scheme://$host$request_uri;
proxy_pass https://www.bag.admin.ch$request_uri;
proxy_set_header User-Agent "Mozilla/5.0 (X11; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0 (never gonna give you up, never gonna let you down - bag-cache.tobru.ch - operated by tobias@tobru.ch)";
proxy_set_header Host www.bag.admin.ch;
proxy_set_header Accept-Encoding ""; # no compression allowed or next won't work
sub_filter "<!-- begin: container -->" "<p style='width: 100%; height: 100px; padding: 30px;'> ⚠️ This is a cached version and non-authoritative mirror of <a href='https://www.bag.admin.ch'>www.bag.admin.ch</a> for faster access during demanding times. It should be up to date around 10 minutes of delay.</p><!-- begin: container -->";
sub_filter "https://www.bag.admin.ch/" "https://bag-cache.tobru.ch/";
add_header X-Cached $upstream_cache_status;
add_header X-Cache-Server "amazeeio/nginx-cache";
add_header X-Robots-Tag "noindex, nofollow";
proxy_ignore_headers "Set-Cookie";
proxy_ignore_headers "Expires";
add_header set-cookie "";
proxy_hide_header "x-content-type-options";
proxy_hide_header "Set-Cookie";
}
}
server {
listen 50000;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
allow 10.0.0.0/8;
allow 172.16.0.0/12;
allow 192.168.0.0/16;
deny all;
}
}

View file

@ -1,31 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginxcache
name: nginxcache
spec:
replicas: 1
selector:
matchLabels:
app: nginxcache
template:
metadata:
labels:
app: nginxcache
spec:
containers:
- image: bitnami/nginx:latest
name: nginx
volumeMounts:
- name: config
mountPath: /opt/bitnami/nginx/conf/server_blocks/
- name: cache
mountPath: /srv/cache
volumes:
- name: config
configMap:
name: nginx-config
- name: cache
persistentVolumeClaim:
claimName: nginx-cache

View file

@ -1,22 +0,0 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
ingress.kubernetes.io/ssl-redirect: "true"
name: nginxcache
labels:
app: nginxcache
spec:
rules:
- host: bag-cache.tobru.ch
http:
paths:
- path: /
backend:
serviceName: nginxcache
servicePort: 8080
tls:
- hosts:
- bag-cache.tobru.ch
secretName: bag-cache-tobru-ch-cert

View file

@ -1,11 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nginx-cache
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: local-path

View file

@ -1,14 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: nginxcache
labels:
app: nginxcache
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8888
selector:
app: nginxcache
type: ClusterIP