Skip to content

Commit c472d37

Browse files
fix: binding mode
1 parent 4101a13 commit c472d37

File tree

6 files changed

+55
-3
lines changed

6 files changed

+55
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ some things I'm proud of:
8383
1. Bootstrap the Kubernetes cluster:
8484

8585
```bash
86-
talosctl bootstrap --nodes 192.168.1.81
86+
talosctl bootstrap --nodes 192.168.1.8 talosctl bootstrap --nodes 192.168.1.811
8787
```
8888

8989
1. Create a Kubernetes configuration:

cdk8s/src/apps/openebs.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { Chart } from "cdk8s";
2+
import { Application } from "../../imports/argoproj.io.ts";
3+
import versions from "../versions.ts";
4+
5+
export function createOpenEBSApp(chart: Chart) {
6+
new Application(chart, "openebs-app", {
7+
metadata: {
8+
name: "openebs",
9+
},
10+
spec: {
11+
project: "default",
12+
source: {
13+
repoUrl: "https://openebs.github.io/openebs",
14+
targetRevision: versions["openebs"],
15+
chart: "openebs",
16+
helm: {
17+
parameters: [
18+
{ name: "engines.replicated.mayastor.enabled", value: "false" },
19+
{ name: "engines.local.lvm.enabled", value: "false" },
20+
{ name: "zfs-localpv.zfsNode.encrKeysDir", value: "/var" },
21+
],
22+
},
23+
},
24+
destination: {
25+
server: "https://kubernetes.default.svc",
26+
namespace: "openebs",
27+
},
28+
syncPolicy: {
29+
automated: {},
30+
syncOptions: ["CreateNamespace=true"],
31+
},
32+
},
33+
});
34+
}

cdk8s/src/charts/apps.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { createLokiApp } from "../apps/loki.ts";
1717
import { createPromtailApp } from "../apps/promtail.ts";
1818
import { Namespace } from "cdk8s-plus";
1919
import { createStorageClasses } from "../storageclasses.ts";
20+
import { createOpenEBSApp } from "../apps/openebs.ts";
2021

2122
export function createAppsChart(app: App) {
2223
const chart = new Chart(app, "apps", {
@@ -26,6 +27,12 @@ export function createAppsChart(app: App) {
2627

2728
createStorageClasses(chart);
2829

30+
new Namespace(chart, `torvals-namespace`, {
31+
metadata: {
32+
name: `torvalds`,
33+
},
34+
});
35+
2936
new Namespace(chart, `scout-beta-namespace`, {
3037
metadata: {
3138
name: `scout-beta`,
@@ -38,6 +45,7 @@ export function createAppsChart(app: App) {
3845
},
3946
});
4047

48+
createOpenEBSApp(chart);
4149
createOnePasswordApp(chart);
4250
createArgoCdApp(chart);
4351
createTailscaleApp(chart);

cdk8s/src/storageclasses.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ export function createStorageClasses(chart: Chart) {
1515
allowVolumeExpansion: true,
1616
reclaimPolicy: "Retain",
1717
parameters: {
18-
fstype: "zfs",
18+
"csi.storage.k8s.io/fstype": "zfs",
1919
poolname: "zfspv-pool-nvme",
2020
compression: "off",
2121
dedup: "off",
2222
recordsize: "128k",
2323
shared: "yes",
2424
},
25+
volumeBindingMode: "WaitForFirstConsumer",
2526
});
2627

2728
new KubeStorageClass(chart, "host-zfs-hdd", {
@@ -30,13 +31,14 @@ export function createStorageClasses(chart: Chart) {
3031
allowVolumeExpansion: true,
3132
reclaimPolicy: "Retain",
3233
parameters: {
33-
fstype: "zfs",
34+
"csi.storage.k8s.io/fstype": "zfs",
3435
poolname: "zfspv-pool-hdd",
3536
compression: "off",
3637
dedup: "off",
3738
recordsize: "128k",
3839
shared: "yes",
3940
},
41+
volumeBindingMode: "WaitForFirstConsumer",
4042
});
4143

4244
new VolumeSnapshotClass(chart, "host-zfs-snapshot", {

cdk8s/src/versions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ const versions = {
7979
"loki": "6.29.0",
8080
// renovate: datasource=helm registryUrl=https://grafana.github.io/helm-charts versioning=semver
8181
"promtail": "6.16.6",
82+
// renovate: datasource=helm registryUrl=https://openebs.github.io/openebs versioning=semver
83+
"openebs": "4.2.0",
8284
"shepherdjerred/scout-for-lol/beta": "1.0.165",
8385
"shepherdjerred/scout-for-lol/prod": "1.0.2",
8486
// renovate: datasource=docker registryUrl=https://docker.io versioning=docker

talos/pods/shell.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ spec:
1919
hostPath:
2020
path: /var/mnt
2121
type: Directory
22+
- name: host-root
23+
hostPath:
24+
path: /
25+
type: Directory
2226
containers:
2327
- command: ["sleep", "infinity"]
2428
image: debian
@@ -29,3 +33,5 @@ spec:
2933
volumeMounts:
3034
- name: var-mnt
3135
mountPath: /var/mnt
36+
- name: host-root
37+
mountPath: /host-root

0 commit comments

Comments
 (0)