Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
100b50354b | ||
|
|
6ed84a77b1 | ||
|
|
3b7039a579 |
@@ -7,7 +7,7 @@ This file records repository decisions and the guidance that follows from them.
|
||||
### DEC-001: Make the Kubernetes cluster the primary infrastructure
|
||||
|
||||
- **Decision:** New services should be deployed in the Kubernetes cluster, and services running on other instances should be migrated there.
|
||||
[kustomization.yaml](kustomization.yaml) is entry point for the Kubernetes cluster configuration.
|
||||
[kustomization.yaml](kustomization.yaml) is the entry point for the Kubernetes cluster configuration.
|
||||
|
||||
### DEC-002: Document manual operations in README.md
|
||||
|
||||
@@ -35,11 +35,15 @@ This file records repository decisions and the guidance that follows from them.
|
||||
|
||||
### DEC-008: Apply configuration through Git pushes only
|
||||
|
||||
- **Decision:** Configuration should be applied only through Git pushes. Do not apply configuration directly to infrastructure, even when access is available. An agent may apply configs directly tom infrastructure only when explicitly requested.
|
||||
- **Decision:** Configuration should be applied only through Git pushes. Do not apply configuration directly to infrastructure, even when access is available. An agent may apply configs directly to infrastructure only when explicitly requested.
|
||||
|
||||
## Draft
|
||||
|
||||
No draft decisions recorded.
|
||||
### DEC-009: Use Cilium for FQDN-based egress filtering
|
||||
|
||||
- **Context:** Standard Kubernetes NetworkPolicy rules use IPs, CIDRs, and workload selectors, while domain-based egress filtering is desirable for workloads such as Hermes. Cilium supports DNS-aware FQDN policies.
|
||||
- **Decision:** Adopt Cilium as the Kubernetes CNI and use its FQDN policies to restrict workload egress to explicitly approved domains where domain-based filtering is required.
|
||||
- **Consequences:** This requires a planned migration from K3s' current CNI and built-in network-policy enforcer, with compatibility, resource usage, policy behavior, and rollback tested before rollout. Existing broad egress allows must be removed or narrowed because network policies are additive.
|
||||
|
||||
## Declined
|
||||
|
||||
@@ -52,5 +56,5 @@ Add each decision under its current status. Use a unique `DEC-NNN` identifier an
|
||||
### DEC-NNN: Short title
|
||||
|
||||
- **Context:** Why a decision is needed.
|
||||
- **Decision:** What is decided.
|
||||
- **Decision:** Rule that editors should follow.
|
||||
- **Consequences:** Important effects or tradeoffs.
|
||||
|
||||
@@ -44,7 +44,11 @@ spec:
|
||||
- from:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: hermes
|
||||
kubernetes.io/metadata.name: kube-system
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: traefik-kube-system
|
||||
app.kubernetes.io/name: traefik
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 9119
|
||||
|
||||
@@ -1,92 +1,30 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: hermes-ui
|
||||
data:
|
||||
default.conf: |
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8087;
|
||||
server_name _;
|
||||
|
||||
location / {
|
||||
proxy_pass http://hermes:9119;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_read_timeout 3600s;
|
||||
}
|
||||
}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: hermes-ui
|
||||
labels:
|
||||
app.kubernetes.io/name: hermes-ui
|
||||
name: hermes-ui-private
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: hermes-ui
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: hermes-ui
|
||||
spec:
|
||||
automountServiceAccountToken: false
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- rudolf-t
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8087
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /etc/nginx/conf.d/default.conf
|
||||
subPath: default.conf
|
||||
readOnly: true
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
add:
|
||||
- CHOWN
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: hermes-ui
|
||||
ipAllowList:
|
||||
sourceRange:
|
||||
- 100.64.0.0/10
|
||||
- 192.168.0.0/24
|
||||
- 192.168.1.0/24
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: hermes-ui
|
||||
labels:
|
||||
app.kubernetes.io/name: hermes-ui
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.middlewares: hermes-hermes-ui-private@kubernetescrd
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: hermes-ui
|
||||
ports:
|
||||
- name: http
|
||||
port: 8088
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: hermes.rudolf.keenetic.link
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: hermes
|
||||
port:
|
||||
number: 9119
|
||||
|
||||
Reference in New Issue
Block a user