Skip to content

Commit

Permalink
Merge pull request #18 from larsks/feature/odf
Browse files Browse the repository at this point in the history
Configure ODF for NESE storage
  • Loading branch information
larsks authored Jul 1, 2022
2 parents 9fee8b9 + 3ae714e commit 061680f
Show file tree
Hide file tree
Showing 25 changed files with 182 additions and 2 deletions.
8 changes: 8 additions & 0 deletions cluster-scope/base/core/configmaps/nerc-logo/configmap.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ apiVersion: v1
kind: Namespace
metadata:
name: openshift-storage
labels:
openshift.io/cluster-monitoring: "true"
spec: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ocsinitialization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: ocs.openshift.io/v1
kind: OCSInitialization
metadata:
name: ocsinit
namespace: openshift-storage
spec:
enableCephTools: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: openshift-storage
resources:
- storagecluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: ocs.openshift.io/v1
kind: StorageCluster
metadata:
name: ocs-external-storagecluster
spec:
externalStorage:
enable: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: openshift-storage
resources:
- storagesystem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: odf.openshift.io/v1alpha1
kind: StorageSystem
metadata:
name: ocs-external-storagecluster-storagesystem
spec:
kind: storagecluster.ocs.openshift.io/v1
name: ocs-external-storagecluster
namespace: openshift-storage
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: operator.openshift.io/v1
kind: Console
metadata:
name: cluster
spec:
plugins:
- odf-console
- acm
- mce
customization:
customLogoFile:
name: nerc-logo
key: nerc-logo.png
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- console.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- storageclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
annotations:
description: Provides RWO Filesystem volumes, and RWO and RWX Block volumes
storageclass.kubernetes.io/is-default-class: "true"
name: ocs-external-storagecluster-ceph-rbd
parameters: {}
provisioner: openshift-storage.rbd.csi.ceph.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
5 changes: 5 additions & 0 deletions cluster-scope/bundles/console/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base/operator.openshift.io/consoles/cluster
- ../../base/core/configmaps/nerc-logo
7 changes: 7 additions & 0 deletions cluster-scope/bundles/odf-external/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../odf
- ../../base/odf.openshift.io/storagesystems/ocs-external-storagecluster-storagesystem
- ../../base/odf.openshift.io/storageclusters/ocs-external-storagecluster
- ../../base/storage.k8s.io/storageclasses/ocs-external-storagecluster-ceph-rbd
1 change: 1 addition & 0 deletions cluster-scope/bundles/odf/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ resources:
- ../../base/core/namespaces/openshift-storage
- ../../base/operators.coreos.com/operatorgroups/openshift-storage
- ../../base/operators.coreos.com/subscriptions/odf-operator
- ../../base/ocs.openshift.io/ocsinitializations/ocsinit
1 change: 1 addition & 0 deletions cluster-scope/overlays/common/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ resources:
- ../../base/rbac.authorization.k8s.io/clusterrolebindings/self-provisioners
- ../../bundles/cluster-admin-rbac/
- ../../bundles/nmstate
- ../../bundles/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: operator.openshift.io/v1
kind: Console
metadata:
name: cluster
spec:
customization:
customProductName: NERC OCP Infra Cluster
5 changes: 3 additions & 2 deletions cluster-scope/overlays/nerc-ocp-infra/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
commonLabels:
nerc.mghpcc.org/kustomized: "true"

resources:
- ../common
- ../../bundles/openshift-gitops
- ../../bundles/acm
- ../../bundles/odf
- ../../base/operator.openshift.io/networks/cluster
- ../../bundles/odf-external
- clusterversion.yaml
- machineconfigs/disable-net-ifnames.yaml
- machineconfigs/mellanox-udev-rules
- machineconfigs/configure-bond0
- nodenetworkconfigurationpolicies/vlan-2177-nese.yaml

- groupsyncs/github-ocp-on-nerc.yaml
- clusterrolebindings/nerc-ops-cluster-reader.yaml
- clusterrolebindings/nerc-ops-sudoers.yaml
- clusterrolebindings/nerc-ops-portforward.yaml

patches:
- path: oauths/cluster_patch.yaml
- path: consoles.operator.openshift.io/cluster_patch.yaml
13 changes: 13 additions & 0 deletions fake-metrics-server/base/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: fake-metrics-exporter
spec:
template:
spec:
containers:
- name: fake-metrics-exporter
image: quay.io/larsks/fake-metrics-exporter:v0.1.0
ports:
- name: metrics
containerPort: 9283
8 changes: 8 additions & 0 deletions fake-metrics-server/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: openshift-storage
commonLabels:
app: fake-metrics-server
resources:
- deploy.yaml
- service.yaml
8 changes: 8 additions & 0 deletions fake-metrics-server/base/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Service
metadata:
name: fake-metrics-exporter
spec:
ports:
- port: 9283
targetPort: metrics
17 changes: 17 additions & 0 deletions fake-metrics-server/overlays/nerc-ocp-infra/deploy_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: fake-metrics-exporter
spec:
template:
spec:
volumes:
- name: fake-metrics
configMap:
name: fake-metrics
containers:
- name: fake-metrics-exporter
volumeMounts:
- name: fake-metrics
mountPath: /metrics.json
subPath: metrics.json
13 changes: 13 additions & 0 deletions fake-metrics-server/overlays/nerc-ocp-infra/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: openshift-storage
resources:
- ../../base/

patches:
- path: deploy_patch.yaml

configMapGenerator:
- name: fake-metrics
files:
- metrics.json
16 changes: 16 additions & 0 deletions fake-metrics-server/overlays/nerc-ocp-infra/metrics.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"ceph_health_status": 0.0,
"ceph_osd_flag_noup": 0.0,
"ceph_osd_flag_nodown": 0.0,
"ceph_osd_flag_noout": 0.0,
"ceph_osd_flag_noin": 0.0,
"ceph_osd_flag_nobackfill": 0.0,
"ceph_osd_flag_norebalance": 0.0,
"ceph_osd_flag_norecover": 0.0,
"ceph_osd_flag_noscrub": 0.0,
"ceph_osd_flag_nodeep_scrub": 0.0,
"ceph_num_objects_degraded": 0.0,
"ceph_num_objects_misplaced": 0.0,
"ceph_num_objects_unfound": 0.0,
"ceph_healthcheck_slow_ops": 0.0
}

0 comments on commit 061680f

Please sign in to comment.