Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 1 | // k0.hswaw.net kubernetes cluster |
| 2 | // This defines the cluster as a single object. |
| 3 | // Use the sibling k0*.jsonnet 'view' files to actually apply the configuration. |
| 4 | |
| 5 | local kube = import "../../kube/kube.libsonnet"; |
| 6 | local policies = import "../../kube/policies.libsonnet"; |
| 7 | |
| 8 | local cluster = import "cluster.libsonnet"; |
| 9 | |
Serge Bazanski | 3c5d836 | 2021-02-06 17:27:02 +0000 | [diff] [blame] | 10 | local admitomatic = import "lib/admitomatic.libsonnet"; |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 11 | local cockroachdb = import "lib/cockroachdb.libsonnet"; |
| 12 | local registry = import "lib/registry.libsonnet"; |
| 13 | local rook = import "lib/rook.libsonnet"; |
| 14 | |
| 15 | { |
| 16 | k0: { |
| 17 | local k0 = self, |
| 18 | cluster: cluster.Cluster("k0", "hswaw.net") { |
| 19 | cfg+: { |
Serge Bazanski | 3d29484 | 2020-08-04 01:34:07 +0200 | [diff] [blame] | 20 | storageClassNameParanoid: k0.ceph.waw3Pools.blockRedundant.name, |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 21 | }, |
| 22 | metallb+: { |
| 23 | cfg+: { |
Serge Bazanski | a5ed644 | 2020-09-20 22:52:57 +0000 | [diff] [blame] | 24 | // Peer with calico running on same node. |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 25 | peers: [ |
| 26 | { |
Serge Bazanski | a5ed644 | 2020-09-20 22:52:57 +0000 | [diff] [blame] | 27 | "peer-address": "127.0.0.1", |
| 28 | "peer-asn": 65003, |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 29 | "my-asn": 65002, |
| 30 | }, |
| 31 | ], |
Serge Bazanski | a5ed644 | 2020-09-20 22:52:57 +0000 | [diff] [blame] | 32 | // Public IP address pools. Keep in sync with k0.calico.yaml. |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 33 | addressPools: [ |
| 34 | { |
| 35 | name: "public-v4-1", |
| 36 | protocol: "bgp", |
| 37 | addresses: [ |
| 38 | "185.236.240.48/28", |
| 39 | ], |
| 40 | }, |
| 41 | { |
| 42 | name: "public-v4-2", |
| 43 | protocol: "bgp", |
| 44 | addresses: [ |
| 45 | "185.236.240.112/28" |
| 46 | ], |
| 47 | }, |
| 48 | ], |
| 49 | }, |
| 50 | }, |
| 51 | }, |
| 52 | |
| 53 | // Docker registry |
| 54 | registry: registry.Environment { |
| 55 | cfg+: { |
| 56 | domain: "registry.%s" % [k0.cluster.fqdn], |
| 57 | storageClassName: k0.cluster.cfg.storageClassNameParanoid, |
Serge Bazanski | 3d29484 | 2020-08-04 01:34:07 +0200 | [diff] [blame] | 58 | objectStorageName: "waw-hdd-redundant-3-object", |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 59 | }, |
| 60 | }, |
| 61 | |
| 62 | // CockroachDB, running on bc01n{01,02,03}. |
| 63 | cockroach: { |
| 64 | waw2: cockroachdb.Cluster("crdb-waw1") { |
| 65 | cfg+: { |
| 66 | topology: [ |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 67 | { name: "bc01n02", node: "bc01n02.hswaw.net" }, |
Patryk Jakuszew | edf14cc | 2021-01-23 23:00:29 +0100 | [diff] [blame] | 68 | { name: "dcr01s22", node: "dcr01s22.hswaw.net" }, |
Serge Bazanski | bdd403c | 2021-10-28 23:37:38 +0000 | [diff] [blame] | 69 | { name: "dcr01s24", node: "dcr01s24.hswaw.net" }, |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 70 | ], |
| 71 | // Host path on SSD. |
| 72 | hostPath: "/var/db/crdb-waw1", |
Serge Bazanski | 509ab6e | 2020-07-30 22:43:20 +0200 | [diff] [blame] | 73 | extraDNS: [ |
| 74 | "crdb-waw1.hswaw.net", |
| 75 | ], |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 76 | }, |
Serge Bazanski | bdd403c | 2021-10-28 23:37:38 +0000 | [diff] [blame] | 77 | initJob:: null, |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 78 | }, |
| 79 | clients: { |
| 80 | cccampix: k0.cockroach.waw2.Client("cccampix"), |
| 81 | cccampixDev: k0.cockroach.waw2.Client("cccampix-dev"), |
| 82 | buglessDev: k0.cockroach.waw2.Client("bugless-dev"), |
| 83 | sso: k0.cockroach.waw2.Client("sso"), |
Serge Bazanski | 509ab6e | 2020-07-30 22:43:20 +0200 | [diff] [blame] | 84 | herpDev: k0.cockroach.waw2.Client("herp-dev"), |
Patryk Jakuszew | f315388 | 2021-01-23 15:38:50 +0100 | [diff] [blame] | 85 | gitea: k0.cockroach.waw2.Client("gitea"), |
Piotr Dobrowolski | f4a6a56 | 2021-02-01 21:32:25 +0100 | [diff] [blame] | 86 | issues: k0.cockroach.waw2.Client("issues"), |
Serge Bazanski | bf266c6 | 2021-03-17 21:48:58 +0000 | [diff] [blame] | 87 | dns: k0.cockroach.waw2.Client("dns"), |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 88 | }, |
| 89 | }, |
| 90 | |
| 91 | ceph: { |
| 92 | // waw1 cluster - dead as of 2019/08/06, data corruption |
Serge Bazanski | 61f978a | 2021-01-22 16:26:07 +0100 | [diff] [blame] | 93 | // waw2 cluster - dead as of 2021/01/22, torn down (horrible M610 RAID controllers are horrible) |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 94 | |
Serge Bazanski | 464fb04 | 2021-09-11 20:24:27 +0000 | [diff] [blame] | 95 | // waw3: 6TB SAS 3.5" HDDs, internal Rook cluster. |
| 96 | // |
| 97 | // Suffers from rook going apeshit and nuking all mons if enough of |
| 98 | // a control plane is up for rook to run but if nodes are |
| 99 | // unavailable to the point of it deciding that no mon exists and |
| 100 | // it should create some new ones, fully nuking the monmap and |
| 101 | // making recovery a pain. |
| 102 | // |
| 103 | // Supposedly new versions of Rook slowly fix these issues, but q3k |
| 104 | // doesn't personally trust this codebase anymore. He'd rather |
| 105 | // manage the actual Ceph cluster myself, we don't need all of this |
| 106 | // magic. |
| 107 | // |
| 108 | // See: b.hswaw.net/6 |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 109 | waw3: rook.Cluster(k0.cluster.rook, "ceph-waw3") { |
| 110 | spec: { |
| 111 | mon: { |
Serge Bazanski | 1684211 | 2022-11-17 19:30:05 +0000 | [diff] [blame] | 112 | count: 3, |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 113 | allowMultiplePerNode: false, |
| 114 | }, |
Serge Bazanski | 793ca1b | 2021-03-07 00:07:19 +0000 | [diff] [blame] | 115 | resources: { |
| 116 | osd: { |
| 117 | requests: { |
Serge Bazanski | 64de7af | 2021-03-17 21:47:29 +0000 | [diff] [blame] | 118 | cpu: "2", |
| 119 | memory: "6G", |
Serge Bazanski | 793ca1b | 2021-03-07 00:07:19 +0000 | [diff] [blame] | 120 | }, |
| 121 | limits: { |
Serge Bazanski | 64de7af | 2021-03-17 21:47:29 +0000 | [diff] [blame] | 122 | cpu: "2", |
| 123 | memory: "8G", |
Serge Bazanski | 793ca1b | 2021-03-07 00:07:19 +0000 | [diff] [blame] | 124 | }, |
| 125 | }, |
| 126 | |
| 127 | }, |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 128 | storage: { |
| 129 | useAllNodes: false, |
| 130 | useAllDevices: false, |
| 131 | config: { |
| 132 | databaseSizeMB: "1024", |
| 133 | journalSizeMB: "1024", |
| 134 | }, |
Serge Bazanski | 464fb04 | 2021-09-11 20:24:27 +0000 | [diff] [blame] | 135 | |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 136 | nodes: [ |
| 137 | { |
| 138 | name: "dcr01s22.hswaw.net", |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 139 | devices: [ |
Serge Bazanski | 464fb04 | 2021-09-11 20:24:27 +0000 | [diff] [blame] | 140 | { name: "/dev/disk/by-id/wwn-0x" + id } |
| 141 | for id in [ |
Serge Bazanski | 712a5dc | 2023-02-28 01:15:40 +0000 | [diff] [blame] | 142 | "5000c5008508c433", # ST6000NM0034 Z4D40QZR0000R629ME1B |
| 143 | "5000c500850989cf", # ST6000NM0034 Z4D40JRL0000R63008A2 |
| 144 | "5000c5008508baf7", # ST6000NM0034 Z4D40M380000R630V00M |
| 145 | "5000c5008508f843", # ST6000NM0034 Z4D40LGP0000R630UVTD |
| 146 | "5000c500850312cb", # ST6000NM0034 Z4D3ZAAX0000R629NW31 |
| 147 | "5000c500850293e3", # ST6000NM0034 Z4D3Z5TD0000R629MF7P |
| 148 | "5000c5008508e3ef", # ST6000NM0034 Z4D40LM50000R630V0W3 |
| 149 | "5000c5008508e23f", # ST6000NM0034 Z4D40QMX0000R629MD3C |
Serge Bazanski | 464fb04 | 2021-09-11 20:24:27 +0000 | [diff] [blame] | 150 | ] |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 151 | ], |
| 152 | }, |
| 153 | { |
| 154 | name: "dcr01s24.hswaw.net", |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 155 | devices: [ |
Serge Bazanski | 464fb04 | 2021-09-11 20:24:27 +0000 | [diff] [blame] | 156 | { name: "/dev/disk/by-id/wwn-0x" + id } |
| 157 | for id in [ |
Serge Bazanski | 7572f07 | 2023-03-10 20:54:35 +0100 | [diff] [blame] | 158 | "5000c5008508c9ef", # ST6000NM0034 Z4D40LY40000R630UZCE |
| 159 | "5000c5008508df33", # ST6000NM0034 Z4D40QQ00000R629MB25 |
| 160 | "5000c5008508dd3b", # ST6000NM0034 Z4D40QQJ0000R630RBY6 |
| 161 | "5000c5008509199b", # ST6000NM0034 Z4D40QG10000R630V0X9 |
| 162 | "5000c5008508ee03", # ST6000NM0034 Z4D40LHH0000R630UYP0 |
| 163 | "5000c50085046abf", # ST6000NM0034 Z4D3ZF1B0000R629NV9P |
| 164 | "5000c5008502929b", # ST6000NM0034 Z4D3Z5WG0000R629MF14 |
Serge Bazanski | 464fb04 | 2021-09-11 20:24:27 +0000 | [diff] [blame] | 165 | ] |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 166 | ], |
| 167 | }, |
| 168 | ], |
| 169 | }, |
| 170 | benji:: { |
| 171 | metadataStorageClass: "waw-hdd-redundant-3", |
| 172 | encryptionPassword: std.split((importstr "../secrets/plain/k0-benji-encryption-password"), '\n')[0], |
| 173 | pools: [ |
| 174 | "waw-hdd-redundant-3", |
| 175 | "waw-hdd-redundant-3-metadata", |
| 176 | "waw-hdd-yolo-3", |
| 177 | ], |
| 178 | s3Configuration: { |
| 179 | awsAccessKeyId: "RPYZIROFXNLQVU2WJ4R3", |
| 180 | awsSecretAccessKey: std.split((importstr "../secrets/plain/k0-benji-secret-access-key"), '\n')[0], |
| 181 | bucketName: "benji-k0-backups-waw3", |
| 182 | endpointUrl: "https://s3.eu-central-1.wasabisys.com/", |
| 183 | }, |
| 184 | } |
| 185 | }, |
| 186 | }, |
| 187 | waw3Pools: { |
| 188 | // redundant block storage |
| 189 | blockRedundant: rook.ECBlockPool(k0.ceph.waw3, "waw-hdd-redundant-3") { |
| 190 | metadataReplicas: 2, |
| 191 | spec: { |
| 192 | failureDomain: "host", |
| 193 | replicated: { |
| 194 | size: 2, |
| 195 | }, |
| 196 | }, |
| 197 | }, |
Serge Bazanski | 242ec58 | 2020-09-20 15:36:11 +0000 | [diff] [blame] | 198 | // q3k's personal pool, used externally from k8s. |
| 199 | q3kRedundant: rook.ECBlockPool(k0.ceph.waw3, "waw-hdd-redundant-q3k-3") { |
| 200 | metadataReplicas: 2, |
| 201 | spec: { |
| 202 | failureDomain: "host", |
| 203 | replicated: { |
| 204 | size: 2, |
| 205 | }, |
| 206 | }, |
| 207 | }, |
Serge Bazanski | 38f72fe | 2021-09-13 23:43:47 +0000 | [diff] [blame] | 208 | |
| 209 | object: { |
| 210 | local poolSpec = { |
| 211 | failureDomain: "host", |
| 212 | replicated: { size: 2 }, |
| 213 | }, |
| 214 | |
| 215 | realm: rook.S3ObjectRealm(k0.ceph.waw3, "hscloud"), |
| 216 | zonegroup: rook.S3ObjectZoneGroup(self.realm, "eu"), |
| 217 | // This is serving at object.ceph-waw3.hswaw.net, but |
| 218 | // internally to Ceph it is known as |
| 219 | // waw-hdd-redundant-3-object (name of radosgw zone). |
| 220 | store: rook.S3ObjectStore(self.zonegroup, "waw-hdd-redundant-3-object") { |
| 221 | cfg+: { |
| 222 | // Override so that this radosgw serves on |
| 223 | // object.ceph-{waw3,eu}.hswaw.net instead of |
| 224 | // ceph-{waw-hdd-redundant-3-object,eu}. |
| 225 | domainParts: [ |
| 226 | "waw3", "eu", |
| 227 | ], |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 228 | }, |
Serge Bazanski | 38f72fe | 2021-09-13 23:43:47 +0000 | [diff] [blame] | 229 | spec: { |
| 230 | metadataPool: poolSpec, |
| 231 | dataPool: poolSpec, |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 232 | }, |
| 233 | }, |
| 234 | }, |
| 235 | }, |
| 236 | |
| 237 | // Clients for S3/radosgw storage. |
| 238 | clients: { |
| 239 | # Used for owncloud.hackerspace.pl, which for now lives on boston-packets.hackerspace.pl. |
| 240 | nextcloudWaw3: kube.CephObjectStoreUser("nextcloud") { |
| 241 | metadata+: { |
| 242 | namespace: "ceph-waw3", |
| 243 | }, |
| 244 | spec: { |
| 245 | store: "waw-hdd-redundant-3-object", |
| 246 | displayName: "nextcloud", |
| 247 | }, |
| 248 | }, |
Piotr Dobrowolski | 3b8a43f | 2021-02-01 21:19:48 +0100 | [diff] [blame] | 249 | # issues.hackerspace.pl (redmine) attachments bucket |
| 250 | issuesWaw3: kube.CephObjectStoreUser("issues") { |
| 251 | metadata+: { |
| 252 | namespace: "ceph-waw3", |
| 253 | }, |
| 254 | spec: { |
| 255 | store: "waw-hdd-redundant-3-object", |
| 256 | displayName: "issues", |
| 257 | }, |
| 258 | }, |
Piotr Dobrowolski | e839f95 | 2021-09-14 22:21:22 +0200 | [diff] [blame] | 259 | # matrix.hackerspace.pl media storage bucket |
| 260 | matrixWaw3: kube.CephObjectStoreUser("matrix") { |
| 261 | metadata+: { |
| 262 | namespace: "ceph-waw3", |
| 263 | }, |
| 264 | spec: { |
| 265 | store: "waw-hdd-redundant-3-object", |
| 266 | displayName: "matrix", |
| 267 | }, |
| 268 | }, |
Bartosz Stebel | 54a34b2 | 2022-03-05 23:20:56 +0100 | [diff] [blame] | 269 | # tape staging temporary storage |
| 270 | tapeStaging: kube.CephObjectStoreUser("tape-staging") { |
| 271 | metadata+: { |
| 272 | namespace: "ceph-waw3", |
| 273 | }, |
| 274 | spec: { |
| 275 | store: "waw-hdd-redundant-3-object", |
| 276 | displayName: "tape-staging", |
| 277 | }, |
| 278 | }, |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 279 | |
| 280 | # nuke@hackerspace.pl's personal storage. |
| 281 | nukePersonalWaw3: kube.CephObjectStoreUser("nuke-personal") { |
| 282 | metadata+: { |
| 283 | namespace: "ceph-waw3", |
| 284 | }, |
| 285 | spec: { |
| 286 | store: "waw-hdd-redundant-3-object", |
| 287 | displayName: "nuke-personal", |
| 288 | }, |
| 289 | }, |
| 290 | |
| 291 | # patryk@hackerspace.pl's ArmA3 mod bucket. |
| 292 | cz2ArmaModsWaw3: kube.CephObjectStoreUser("cz2-arma3mods") { |
| 293 | metadata+: { |
| 294 | namespace: "ceph-waw3", |
| 295 | }, |
| 296 | spec: { |
| 297 | store: "waw-hdd-redundant-3-object", |
| 298 | displayName: "cz2-arma3mods", |
| 299 | }, |
| 300 | }, |
Bartosz Stebel | 0156ab2 | 2023-02-20 21:33:33 +0100 | [diff] [blame] | 301 | # implr's personal user |
| 302 | implrSparkWaw3: kube.CephObjectStoreUser("implr") { |
Bartosz Stebel | d9df587 | 2020-06-13 21:19:40 +0200 | [diff] [blame] | 303 | metadata+: { |
| 304 | namespace: "ceph-waw3", |
| 305 | }, |
| 306 | spec: { |
| 307 | store: "waw-hdd-redundant-3-object", |
Bartosz Stebel | 0156ab2 | 2023-02-20 21:33:33 +0100 | [diff] [blame] | 308 | displayName: "implr", |
Bartosz Stebel | d9df587 | 2020-06-13 21:19:40 +0200 | [diff] [blame] | 309 | }, |
| 310 | }, |
Sergiusz Bazanski | b1aadd8 | 2020-06-24 19:06:17 +0200 | [diff] [blame] | 311 | # q3k's personal user |
| 312 | q3kWaw3: kube.CephObjectStoreUser("q3k") { |
| 313 | metadata+: { |
| 314 | namespace: "ceph-waw3", |
| 315 | }, |
| 316 | spec: { |
| 317 | store: "waw-hdd-redundant-3-object", |
| 318 | displayName: "q3k", |
| 319 | }, |
| 320 | }, |
Serge Bazanski | bfe9bb0 | 2020-10-27 20:50:50 +0100 | [diff] [blame] | 321 | # woju's personal user |
| 322 | wojuWaw3: kube.CephObjectStoreUser("woju") { |
| 323 | metadata+: { |
| 324 | namespace: "ceph-waw3", |
| 325 | }, |
| 326 | spec: { |
| 327 | store: "waw-hdd-redundant-3-object", |
| 328 | displayName: "woju", |
| 329 | }, |
Patryk Jakuszew | cae7cf7 | 2020-11-28 14:36:48 +0100 | [diff] [blame] | 330 | }, |
Patryk Jakuszew | 34668a5 | 2020-11-28 13:45:25 +0100 | [diff] [blame] | 331 | # cz3's (patryk@hackerspace.pl) personal user |
| 332 | cz3Waw3: kube.CephObjectStoreUser("cz3") { |
| 333 | metadata+: { |
| 334 | namespace: "ceph-waw3", |
| 335 | }, |
| 336 | spec: { |
| 337 | store: "waw-hdd-redundant-3-object", |
| 338 | displayName: "cz3", |
| 339 | }, |
Serge Bazanski | bfe9bb0 | 2020-10-27 20:50:50 +0100 | [diff] [blame] | 340 | }, |
Piotr Dobrowolski | e839f95 | 2021-09-14 22:21:22 +0200 | [diff] [blame] | 341 | # informatic's personal user |
| 342 | informaticWaw3: kube.CephObjectStoreUser("informatic") { |
| 343 | metadata+: { |
| 344 | namespace: "ceph-waw3", |
| 345 | }, |
| 346 | spec: { |
| 347 | store: "waw-hdd-redundant-3-object", |
| 348 | displayName: "informatic", |
| 349 | }, |
| 350 | }, |
Serge Bazanski | 1684211 | 2022-11-17 19:30:05 +0000 | [diff] [blame] | 351 | # mastodon qa and prod |
| 352 | mastodonWaw3: { |
| 353 | qa: kube.CephObjectStoreUser("mastodon-qa") { |
| 354 | metadata+: { |
| 355 | namespace: "ceph-waw3", |
| 356 | }, |
| 357 | spec: { |
| 358 | store: "waw-hdd-redundant-3-object", |
| 359 | displayName: "mastodon-qa", |
| 360 | }, |
| 361 | }, |
| 362 | prod: kube.CephObjectStoreUser("mastodon-prod") { |
| 363 | metadata+: { |
| 364 | namespace: "ceph-waw3", |
| 365 | }, |
| 366 | spec: { |
| 367 | store: "waw-hdd-redundant-3-object", |
| 368 | displayName: "mastodon-prod", |
| 369 | }, |
| 370 | }, |
| 371 | }, |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 372 | }, |
| 373 | }, |
| 374 | |
| 375 | |
| 376 | # These are policies allowing for Insecure pods in some namespaces. |
| 377 | # A lot of them are spurious and come from the fact that we deployed |
| 378 | # these namespaces before we deployed the draconian PodSecurityPolicy |
| 379 | # we have now. This should be fixed by setting up some more granular |
| 380 | # policies, or fixing the workloads to not need some of the permission |
| 381 | # bits they use, whatever those might be. |
| 382 | # TODO(q3k): fix this? |
| 383 | unnecessarilyInsecureNamespaces: [ |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 384 | policies.AllowNamespaceInsecure("ceph-waw3"), |
| 385 | policies.AllowNamespaceInsecure("matrix"), |
| 386 | policies.AllowNamespaceInsecure("registry"), |
| 387 | policies.AllowNamespaceInsecure("internet"), |
| 388 | # TODO(implr): restricted policy with CAP_NET_ADMIN and tuntap, but no full root |
| 389 | policies.AllowNamespaceInsecure("implr-vpn"), |
| 390 | ], |
Serge Bazanski | 3c5d836 | 2021-02-06 17:27:02 +0000 | [diff] [blame] | 391 | |
| 392 | # Admission controller that permits non-privileged users to manage |
| 393 | # their namespaces without danger of hijacking important URLs. |
| 394 | admitomatic: admitomatic.Environment { |
| 395 | cfg+: { |
| 396 | proto: { |
| 397 | // Domains allowed in given namespaces. If a domain exists |
| 398 | // anywhere, ingresses will only be permitted to be created |
| 399 | // within namespaces in which it appears here. This works |
| 400 | // the same way for wildcards, if a wildcard exists in this |
| 401 | // list it blocks all unauthorized uses of that domain |
| 402 | // elsewhere. |
| 403 | // |
| 404 | // See //cluster/admitomatic for more information. |
| 405 | // |
| 406 | // Or, tl;dr: |
| 407 | // |
| 408 | // If you do a wildcard CNAME onto the k0 ingress, you |
| 409 | // should explicitly state *.your.name.com here. |
| 410 | // |
| 411 | // If you just want to protect your host from being |
| 412 | // hijacked by other cluster users, you should also state |
| 413 | // it here (either as a wildcard, or unary domains). |
| 414 | allow_domain: [ |
| 415 | { namespace: "covid-formity", dns: "covid19.hackerspace.pl" }, |
| 416 | { namespace: "covid-formity", dns: "covid.hackerspace.pl" }, |
| 417 | { namespace: "covid-formity", dns: "www.covid.hackerspace.pl" }, |
radex | c2c66bf | 2023-08-17 14:28:32 +0200 | [diff] [blame] | 418 | { namespace: "inventory", dns: "inventory.hackerspace.pl" }, |
Serge Bazanski | 3c5d836 | 2021-02-06 17:27:02 +0000 | [diff] [blame] | 419 | { namespace: "devtools-prod", dns: "hackdoc.hackerspace.pl" }, |
| 420 | { namespace: "devtools-prod", dns: "cs.hackerspace.pl" }, |
| 421 | { namespace: "engelsystem-prod", dns: "engelsystem.hackerspace.pl" }, |
| 422 | { namespace: "gerrit", dns: "gerrit.hackerspace.pl" }, |
| 423 | { namespace: "gitea-prod", dns: "gitea.hackerspace.pl" }, |
| 424 | { namespace: "hswaw-prod", dns: "*.hackerspace.pl" }, |
Serge Bazanski | 99b91b1 | 2021-03-28 17:34:32 +0000 | [diff] [blame] | 425 | { namespace: "hswaw-prod", dns: "*.hswaw.net" }, |
Serge Bazanski | 3c5d836 | 2021-02-06 17:27:02 +0000 | [diff] [blame] | 426 | { namespace: "internet", dns: "internet.hackerspace.pl" }, |
| 427 | { namespace: "matrix", dns: "matrix.hackerspace.pl" }, |
| 428 | { namespace: "onlyoffice-prod", dns: "office.hackerspace.pl" }, |
Piotr Dobrowolski | 3b2a2a2 | 2023-01-05 08:26:02 +0100 | [diff] [blame] | 429 | { namespace: "paperless", dns: "paperless.hackerspace.pl" }, |
Serge Bazanski | 3c5d836 | 2021-02-06 17:27:02 +0000 | [diff] [blame] | 430 | { namespace: "redmine", dns: "issues.hackerspace.pl" }, |
Serge Bazanski | 877cf0a | 2021-02-08 00:34:34 +0100 | [diff] [blame] | 431 | { namespace: "redmine", dns: "b.hackerspace.pl" }, |
| 432 | { namespace: "redmine", dns: "b.hswaw.net" }, |
| 433 | { namespace: "redmine", dns: "xn--137h.hackerspace.pl" }, |
| 434 | { namespace: "redmine", dns: "xn--137h.hswaw.net" }, |
Serge Bazanski | 3c5d836 | 2021-02-06 17:27:02 +0000 | [diff] [blame] | 435 | { namespace: "speedtest", dns: "speedtest.hackerspace.pl" }, |
| 436 | { namespace: "sso", dns: "sso.hackerspace.pl" }, |
Serge Bazanski | 1684211 | 2022-11-17 19:30:05 +0000 | [diff] [blame] | 437 | { namespace: "mastodon-hackerspace-qa", dns: "social-qa-2.hackerspace.pl" }, |
| 438 | { namespace: "mastodon-hackerspace-prod", dns: "social.hackerspace.pl" }, |
Serge Bazanski | 3c5d836 | 2021-02-06 17:27:02 +0000 | [diff] [blame] | 439 | |
| 440 | { namespace: "ceph-waw3", dns: "ceph-waw3.hswaw.net" }, |
| 441 | { namespace: "ceph-waw3", dns: "object.ceph-waw3.hswaw.net" }, |
Serge Bazanski | 38f72fe | 2021-09-13 23:43:47 +0000 | [diff] [blame] | 442 | { namespace: "ceph-waw3", dns: "object.ceph-eu.hswaw.net" }, |
Serge Bazanski | 3c5d836 | 2021-02-06 17:27:02 +0000 | [diff] [blame] | 443 | { namespace: "monitoring-global-k0", dns: "*.hswaw.net" }, |
| 444 | { namespace: "registry", dns: "*.hswaw.net" }, |
| 445 | |
| 446 | // q3k's legacy namespace (pre-prodvider) |
| 447 | { namespace: "q3k", dns: "*.q3k.org" }, |
| 448 | { namespace: "personal-q3k", dns: "*.q3k.org" }, |
| 449 | ], |
Serge Bazanski | c1f3725 | 2023-06-19 21:56:29 +0000 | [diff] [blame] | 450 | |
| 451 | anything_goes_namespace: [ |
| 452 | // sourcegraph ingress wants a config snippet to set a header. |
| 453 | "devtools-prod", |
| 454 | ], |
Serge Bazanski | 3c5d836 | 2021-02-06 17:27:02 +0000 | [diff] [blame] | 455 | }, |
| 456 | }, |
| 457 | }, |
Sergiusz Bazanski | dbfa988 | 2020-06-06 01:21:45 +0200 | [diff] [blame] | 458 | }, |
| 459 | } |