Skip to content

Commit

Permalink
feat(staging): Cluster rebuild
Browse files Browse the repository at this point in the history
* snapshot-controller, volsync
* rook
  • Loading branch information
szinn committed Jan 10, 2025
1 parent 9c51d4a commit 862ebf8
Show file tree
Hide file tree
Showing 19 changed files with 1,402 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kubernetes/staging/apps/rook-ceph/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- rook-ceph/install.yaml
5 changes: 5 additions & 0 deletions kubernetes/staging/apps/rook-ceph/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: rook-ceph
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- rules.yaml
904 changes: 904 additions & 0 deletions kubernetes/staging/apps/rook-ceph/rook-ceph/add-ons/rules.yaml

Large diffs are not rendered by default.

189 changes: 189 additions & 0 deletions kubernetes/staging/apps/rook-ceph/rook-ceph/cluster/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.zinn.ca/helm.toolkit.fluxcd.io/helmrelease_v2.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: rook-ceph-cluster
spec:
interval: 15m
chart:
spec:
chart: rook-ceph-cluster
version: v1.16.1
sourceRef:
kind: HelmRepository
name: rook-ceph-charts
namespace: flux-system
interval: 15m
maxHistory: 3
install:
createNamespace: true
remediation:
retries: 5
upgrade:
remediation:
retries: 5
dependsOn:
- name: rook-ceph-operator
namespace: rook-ceph
- name: snapshot-controller
namespace: volsync-system
values:
toolbox:
enabled: true
monitoring:
enabled: true
createPrometheusRules: true
configOverride: |
[global]
bdev_enable_discard = true
bdev_async_discard = true
cephClusterSpec:
cephVersion:
image: quay.io/ceph/ceph:v19.2.0@sha256:200087c35811bf28e8a8073b15fa86c07cce85c575f1ccd62d1d6ddbfdc6770a

resources:
mgr:
requests:
cpu: "125m"
memory: "549M"
limits:
memory: "1219M"
mon:
requests:
cpu: "49m"
memory: "477M"
osd:
requests:
cpu: "442m"
memory: "2678M"
limits:
memory: "5944M"
prepareosd:
requests:
cpu: "250m"
memory: "50Mi"
limits:
memory: "200Mi"
mgr-sidecar:
requests:
cpu: "49m"
memory: "94M"
limits:
memory: "200M"
crashcollector:
requests:
cpu: "15m"
memory: "64M"
limits:
memory: "64M"
logcollector:
requests:
cpu: "100m"
memory: "100M"
limits:
memory: "1G"
cleanup:
requests:
cpu: "250m"
memory: "100M"
limits:
memory: "1G"

crashCollector:
disable: false

dashboard:
enabled: true
urlPrefix: /
ssl: false

storage:
useAllNodes: false
useAllDevices: false
config:
osdsPerDevice: "1"
nodes:
- name: "stage-1"
devices:
- name: "sdb"
- name: "stage-2"
devices:
- name: "sdb"
- name: "stage-3"
devices:
- name: "sdb"

ingress:
dashboard:
ingressClassName: nginx
host:
name: rook.${SECRET_DOMAIN_NAME}
path: /

cephBlockPools:
- name: ceph-blockpool
spec:
failureDomain: host
replicated:
size: 3
storageClass:
enabled: true
name: ceph-block
isDefault: true
reclaimPolicy: Delete
allowVolumeExpansion: true
parameters:
imageFormat: "2"
imageFeatures: layering
csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner
csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph
csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner
csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph
csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node
csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph
csi.storage.k8s.io/fstype: ext4

cephBlockPoolsVolumeSnapshotClass:
enabled: true
name: csi-ceph-blockpool
isDefault: false
deletionPolicy: Delete

cephFileSystems:
- name: ceph-filesystem
spec:
metadataPool:
replicated:
size: 3
dataPools:
- failureDomain: host
replicated:
size: 3
metadataServer:
activeCount: 1
activeStandby: true
storageClass:
enabled: true
isDefault: false
name: ceph-filesystem
reclaimPolicy: Delete
allowVolumeExpansion: true
mountOptions: []
parameters:
csi.storage.k8s.io/provisioner-secret-name: rook-csi-cephfs-provisioner
csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph
csi.storage.k8s.io/controller-expand-secret-name: rook-csi-cephfs-provisioner
csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph
csi.storage.k8s.io/node-stage-secret-name: rook-csi-cephfs-node
csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph
csi.storage.k8s.io/fstype: ext4

cephFileSystemVolumeSnapshotClass:
enabled: true
name: csi-ceph-filesystem
isDefault: false
deletionPolicy: Delete

cephObjectStores: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- helm-release.yaml
55 changes: 55 additions & 0 deletions kubernetes/staging/apps/rook-ceph/rook-ceph/install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: rook-ceph-operator
namespace: flux-system
labels:
substitution.flux.home.arpa/enabled: "true"
spec:
targetNamespace: rook-ceph
path: ./kubernetes/staging/apps/rook-ceph/rook-ceph/operator
sourceRef:
kind: GitRepository
name: flux-system
prune: true
wait: true
interval: 10m
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: rook-ceph-cluster
namespace: flux-system
labels:
substitution.flux.home.arpa/enabled: "true"
spec:
targetNamespace: rook-ceph
path: ./kubernetes/staging/apps/rook-ceph/rook-ceph/cluster
sourceRef:
kind: GitRepository
name: flux-system
dependsOn:
- name: rook-ceph-operator
prune: true
wait: true
interval: 10m
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: rook-ceph-addons
namespace: flux-system
labels:
substitution.flux.home.arpa/enabled: "true"
spec:
targetNamespace: rook-ceph
path: ./kubernetes/staging/apps/rook-ceph/rook-ceph/add-ons
sourceRef:
kind: GitRepository
name: flux-system
dependsOn:
- name: rook-ceph-operator
prune: true
wait: true
interval: 10m
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/external-secrets.io/externalsecret_v1beta1.json
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: rook-ceph-dashboard
namespace: rook-ceph
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword-connect
target:
name: rook-ceph-dashboard-password # rook-ceph expects this name
template:
engineVersion: v2
data:
password: "{{ .password }}"
dataFrom:
- extract:
key: rook-dashboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.zinn.ca/helm.toolkit.fluxcd.io/helmrelease_v2.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: rook-ceph-operator
spec:
interval: 15m
releaseName: rook-ceph
chart:
spec:
chart: rook-ceph
version: v1.16.1
sourceRef:
kind: HelmRepository
name: rook-ceph-charts
namespace: flux-system
interval: 15m
maxHistory: 3
install:
createNamespace: true
crds: CreateReplace
remediation:
retries: 3
upgrade:
crds: CreateReplace
remediation:
retries: 3
dependsOn:
- name: snapshot-controller
namespace: volsync-system
values:
crds:
enabled: true
pspEnable: false
csi:
enableVolumeGroupSnapshot: false # TODO: enable this when v1beta1 CRDs are available
csiAddons:
enabled: false
enableLiveness: true
serviceMonitor:
enabled: false
monitoring:
enabled: true
resources:
requests:
cpu: 109m
memory: 204Mi
limits:
memory: 453Mi
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- dashboard-secret.yaml
- helm-release.yaml
8 changes: 8 additions & 0 deletions kubernetes/staging/apps/volsync-system/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- snapshot-controller/install.yaml
- volsync/install.yaml
7 changes: 7 additions & 0 deletions kubernetes/staging/apps/volsync-system/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: volsync-system
annotations:
kustomize.toolkit.fluxcd.io/prune: disabled
Loading

0 comments on commit 862ebf8

Please sign in to comment.