Remove website resources
This commit is contained in:
parent
6e5e2f2d52
commit
2bd13d61fd
7 changed files with 0 additions and 278 deletions
|
@ -1,16 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: NAME-hashfile-volume
|
||||
namespace: default
|
||||
labels:
|
||||
app: NAME-nginx
|
||||
app.kubernetes.part-of: NAME-website
|
||||
spec:
|
||||
storageClassName: local-path
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 16Mi
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: NAME-configmap
|
||||
namespace: default
|
||||
labels:
|
||||
app.kubernetes.part-of: NAME-website
|
||||
data:
|
||||
nginx.conf: |
|
||||
user nginx;
|
||||
worker_processes 3;
|
||||
error_log /var/log/nginx/error.log;
|
||||
pid /var/log/nginx/nginx.pid;
|
||||
worker_rlimit_nofile 8192;
|
||||
events {
|
||||
worker_connections 4096;
|
||||
}
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
log_format main '$remote_addr - $remote_user [$time_local] $status'
|
||||
'"$request" $body_bytes_sent "$http_referer"'
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
access_log /var/log/nginx/access.log main;
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
keepalive_timeout 65;
|
||||
server_names_hash_bucket_size 128;
|
||||
include /etc/nginx/conf.d/website.conf;
|
||||
}
|
||||
mime.types: |
|
||||
types {
|
||||
text/html html htm shtml;
|
||||
text/css css;
|
||||
text/xml xml rss;
|
||||
image/gif gif;
|
||||
image/jpeg jpeg jpg;
|
||||
application/x-javascript js;
|
||||
text/plain txt;
|
||||
text/x-component htc;
|
||||
text/mathml mml;
|
||||
image/svg+xml svg svgz;
|
||||
image/png png;
|
||||
image/x-icon ico;
|
||||
image/x-jng jng;
|
||||
image/vnd.wap.wbmp wbmp;
|
||||
application/java-archive jar war ear;
|
||||
application/mac-binhex40 hqx;
|
||||
application/pdf pdf;
|
||||
application/x-cocoa cco;
|
||||
application/x-java-archive-diff jardiff;
|
||||
application/x-java-jnlp-file jnlp;
|
||||
application/x-makeself run;
|
||||
application/x-perl pl pm;
|
||||
application/x-pilot prc pdb;
|
||||
application/x-rar-compressed rar;
|
||||
application/x-redhat-package-manager rpm;
|
||||
application/x-sea sea;
|
||||
application/x-shockwave-flash swf;
|
||||
application/x-stuffit sit;
|
||||
application/x-tcl tcl tk;
|
||||
application/x-x509-ca-cert der pem crt;
|
||||
application/x-xpinstall xpi;
|
||||
application/zip zip;
|
||||
application/octet-stream deb;
|
||||
application/octet-stream bin exe dll;
|
||||
application/octet-stream dmg;
|
||||
application/octet-stream eot;
|
||||
application/octet-stream iso img;
|
||||
application/octet-stream msi msp msm;
|
||||
audio/mpeg mp3;
|
||||
audio/x-realaudio ra;
|
||||
video/mpeg mpeg mpg;
|
||||
video/quicktime mov;
|
||||
video/x-flv flv;
|
||||
video/x-msvideo avi;
|
||||
video/x-ms-wmv wmv;
|
||||
video/x-ms-asf asx asf;
|
||||
video/x-mng mng;
|
||||
}
|
||||
website.conf: |
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
server_name FQDN
|
||||
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header Referrer-Policy "strict-origin";
|
||||
# add_header Permissions-Policy "permissions here";
|
||||
root /var/www/html/website/;
|
||||
index index.html;
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: NAME-deployment
|
||||
labels:
|
||||
app.kubernetes.part-of: NAME-website
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: NAME-nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: NAME-nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: NAME-nginx
|
||||
image: nginx:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- mountPath: /etc/nginx
|
||||
readOnly: true
|
||||
name: nginx-config-volume
|
||||
- mountPath: /var/log/nginx
|
||||
name: log
|
||||
- mountPath: /var/www/html/website
|
||||
name: content-volume
|
||||
readOnly: true
|
||||
initContainers:
|
||||
- image: domaindrivenarchitecture/c4k-website-build
|
||||
name: NAME-init-build-container
|
||||
imagePullPolicy: IfNotPresent
|
||||
resources:
|
||||
requests:
|
||||
cpu: BUILD_CPU_REQUEST
|
||||
memory: BUILD_MEMORY_REQUEST
|
||||
limits:
|
||||
cpu: BUILD_CPU_LIMIT
|
||||
memory: BUILD_MEMORY_LIMIT
|
||||
command: ["/entrypoint.sh"]
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: NAME-secret
|
||||
env:
|
||||
- name: SHA256SUM
|
||||
value: CHECK_SUM
|
||||
- name: SCRIPTFILE
|
||||
value: SCRIPT_FILE
|
||||
volumeMounts:
|
||||
- name: content-volume
|
||||
mountPath: /var/www/html/website
|
||||
- name: hashfile-volume
|
||||
mountPath: /var/hashfile.d
|
||||
volumes:
|
||||
- name: nginx-config-volume
|
||||
configMap:
|
||||
name: NAME-configmap
|
||||
items:
|
||||
- key: nginx.conf
|
||||
path: nginx.conf
|
||||
- key: website.conf
|
||||
path: conf.d/website.conf
|
||||
- key: mime.types
|
||||
path: mime.types
|
||||
- name: log
|
||||
emptyDir: {}
|
||||
- name: content-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: NAME-content-volume
|
||||
- name: hashfile-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: NAME-hashfile-volume
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: NAME-service
|
||||
labels:
|
||||
app: NAME-nginx
|
||||
app.kubernetes.part-of: NAME-website
|
||||
namespace: default
|
||||
spec:
|
||||
selector:
|
||||
app: NAME-nginx
|
||||
ports:
|
||||
- name: nginx-http
|
||||
port: 80
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: NAME-build-cron
|
||||
labels:
|
||||
app.kubernetes.part-of: NAME-website
|
||||
spec:
|
||||
schedule: "0/7 * * * *"
|
||||
successfulJobsHistoryLimit: 1
|
||||
failedJobsHistoryLimit: 1
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: domaindrivenarchitecture/c4k-website-build
|
||||
name: NAME-build-app
|
||||
imagePullPolicy: IfNotPresent
|
||||
resources:
|
||||
requests:
|
||||
cpu: BUILD_CPU_REQUEST
|
||||
memory: BUILD_MEMORY_REQUEST
|
||||
limits:
|
||||
cpu: BUILD_CPU_LIMIT
|
||||
memory: BUILD_MEMORY_LIMIT
|
||||
command: ["/entrypoint.sh"]
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: NAME-secret
|
||||
env:
|
||||
- name: SHA256SUM
|
||||
value: CHECK_SUM
|
||||
- name: SCRIPTFILE
|
||||
value: SCRIPT_FILE
|
||||
volumeMounts:
|
||||
- name: content-volume
|
||||
mountPath: /var/www/html/website
|
||||
- name: hashfile-volume
|
||||
mountPath: /var/hashfile.d
|
||||
volumes:
|
||||
- name: content-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: NAME-content-volume
|
||||
- name: hashfile-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: NAME-hashfile-volume
|
||||
restartPolicy: OnFailure
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: NAME-secret
|
||||
labels:
|
||||
app.kubernetes.part-of: NAME-website
|
||||
data:
|
||||
AUTHTOKEN: TOKEN
|
||||
GITREPOURL: REPOURL
|
||||
GITCOMMITURL: COMMITURL
|
|
@ -1,16 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: NAME-content-volume
|
||||
namespace: default
|
||||
labels:
|
||||
app: NAME-nginx
|
||||
app.kubernetes.part-of: NAME-website
|
||||
spec:
|
||||
storageClassName: local-path
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: WEBSITESTORAGESIZE
|
||||
|
Loading…
Reference in a new issue