ce7cb702218693d08ea6d83464d2457c9250027c

This commit is contained in:
ms2k 2026-11-12 20:46:28 +09:00
commit 34c5f8963c
4 changed files with 145336 additions and 0 deletions

View file

@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- vso.yaml
- network-policies.yaml

View file

@ -0,0 +1,12 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: flux-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: flux-vso
namespace: flux-system

View file

@ -0,0 +1,81 @@
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: flux-system
namespace: flux-system
spec:
endpointSelector: {}
ingress:
- fromEntities:
- host
toPorts:
- ports:
- port: "8080"
protocol: TCP
- port: "8081"
protocol: TCP
- port: "9090"
protocol: TCP
- port: "9440"
protocol: TCP
egress:
- toEntities:
- kube-apiserver
toPorts:
- ports:
- port: "6443"
protocol: TCP
- toEndpoints:
- matchLabels:
k8s-app: kube-dns
k8s:io.kubernetes.pod.namespace: kube-system
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toEndpoints:
- matchLabels:
app.kubernetes.io/name: forgejo
k8s:io.kubernetes.pod.namespace: forgejo
toPorts:
- ports:
- port: "2222"
protocol: TCP
- toServices:
- k8sService:
namespace: forgejo
serviceName: forgejo-ssh
toPorts:
- ports:
- port: "22"
protocol: TCP
- toEntities:
- world
toPorts:
- ports:
- port: "443"
protocol: TCP
---
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
name: host-egress-flux-system
spec:
nodeSelector: {}
egress:
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: flux-system
toPorts:
- ports:
- port: "8080"
protocol: TCP
- port: "8081"
protocol: TCP
- port: "9090"
protocol: TCP
- port: "9440"
protocol: TCP

29
vendor/infrastructure/flux/vso.yaml vendored Normal file
View file

@ -0,0 +1,29 @@
---
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultAuth
metadata:
name: flux
namespace: flux-system
spec:
method: kubernetes
mount: kubernetes
kubernetes:
role: flux
serviceAccount: flux-vso
vaultConnectionRef: vault/vault
---
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultStaticSecret
metadata:
name: forgejo-git-ssh
namespace: flux-system
spec:
type: kv-v2
mount: secret
path: flux/forgejo/git-ssh
destination:
name: git-ssh-auth
create: true
overwrite: true
refreshAfter: 1h
vaultAuthRef: flux