tangled
alpha
login
or
join now
sans-self.org
/
infrastructure
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
Harden JuiceFS and place tofu state on upstream
sans-self.org
3 weeks ago
91583844
66ae1666
+39
5 changed files
expand all
collapse all
unified
split
.envrc
CHANGELOG.md
k8s
juicefs
kustomization.yaml
network-policy.yaml
kube.tf
+2
.envrc
···
1
1
export TF_VAR_hcloud_token=$(cat ./envs/TF_VAR_hcloud_token)
2
2
export KUBECONFIG=./homelab_kubeconfig.yaml
3
3
+
export AWS_ACCESS_KEY_ID=$(cat ./k8s/shared/s3-access-key.secret)
4
4
+
export AWS_SECRET_ACCESS_KEY=$(cat ./k8s/shared/s3-secret-key.secret)
+2
CHANGELOG.md
···
7
7
## [Unreleased]
8
8
9
9
### Security
10
10
+
- Add network policy for JuiceFS Redis namespace (#51)
10
11
- Harden knot SSH config and extend tarpit to knot HTTP routes (#19)
11
12
- Add tarpit for vulnerability scanners hitting known exploit paths (#18)
12
13
13
14
### Added
15
15
+
- Add S3 remote backend for OpenTofu state (#50)
14
16
- Migrate to 3-node HA cluster with JuiceFS and S3-backed storage (#38)
15
17
- Add JuiceFS Redis and CSI manifests for S3-backed storage (#47)
16
18
- Add backup restoration guide for PDS and knot (#35)
+1
k8s/juicefs/kustomization.yaml
···
7
7
- redis-deployment.yaml
8
8
- redis-service.yaml
9
9
- storageclass.yaml
10
10
+
- network-policy.yaml
10
11
11
12
generatorOptions:
12
13
disableNameSuffixHash: true
+19
k8s/juicefs/network-policy.yaml
···
1
1
+
apiVersion: networking.k8s.io/v1
2
2
+
kind: NetworkPolicy
3
3
+
metadata:
4
4
+
name: redis-ingress
5
5
+
namespace: juicefs
6
6
+
spec:
7
7
+
podSelector:
8
8
+
matchLabels:
9
9
+
app: juicefs-redis
10
10
+
policyTypes:
11
11
+
- Ingress
12
12
+
ingress:
13
13
+
# JuiceFS CSI components and mount pods within the namespace
14
14
+
- from:
15
15
+
- namespaceSelector:
16
16
+
matchLabels:
17
17
+
kubernetes.io/metadata.name: juicefs
18
18
+
ports:
19
19
+
- port: 6379
+15
kube.tf
···
125
125
126
126
terraform {
127
127
required_version = ">= 1.5.0"
128
128
+
129
129
+
backend "s3" {
130
130
+
bucket = "sans-self-net"
131
131
+
key = "tofu/terraform.tfstate"
132
132
+
region = "nbg1"
133
133
+
134
134
+
endpoints = { s3 = "https://nbg1.your-objectstorage.com" }
135
135
+
136
136
+
skip_credentials_validation = true
137
137
+
skip_metadata_api_check = true
138
138
+
skip_region_validation = true
139
139
+
skip_requesting_account_id = true
140
140
+
use_path_style = true
141
141
+
}
142
142
+
128
143
required_providers {
129
144
hcloud = {
130
145
source = "hetznercloud/hcloud"