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