mirror of
https://github.com/khuedoan/homelab.git
synced 2025-02-06 17:18:51 +07:00
e28bada08e
Previously PVCs need to define storage class explicitly because if a PVC was created before Longhorn is ready, it will stay pending forever until we delete and recreate it (ArgoCD didn't have sync wave for ApplicationSet back then). Kubernetes 1.28 has retroactive assignment of a default StorageClass for existing unbound persistent volume claims without any storage class assigned. https://kubernetes.io/blog/2023/08/15/kubernetes-v1-28-release/#automatic-retroactive-assignment-of-a-default-storageclass-graduates-to-stable
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
apiVersion: workflows.tekton.dev/v1alpha1
|
|
kind: Workflow
|
|
metadata:
|
|
name: master
|
|
namespace: tekton-workflows
|
|
spec:
|
|
triggers:
|
|
- event:
|
|
type: push
|
|
secret:
|
|
secretName: webhook-secret
|
|
secretKey: token
|
|
filters:
|
|
# TODO Gitea doesn't have refs/head/ prefix, use gitRef after this is fixed
|
|
# https://github.com/tektoncd/experimental/blob/3644c43377239bb639ec4191acc04fcf3aafb3f2/workflows/pkg/filters/filters.go#L44-L46
|
|
gitRef:
|
|
regex: '^master$'
|
|
# custom:
|
|
# - cel: "body.ref.matches('^master$')"
|
|
bindings:
|
|
- name: git_url
|
|
value: $(body.repository.clone_url)
|
|
- name: git_revision
|
|
value: $(body.after)
|
|
params:
|
|
- name: git_url
|
|
# TODO don't need default, but invalid mem address if remove this
|
|
default: https://git.khuedoan.com/foo/bar
|
|
- name: git_revision
|
|
default: master
|
|
pipelineRef:
|
|
resolver: git
|
|
params:
|
|
# TODO ???
|
|
# supposed to be param. or body., looks like it's not working in v1alpha1 yet
|
|
- name: url
|
|
value: $(tt.params.git_url)
|
|
- name: revision
|
|
value: $(tt.params.git_revision)
|
|
- name: pathInRepo
|
|
value: .ci/master.yaml
|
|
workspaces:
|
|
- name: shared-data
|
|
volumeClaimTemplate:
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 128Mi
|