mirror of
https://github.com/khuedoan/homelab.git
synced 2025-02-06 17:18:51 +07:00
![Khue Doan](/assets/img/avatar_default.png)
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
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
apiVersion: workflows.tekton.dev/v1alpha1
|
|
kind: Workflow
|
|
metadata:
|
|
name: pull-request
|
|
namespace: tekton-workflows
|
|
spec:
|
|
triggers:
|
|
- event:
|
|
type: pull_request
|
|
secret:
|
|
secretName: webhook-secret
|
|
secretKey: token
|
|
bindings:
|
|
- name: git_url
|
|
value: $(body.repository.clone_url)
|
|
- name: git_revision
|
|
value: $(body.pull_request.head.sha)
|
|
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/pull-request.yaml
|
|
workspaces:
|
|
- name: shared-data
|
|
volumeClaimTemplate:
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 128Mi
|