4
apps/apps-namespace.yaml
Normal file
4
apps/apps-namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: apps
|
||||||
5
apps/whoami.yaml
Normal file
5
apps/whoami.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- apps-namespace.yaml
|
||||||
|
- ./whoami
|
||||||
20
apps/whoami/deployment.yaml
Normal file
20
apps/whoami/deployment.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: whoami
|
||||||
|
namespace: apps
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: whoami
|
||||||
|
replicas: 1
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: whoami
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: whoami
|
||||||
|
image: traefik/whoami
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
16
apps/whoami/ingress.yaml
Normal file
16
apps/whoami/ingress.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: whoami-ingress
|
||||||
|
namespace: apps
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: whoami
|
||||||
|
port:
|
||||||
|
name: web
|
||||||
5
apps/whoami/kustomization.yaml
Normal file
5
apps/whoami/kustomization.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: apps
|
||||||
|
resources:
|
||||||
|
- deployment.yaml
|
||||||
14
apps/whoami/service.yaml
Normal file
14
apps/whoami/service.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: whoami
|
||||||
|
namespace: apps
|
||||||
|
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: web
|
||||||
|
port: 80
|
||||||
|
targetPort: web
|
||||||
|
|
||||||
|
selector:
|
||||||
|
app: whoami
|
||||||
14
clusters/talos/apps.yaml
Normal file
14
clusters/talos/apps.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: apps
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
interval: 1h
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: flux-system
|
||||||
|
path: ./apps
|
||||||
|
prune: true
|
||||||
14
clusters/talos/infrastructure.yaml
Normal file
14
clusters/talos/infrastructure.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: infrastructure
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
interval: 1h
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: flux-system
|
||||||
|
path: ./infrastructure
|
||||||
|
prune: true
|
||||||
5
clusters/talos/kustomization.yaml
Normal file
5
clusters/talos/kustomization.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- infrastructure.yaml
|
||||||
|
- apps.yaml
|
||||||
4
infrastructure/ingress-namespace.yaml
Normal file
4
infrastructure/ingress-namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: ingress
|
||||||
5
infrastructure/traefik.yaml
Normal file
5
infrastructure/traefik.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- apps-namespace.yaml
|
||||||
|
- ./whoami
|
||||||
5
infrastructure/traefik/kustomization.yaml
Normal file
5
infrastructure/traefik/kustomization.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- traefik-repository.yaml
|
||||||
|
- traefik-helm-release.yaml
|
||||||
18
infrastructure/traefik/traefik-helm-release.yaml
Normal file
18
infrastructure/traefik/traefik-helm-release.yaml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: traefik
|
||||||
|
namespace: ingress
|
||||||
|
spec:
|
||||||
|
interval: 5m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: traefik
|
||||||
|
version: '26.0.0'
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: traefik
|
||||||
|
namespace: ingress
|
||||||
|
interval: 15m
|
||||||
|
valuesFiles:
|
||||||
|
- values.yaml
|
||||||
8
infrastructure/traefik/traefik-repository.yaml
Normal file
8
infrastructure/traefik/traefik-repository.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: source.toolkit.fluxcd.io/v1beta2
|
||||||
|
kind: HelmRepository
|
||||||
|
metadata:
|
||||||
|
name: traefik
|
||||||
|
namespace: ingress
|
||||||
|
spec:
|
||||||
|
interval: 15m
|
||||||
|
url: https://traefik.github.io/charts
|
||||||
0
infrastructure/traefik/values.yaml
Normal file
0
infrastructure/traefik/values.yaml
Normal file
@@ -65,3 +65,22 @@ And apply that control plane yaml with
|
|||||||
|
|
||||||
`helm repo add cilium https://helm.cilium.io/`
|
`helm repo add cilium https://helm.cilium.io/`
|
||||||
`helm repo update`
|
`helm repo update`
|
||||||
|
|
||||||
|
```sh
|
||||||
|
helm install \
|
||||||
|
cilium \
|
||||||
|
cilium/cilium \
|
||||||
|
--version 1.15.0 \
|
||||||
|
--namespace kube-system \
|
||||||
|
--set ipam.mode=kubernetes \
|
||||||
|
--set=kubeProxyReplacement=disabled \
|
||||||
|
--set=securityContext.capabilities.ciliumAgent="{CHOWN,KILL,NET_ADMIN,NET_RAW,IPC_LOCK,SYS_ADMIN,SYS_RESOURCE,DAC_OVERRIDE,FOWNER,SETGID,SETUID}" \
|
||||||
|
--set=securityContext.capabilities.cleanCiliumState="{NET_ADMIN,SYS_ADMIN,SYS_RESOURCE}" \
|
||||||
|
--set=cgroup.autoMount.enabled=false \
|
||||||
|
--set=cgroup.hostRoot=/sys/fs/cgroup
|
||||||
|
```
|
||||||
|
|
||||||
|
## Flux
|
||||||
|
|
||||||
|
`flux bootstrap git --private-key-file=/config/.ssh/gitea --url ssh://git@gitea.home.joemonk.co.uk:2222/joe/gitops.git --branch ma
|
||||||
|
in --path=clusters/talos`
|
||||||
Reference in New Issue
Block a user