-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor(frontend): update svelte-kit * feat(publisher): add blueprints * chore(backend): increase memory limits * feat(frontend): togglable fetch data * style(frontend): npm run format * docs: update * fix(frontend): add proto if missing * chore(housekeeper): delete old jobs * refactor(frontend): rename snapshot variable * chore(frontend): add builder image build * chore(skaffold): add dev s3 secret to deploy flow * chore(frontend): add builder image * feat(publisher): implement job * chore(publisher): bump cide image with aws-cli * chore(frontend): disable when disabled * chore(housekeeper): forbid concurrent jobs * chore(chart): bump version
- Loading branch information
Showing
25 changed files
with
1,210 additions
and
498 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.secret.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ type: application | |
|
||
version: 0.1.0 | ||
|
||
appVersion: "0.1.9" | ||
appVersion: "0.2.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{{- with $.Values.publisher }} | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: ConfigMap | ||
|
||
metadata: | ||
name: pagetron-publisher-job | ||
|
||
data: | ||
build.sh: | | ||
#!/bin/bash | ||
set -e | ||
set -x | ||
echo "# Starting" | ||
echo "# Building website" | ||
export PATH="/app/node_modules/.bin:${PATH}" | ||
npm run build | ||
mv build /data/build | ||
echo "# Done" | ||
publish.sh: | | ||
#!/bin/ash | ||
set -e | ||
set -x | ||
echo "# Starting" | ||
echo "# Publishing website" | ||
cd /data/build | ||
aws s3 \ | ||
--endpoint-url=${AWS_ENDPOINT_URL_S3} \ | ||
sync \ | ||
./ \ | ||
s3://${S3_BUCKET_NAME}/ | ||
echo "# Done" | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
{{- if $.Values.publicAccess.s3.enabled }} | ||
{{- with $.Values.publisher }} | ||
|
||
--- | ||
|
||
apiVersion: batch/v1 | ||
kind: CronJob | ||
|
||
metadata: | ||
name: pagetron-publisher | ||
labels: | ||
app: pagetron | ||
component: publisher | ||
|
||
spec: | ||
schedule: {{ .schedule | quote }} | ||
concurrencyPolicy: Replace | ||
|
||
jobTemplate: | ||
spec: | ||
ttlSecondsAfterFinished: 3600 | ||
template: | ||
spec: | ||
restartPolicy: OnFailure | ||
initContainers: | ||
- name: builder | ||
image: "{{ .buildImage.repository }}:{{ .buildImage.tag | default $.Chart.AppVersion }}" | ||
imagePullPolicy: IfNotPresent | ||
|
||
env: | ||
- name: TZ | ||
value: {{ $.Values.timezone | quote }} | ||
|
||
- name: VITE_API_URL | ||
value: http://pagetron-backend:80 | ||
- name: VITE_BUILD_SNAPSHOT | ||
value: "1" | ||
|
||
command: ["/bin/bash"] | ||
args: | ||
- /job/build.sh | ||
|
||
volumeMounts: | ||
- name: job | ||
mountPath: /job | ||
- name: data | ||
mountPath: /data | ||
|
||
containers: | ||
- name: publisher | ||
image: "{{ .image.repository }}:{{ .image.tag }}" | ||
imagePullPolicy: IfNotPresent | ||
|
||
env: | ||
- name: TZ | ||
value: {{ $.Values.timezone | quote }} | ||
|
||
- name: AWS_ACCESS_KEY_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .s3.secretName | quote }} | ||
key: AWS_ACCESS_KEY_ID | ||
- name: AWS_SECRET_ACCESS_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .s3.secretName | quote }} | ||
key: AWS_SECRET_ACCESS_KEY | ||
- name: AWS_DEFAULT_REGION | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .s3.secretName | quote }} | ||
key: AWS_DEFAULT_REGION | ||
- name: AWS_ENDPOINT_URL_S3 | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .s3.secretName | quote }} | ||
key: AWS_ENDPOINT_URL_S3 | ||
|
||
- name: S3_BUCKET_NAME | ||
value: {{ .s3.bucketName | quote }} | ||
|
||
command: ["/bin/ash"] | ||
args: | ||
- /job/publish.sh | ||
|
||
volumeMounts: | ||
- name: job | ||
mountPath: /job | ||
- name: data | ||
mountPath: /data | ||
|
||
volumes: | ||
- name: job | ||
configMap: | ||
name: pagetron-publisher-job | ||
- name: data | ||
emptyDir: {} | ||
|
||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.