cluster

Infrastructure files for Nordgedanken and Midnightthoughts.
git clone git://archive.git.mtrnord.blog/MTRNord/cluster.git
Log | Files | Refs | README

commit c2ddcce3b228ff20558119117fe8aac4123ecfa7
parent 263987cfa9707255e904a8db02046ba60c6a79af
Author: MTRNord <mtrnord1@gmail.com>
Date:   Sun, 16 Apr 2023 21:52:47 +0200

Add rook storage

Diffstat:
Mapps/base/rook/release.yaml | 191+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 191 insertions(+), 0 deletions(-)

diff --git a/apps/base/rook/release.yaml b/apps/base/rook/release.yaml @@ -1,3 +1,4 @@ +--- apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -22,3 +23,193 @@ spec: enabled: false monitoring: enabled: true +--- +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: rook-ceph + namespace: rook-ceph +spec: + interval: 5m + chart: + spec: + version: "1.10.x" + chart: rook-ceph + sourceRef: + kind: HelmRepository + name: rook-ceph + interval: 60m + install: + crds: Create + upgrade: + crds: CreateReplace + values: + toolbox: + enabled: true + monitoring: + enabled: true + createPrometheusRules: true + cephClusterSpec: + cephVersion: + image: quay.io/ceph/ceph:v17.2.6 + mon: + # Set the number of mons to be started. Generally recommended to be 3. + # For highest availability, an odd number of mons should be specified. + count: 3 + # The mons should be on unique nodes. For production, at least 3 nodes are recommended for this reason. + # Mons should only be allowed on the same node for test environments where data loss is acceptable. + allowMultiplePerNode: false + mgr: + # When higher availability of the mgr is needed, increase the count to 2. + # In that case, one mgr will be active and one in standby. When Ceph updates which + # mgr is active, Rook will update the mgr services to match the active mgr. + count: 2 + allowMultiplePerNode: false + modules: + # Several modules should not need to be included in this list. The "dashboard" and "monitoring" modules + # are already enabled by other settings in the cluster CR. + - name: pg_autoscaler + enabled: true + + # enable the ceph dashboard for viewing cluster status + dashboard: + enabled: true + # serve the dashboard under a subpath (useful when you are accessing the dashboard via a reverse proxy) + # urlPrefix: /ceph-dashboard + # serve the dashboard at the given port. + # port: 8443 + # Serve the dashboard using SSL (if using ingress to expose the dashboard and `ssl: true` you need to set + # the corresponding "backend protocol" annotation(s) for your ingress controller of choice) + ssl: true + storage: + useAllNodes: false + nodes: + - name: "control-plane-2" + devices: + - name: "sdb" + - name: "control-plane-3" + devices: + - name: "sdb" + ingress: + # -- Enable an ingress for the ceph-dashboard + dashboard: + annotations: + traefik.ingress.kubernetes.io/router.middlewares: traefik-ingress-sso@kubernetescrd + cert-manager.io/cluster-issuer: letsencrypt-dns + host: + name: dashboard.ceph.midnightthoughts.space + path: "/ceph-dashboard(/|$)(.*)" + tls: + - hosts: + - dashboard.ceph.midnightthoughts.space + secretName: dashboard.ceph.midnightthoughts.space-tls + cephBlockPools: [] + # - name: ceph-blockpool + # # see https://github.com/rook/rook/blob/master/Documentation/CRDs/Block-Storage/ceph-block-pool-crd.md#spec for available configuration + # spec: + # failureDomain: host + # replicated: + # size: 2 + # # Enables collecting RBD per-image IO statistics by enabling dynamic OSD performance counters. Defaults to false. + # # For reference: https://docs.ceph.com/docs/master/mgr/prometheus/#rbd-io-statistics + # # enableRBDStats: true + # storageClass: + # enabled: true + # name: ceph-block + # isDefault: false + # reclaimPolicy: Retain + # allowVolumeExpansion: true + # volumeBindingMode: "Immediate" + # mountOptions: [] + # # see https://kubernetes.io/docs/concepts/storage/storage-classes/#allowed-topologies + # allowedTopologies: [] + # # - matchLabelExpressions: + # # - key: rook-ceph-role + # # values: + # # - storage-node + # # see https://github.com/rook/rook/blob/master/Documentation/ceph-block.md#provision-storage for available configuration + # parameters: + # # (optional) mapOptions is a comma-separated list of map options. + # # For krbd options refer + # # https://docs.ceph.com/docs/master/man/8/rbd/#kernel-rbd-krbd-options + # # For nbd options refer + # # https://docs.ceph.com/docs/master/man/8/rbd-nbd/#options + # # mapOptions: lock_on_read,queue_depth=1024 + + # # (optional) unmapOptions is a comma-separated list of unmap options. + # # For krbd options refer + # # https://docs.ceph.com/docs/master/man/8/rbd/#kernel-rbd-krbd-options + # # For nbd options refer + # # https://docs.ceph.com/docs/master/man/8/rbd-nbd/#options + # # unmapOptions: force + + # # RBD image format. Defaults to "2". + # imageFormat: "2" + + # # RBD image features, equivalent to OR'd bitfield value: 63 + # # Available for imageFormat: "2". Older releases of CSI RBD + # # support only the `layering` feature. The Linux kernel (KRBD) supports the + # # full feature complement as of 5.4 + # imageFeatures: layering + + # # These secrets contain Ceph admin credentials. + # csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner + # csi.storage.k8s.io/provisioner-secret-namespace: "{{ .Release.Namespace }}" + # csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner + # csi.storage.k8s.io/controller-expand-secret-namespace: "{{ .Release.Namespace }}" + # csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node + # csi.storage.k8s.io/node-stage-secret-namespace: "{{ .Release.Namespace }}" + # # Specify the filesystem type of the volume. If not specified, csi-provisioner + # # will set default as `ext4`. Note that `xfs` is not recommended due to potential deadlock + # # in hyperconverged settings where the volume is mounted on the same node as the osds. + # csi.storage.k8s.io/fstype: ext4 + # -- A list of CephFileSystem configurations to deploy + # @default -- See [below](#ceph-file-systems) + cephFileSystems: + - name: ceph-filesystem + # see https://github.com/rook/rook/blob/master/Documentation/CRDs/Shared-Filesystem/ceph-filesystem-crd.md#filesystem-settings for available configuration + spec: + metadataPool: + replicated: + size: 2 + dataPools: + - failureDomain: host + replicated: + size: 2 + # Optional and highly recommended, 'data0' by default, see https://github.com/rook/rook/blob/master/Documentation/CRDs/Shared-Filesystem/ceph-filesystem-crd.md#pools + name: data0 + metadataServer: + activeCount: 1 + activeStandby: true + resources: + limits: + cpu: "2000m" + memory: "4Gi" + requests: + cpu: "1000m" + memory: "4Gi" + priorityClassName: system-cluster-critical + storageClass: + enabled: true + isDefault: false + name: ceph-filesystem + # (Optional) specify a data pool to use, must be the name of one of the data pools above, 'data0' by default + pool: data0 + reclaimPolicy: Retain + allowVolumeExpansion: false + volumeBindingMode: "Immediate" + mountOptions: [] + # see https://github.com/rook/rook/blob/master/Documentation/ceph-filesystem.md#provision-storage for available configuration + parameters: + # The secrets contain Ceph admin credentials. + csi.storage.k8s.io/provisioner-secret-name: rook-csi-cephfs-provisioner + csi.storage.k8s.io/provisioner-secret-namespace: "{{ .Release.Namespace }}" + csi.storage.k8s.io/controller-expand-secret-name: rook-csi-cephfs-provisioner + csi.storage.k8s.io/controller-expand-secret-namespace: "{{ .Release.Namespace }}" + csi.storage.k8s.io/node-stage-secret-name: rook-csi-cephfs-node + csi.storage.k8s.io/node-stage-secret-namespace: "{{ .Release.Namespace }}" + # Specify the filesystem type of the volume. If not specified, csi-provisioner + # will set default as `ext4`. Note that `xfs` is not recommended due to potential deadlock + # in hyperconverged settings where the volume is mounted on the same node as the osds. + csi.storage.k8s.io/fstype: ext4 + cephObjectStores: []