[Skip-CI] WIP add hashfile storage
This commit is contained in:
parent
8c98c3eb8f
commit
f126035e84
6 changed files with 36 additions and 5 deletions
|
@ -3,9 +3,9 @@ FROM clojure:lein
|
|||
# Prepare Entrypoint Script
|
||||
ADD resources /tmp
|
||||
|
||||
ENV SOURCEDIR="/etc/websitesource"
|
||||
ENV BUILDDIR="/etc/website"
|
||||
ENV SOURCEDIR="/etc/websitesource"
|
||||
ENV WEBSITEROOT="/var/www/html/website/"
|
||||
ENV HASHFILEDIR="/data/hashfiles"
|
||||
ENV HASHFILEDIR="/var/hashfile.d"
|
||||
|
||||
RUN /tmp/install.sh
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash
|
||||
# curl -s -H "Authorization: token d92668fff6e005582dcb09c6590982a39b2523fc" https://repo.prod.meissa.de/api/v1/repos/meissa-intern/meissa-io/git/commits/HEAD | jq '.'
|
||||
|
||||
mkdir $BUILDDIR
|
||||
mkdir $SOURCEDIR
|
||||
mkdir -p $HASHFILEDIR
|
||||
|
||||
set -o nounset
|
||||
set -o xtrace
|
||||
|
@ -14,8 +14,8 @@ source /usr/local/bin/functions.sh
|
|||
filename="website.zip"
|
||||
hashfilename="hashfile"
|
||||
|
||||
# create empty hashfile
|
||||
# download website data
|
||||
# create empty hashfile
|
||||
# compare current hash to hashfile
|
||||
# same?
|
||||
# do nothing
|
||||
|
|
|
@ -185,6 +185,10 @@
|
|||
(replace-common-data "website/website-content-volume.yaml" config)
|
||||
(cm/replace-all-matching-values-by-new-value "WEBSITESTORAGESIZE" (str volume-size "Gi")))))
|
||||
|
||||
(defn-spec generate-hashfile-volume pred/map-or-seq?
|
||||
[config flattened-and-reduced-config?]
|
||||
(replace-common-data "website/website-content-volume.yaml" config))
|
||||
|
||||
(defn-spec generate-website-build-cron pred/map-or-seq?
|
||||
[config flattened-and-reduced-config?]
|
||||
(replace-build-data "website/website-build-cron.yaml" config))
|
||||
|
@ -205,3 +209,4 @@
|
|||
gitea-repo
|
||||
username
|
||||
branchname))))))
|
||||
|
||||
|
|
16
src/main/resources/website/hashfile-volume.yaml
Normal file
16
src/main/resources/website/hashfile-volume.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
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
|
||||
|
|
@ -52,6 +52,8 @@ spec:
|
|||
volumeMounts:
|
||||
- name: content-volume
|
||||
mountPath: /var/www/html/website
|
||||
- name: hashfile-volume
|
||||
mountPath: /var/hashfile.d
|
||||
volumes:
|
||||
- name: nginx-config-volume
|
||||
configMap:
|
||||
|
@ -68,4 +70,7 @@ spec:
|
|||
- name: content-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: NAME-content-volume
|
||||
- name: hashfile-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: NAME-hashfile-volume
|
||||
|
|
@ -35,9 +35,14 @@ spec:
|
|||
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
|
||||
|
Loading…
Reference in a new issue