chore(mgmt): WIP capture k8s-mgmt config
This commit is contained in:
parent
29297a3541
commit
e10550787a
10 changed files with 8467 additions and 0 deletions
46
apps/portfolio/overlays/prod-sites/job.build.yaml
Normal file
46
apps/portfolio/overlays/prod-sites/job.build.yaml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: hugo-build-deploy
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: hugo-builder
|
||||
image: alpine:latest
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
apk add --no-cache git hugo
|
||||
git clone $GIT_REPO /src
|
||||
cd /src
|
||||
hugo --minify --enableGitInfo
|
||||
npm install -g @cloudflare/wrangler
|
||||
wrangler publish --project-name $CFP_PROJECT_NAME --env $CFP_ENVIRONMENT
|
||||
env:
|
||||
- name: HUGO_ENVIRONMENT
|
||||
value: production
|
||||
- name: GIT_REPO
|
||||
# value: git.nc.landry.land/davad/portfolio-site.git
|
||||
value: "ssh://git@gitea-ssh.gitops.svc.cluster.local:2222/davad/portfolio-site.git"
|
||||
- name: CFP_PROJECT_NAME
|
||||
- name: CFP_ENVIRONMENT
|
||||
- name: CF_API_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: cloudflare-secret
|
||||
key: api-token
|
||||
volumeMounts:
|
||||
- name: ssh-key-volume
|
||||
mountPath: "/etc/ssh-key"
|
||||
- name: src-volume
|
||||
mountPath: /src
|
||||
restartPolicy: Never
|
||||
volumes:
|
||||
- name: src-volume
|
||||
emptyDir: {}
|
||||
- name: ssh-key-volume
|
||||
secret:
|
||||
secretName: git-ssh-key
|
||||
defaultMode: 256
|
||||
backoffLimit: 4
|
||||
Loading…
Add table
Add a link
Reference in a new issue