Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing latest changes from upstream master for rook #634

Merged
merged 7 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Documentation/CRDs/Cluster/ceph-cluster-crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ You can set annotations / labels for Rook components for the list of key value p
* `mgr`: Set annotations / labels for MGRs
* `mon`: Set annotations / labels for mons
* `osd`: Set annotations / labels for OSDs
* `dashboard`: Set annotations / labels for the dashboard service
* `prepareosd`: Set annotations / labels for OSD Prepare Jobs
* `monitoring`: Set annotations / labels for service monitor
* `crashcollector`: Set annotations / labels for crash collectors
Expand Down
2 changes: 1 addition & 1 deletion Documentation/CRDs/Object-Storage/ceph-object-store-crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spec:
#zone:
#name: zone-a
#hosting:
# dnsName:
# dnsNames:
# - "mystore.example.com"
# - "mystore.example.org"
```
Expand Down
2 changes: 2 additions & 0 deletions Documentation/CRDs/specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -7386,6 +7386,8 @@ string
<td></td>
</tr><tr><td><p>&#34;crashcollector&#34;</p></td>
<td></td>
</tr><tr><td><p>&#34;dashboard&#34;</p></td>
<td></td>
</tr><tr><td><p>&#34;mds&#34;</p></td>
<td></td>
</tr><tr><td><p>&#34;mgr&#34;</p></td>
Expand Down
15 changes: 1 addition & 14 deletions Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace as the operator when the first CephCluster CR is created.

## Supported Versions

The supported Ceph CSI version is 3.3.0 or greater with Rook. Refer to ceph csi [releases](https://github.com/ceph/ceph-csi/releases)
The two most recent Ceph CSI version are supported with Rook. Refer to ceph csi [releases](https://github.com/ceph/ceph-csi/releases)
for more information.

## Static Provisioning
Expand Down Expand Up @@ -92,19 +92,6 @@ volumesnapshotclass, search for: `# csi-provisioner-name`

All CSI pods are deployed with a sidecar container that provides a Prometheus
metric for tracking whether the CSI plugin is alive and running.
These metrics are meant to be scraped (collected) by Prometheus but can also be
accessed through a GET request to a specific node as follows:

`curl -X get http://[pod ip]:[liveness-port][liveness-path] 2>/dev/null | grep csi`

For example:

```console
$ curl -X GET http://10.109.65.142:9080/metrics 2>/dev/null | grep csi
# HELP csi_liveness Liveness Probe
# TYPE csi_liveness gauge
csi_liveness 1
```

Check the [monitoring documentation](../Monitoring/ceph-monitoring.md) to see how to integrate CSI
liveness and GRPC metrics into Ceph monitoring.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@ title: Snapshots

## Prerequisites

- Rook officially supports v1 snapshots for Kubernetes v1.20+.

- Install the snapshot controller and snapshot v1 CRD as required. More info can be found [here](https://github.com/kubernetes-csi/external-snapshotter/tree/v6.0.1#usage).

!!! note
If only Alpha snapshots are available, enable snapshotter in `rook-ceph-operator-config` or helm chart `values.yaml`, change the external-snapshotter image to `registry.k8s.io/sig-storage/csi-snapshotter:v1.2.2` and refer to the [alpha snapshots documentation](https://github.com/rook/rook/blob/release-1.3/Documentation/ceph-csi-drivers.md#rbd-snapshots)

VolumeSnapshot betav1 is deprecated in Kubernetes 1.20+ and removed in 1.24.0. If you still require betav1 snapshots, change the external-snapshotter image to `registry.k8s.io/sig-storage/csi-snapshotter:v5.0.1` and refer to the [betav1 snapshots documentation](https://rook.github.io/docs/rook/v1.8/ceph-csi-snapshot.html#rbd-snapshots)
- Install the [snapshot controller and snapshot v1 CRD](https://github.com/kubernetes-csi/external-snapshotter/tree/master#usage).

- We also need a `VolumeSnapshotClass` for volume snapshot to work. The purpose of a `VolumeSnapshotClass` is
defined in [the kubernetes
Expand All @@ -24,10 +17,6 @@ In short, as the documentation describes it:
VolumeSnapshotClass provides a way to describe the "classes" of storage when
provisioning a volume snapshot.

## Upgrade Snapshot API

If your Kubernetes version is updated to a newer version of the snapshot API, follow the upgrade guide [here](https://github.com/kubernetes-csi/external-snapshotter/tree/v4.0.0#upgrade) to upgrade from v1alpha1 to v1beta1, or v1beta1 to v1.

## RBD Snapshots

### VolumeSnapshotClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ for more info.

## RBD Volume Cloning

### Volume Clone Prerequisites

1. Requires Kubernetes v1.16+ which supports volume clone.
2. Ceph-csi diver v3.0.0+ which supports volume clone.

### Volume Cloning

In
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ kubectl create -f csi-metrics-service-monitor.yaml

This will create the service monitor to have prometheus monitor CSI

!!! note
Please note that the liveness sidecar is disabled by default.
To enable it set `CSI_ENABLE_LIVENESS` to `true` in the Rook operator settings (operator.yaml).

### Collecting RBD per-image IO statistics

RBD per-image IO statistics collection is disabled by default. This can be enabled by setting `enableRBDStats: true` in the CephBlockPool spec.
Expand Down
2 changes: 2 additions & 0 deletions deploy/charts/rook-ceph-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ cephClusterSpec:
# prepareosd:
# # If no mgr annotations are set, prometheus scrape annotations will be set by default.
# mgr:
# dashboard:

# labels:
# all:
Expand All @@ -281,6 +282,7 @@ cephClusterSpec:
# # monitoring is a list of key-value pairs. It is injected into all the monitoring resources created by operator.
# # These labels can be passed as LabelSelector to Prometheus
# monitoring:
# dashboard:

resources:
mgr:
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/ceph.rook.io/v1/annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func GetMgrAnnotations(a AnnotationsSpec) Annotations {
return mergeAllAnnotationsWithKey(a, KeyMgr)
}

// GetDashboardAnnotations returns the Annotations for the Dashboard service
func GetDashboardAnnotations(a AnnotationsSpec) Annotations {
return mergeAllAnnotationsWithKey(a, KeyDashboard)
}

// GetMonAnnotations returns the Annotations for the MON service
func GetMonAnnotations(a AnnotationsSpec) Annotations {
return mergeAllAnnotationsWithKey(a, KeyMon)
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/ceph.rook.io/v1/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const (
KeyMon KeyType = "mon"
KeyMonArbiter KeyType = "arbiter"
KeyMgr KeyType = "mgr"
KeyDashboard KeyType = "dashboard"
KeyOSDPrepare KeyType = "prepareosd"
KeyRotation KeyType = "keyrotation"
KeyOSD KeyType = "osd"
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/ceph.rook.io/v1/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ func GetMgrLabels(a LabelsSpec) Labels {
return mergeAllLabelsWithKey(a, KeyMgr)
}

// GetDashboardLabels returns the Labels for the Dashboard service
func GetDashboardLabels(a LabelsSpec) Labels {
return mergeAllLabelsWithKey(a, KeyDashboard)
}

// GetMonLabels returns the Labels for the MON service
func GetMonLabels(a LabelsSpec) Labels {
return mergeAllLabelsWithKey(a, KeyMon)
Expand Down
2 changes: 2 additions & 0 deletions pkg/operator/ceph/cluster/mgr/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ func (c *Cluster) makeDashboardService(name string) (*v1.Service, error) {
},
},
}
cephv1.GetDashboardAnnotations(c.spec.Annotations).ApplyToObjectMeta(&svc.ObjectMeta)
cephv1.GetDashboardLabels(c.spec.Labels).ApplyToObjectMeta(&svc.ObjectMeta)
err := c.clusterInfo.OwnerInfo.SetControllerReference(svc)
if err != nil {
return nil, errors.Wrapf(err, "failed to set owner reference to dashboard service %q", svc.Name)
Expand Down
Loading