add tekton

Signed-off-by: gwg313 <gwg313@pm.me>
This commit is contained in:
gwg313 2026-05-18 18:39:13 -04:00
parent bfce08329d
commit bbbb96bd6a
Signed by: gwg313
GPG key ID: 60FF63B4826B7400
23 changed files with 199 additions and 111 deletions

View file

@ -3,4 +3,5 @@ kind: Kustomization
resources: resources:
- forgejo - forgejo
- woodpecker
- navidrome - navidrome

View file

@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml
- https://storage.googleapis.com/tekton-releases/dashboard/latest/release.yaml

View file

@ -14,7 +14,7 @@ spec:
spec: spec:
containers: containers:
- name: yopass - name: yopass
image: jhaals/yopass image: jhaals/yopass:13.1.0
args: args:
- "--memcached=localhost:11211" - "--memcached=localhost:11211"
ports: ports:
@ -28,7 +28,7 @@ spec:
cpu: 100m cpu: 100m
memory: 50Mi memory: 50Mi
- name: yopass-memcached - name: yopass-memcached
image: memcached image: memcached:trixie
resources: resources:
limits: limits:
cpu: 100m cpu: 100m

View file

@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- network-policy.yaml
- route.yaml
- service.yaml

View file

@ -0,0 +1,17 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-ingress
namespace: yopass
spec:
endpointSelector:
matchLabels:
app.kubernetes.io/name: yopass
ingress:
- fromEntities:
- ingress
toPorts:
- ports:
- port: "1337"
protocol: TCP

38
apps/yopass/route.yaml Normal file
View file

@ -0,0 +1,38 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: yopass
namespace: yopass
spec:
parentRefs:
- name: shared-edge-gateway
namespace: cilium-ingress
hostnames:
- pastebin.gwg313.xyz
- pastebin.local.gwg313.xyz
- pastebin.zerotier.gwg313.xyz
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: yopass
port: 1337
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata:
name: allow-gateway-to-yopass
namespace: yopass
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: cilium-ingress
to:
- group: ""
kind: Service
name: yopass

View file

@ -11,4 +11,6 @@ resources:
- monitoring.yaml - monitoring.yaml
- nfs-subdir.yaml - nfs-subdir.yaml
- forgejo.yaml - forgejo.yaml
- yopass.yaml
- tekton.yaml
- navidrome.yaml - navidrome.yaml

View file

@ -22,3 +22,4 @@ spec:
- CreateNamespace=false - CreateNamespace=false
- ServerSideApply=true - ServerSideApply=true
- Replace=true # <-- Policies have immutable fields so this helps deal with updates - Replace=true # <-- Policies have immutable fields so this helps deal with updates
- Force=true

View file

@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: tekton-pipelines
namespace: argocd
annotations:
argoproj.io/sync-wave: "0"
spec:
project: default
source:
repoURL: https://github.com/gwg313/homelab-gitops.git
targetRevision: main
path: apps/tekton
destination:
server: https://kubernetes.default.svc
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=true

View file

@ -0,0 +1,23 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: woodpecker
namespace: argocd
annotations:
argoproj.io/sync-wave: "0"
spec:
project: default
source:
repoURL: https://github.com/gwg313/homelab-gitops.git
targetRevision: main
path: apps/woodpecker
destination:
server: https://kubernetes.default.svc
namespace: woodpecker
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=true

View file

@ -0,0 +1,23 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: yopass
namespace: argocd
annotations:
argoproj.io/sync-wave: "0"
spec:
project: default
source:
repoURL: https://github.com/gwg313/homelab-gitops.git
targetRevision: main
path: apps/yopass
destination:
server: https://kubernetes.default.svc
namespace: yopass
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=true

View file

@ -12,6 +12,17 @@ spec:
- resources: - resources:
kinds: kinds:
- Pod - Pod
exclude:
any:
- resources:
selector:
matchExpressions:
- key: app.kubernetes.io/managed-by
operator: In
values:
- tekton-pipelines
- key: tekton.dev/task
operator: Exists
validate: validate:
message: "Using the 'latest' tag or omitting image tags is forbidden. Use a specific version semantic tag." message: "Using the 'latest' tag or omitting image tags is forbidden. Use a specific version semantic tag."
foreach: foreach:

View file

@ -30,6 +30,8 @@ spec:
- sealed-secrets - sealed-secrets
- nfs-subdir-external-provisioner - nfs-subdir-external-provisioner
- monitoring - monitoring
- tekton-pipelines-resolvers
- tekton-pipelines
generate: generate:
apiVersion: cilium.io/v2 apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy kind: CiliumNetworkPolicy

View file

@ -34,6 +34,8 @@ spec:
- sealed-secrets - sealed-secrets
- nfs-subdir-external-provisioner - nfs-subdir-external-provisioner
- monitoring - monitoring
- tekton-pipelines-resolvers
- tekton-pipelines
validate: validate:
message: "Resource discipline violation: Containers must declare cpu/memory requests and limits." message: "Resource discipline violation: Containers must declare cpu/memory requests and limits."
pattern: pattern:

View file

@ -1,12 +0,0 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: woodpecker-cert
namespace: istio-system
spec:
secretName: woodpecker-cert
issuerRef:
name: letsencrypt-dns
kind: ClusterIssuer
dnsNames:
- ci.gwg313.xyz

View file

@ -1,18 +0,0 @@
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: woodpecker-gateway
namespace: woodpecker
spec:
selector:
istio: gateway
servers:
- port:
number: 443
name: https
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: woodpecker-cert
hosts:
- ci.gwg313.xyz

41
woodpecker/route.yaml Normal file
View file

@ -0,0 +1,41 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: woodpecker
namespace: woodpecker
spec:
parentRefs:
- name: shared-edge-gateway
namespace: cilium-ingress
hostnames:
- ci.local.gwg313.xyz
- ci.gwg313.xyz
- ci.zerotier.gwg313.xyz
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: woodpecker-server
port: 80
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata:
name: allow-gateway-to-woodpecker
namespace: woodpecker
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: cilium-ingress
to:
- group: ""
kind: Service
name: woodpecker-server

View file

@ -1,11 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: woodpecker
namespace: woodpecker
spec:
selector:
app: woodpecker
ports:
- port: 80
targetPort: 8000

View file

@ -1,16 +0,0 @@
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: woodpecker
namespace: woodpecker
spec:
gateways:
- woodpecker-gateway
hosts:
- ci.gwg313.xyz
http:
- route:
- destination:
host: woodpecker-server
port:
number: 80

View file

@ -1,13 +0,0 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: yopass-cert
namespace: istio-system
spec:
secretName: yopass-cert
issuerRef:
name: letsencrypt-dns
kind: ClusterIssuer
dnsNames:
- pastebin.local.gwg313.xyz
- pastebin.gwg313.xyz

View file

@ -1,19 +0,0 @@
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: yopass-gateway
namespace: yopass
spec:
selector:
istio: gateway
servers:
- port:
number: 443
name: https
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: yopass-cert
hosts:
- pastebin.gwg313.xyz
- pastebin.local.gwg313.xyz

View file

@ -1,20 +0,0 @@
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: yopass
namespace: yopass
spec:
hosts:
- pastebin.gwg313.xyz
- pastebin.local.gwg313.xyz
gateways:
- yopass-gateway
http:
- match:
- uri:
prefix: /
route:
- destination:
host: yopass
port:
number: 1337