diff --git a/Documentation/Helm-Charts/ceph-cluster-chart.gotmpl.md b/Documentation/Helm-Charts/ceph-cluster-chart.gotmpl.md index 72e152159..a2c93e265 100644 --- a/Documentation/Helm-Charts/ceph-cluster-chart.gotmpl.md +++ b/Documentation/Helm-Charts/ceph-cluster-chart.gotmpl.md @@ -110,6 +110,12 @@ The `cephObjectStores` array in the values file will define a list of CephObject | `storageClass.name` | The name of the storage class | `ceph-bucket` | | `storageClass.parameters` | See [Object Store storage class](../Storage-Configuration/Object-Storage-RGW/ceph-object-bucket-claim.md) documentation or the helm values.yaml for suitable values | see values.yaml | | `storageClass.reclaimPolicy` | The default [Reclaim Policy](https://kubernetes.io/docs/concepts/storage/storage-classes/#reclaim-policy) to apply to PVCs created with this storage class. | `Delete` | +| `ingress.enabled` | Enable an ingress for the object store | `false` | +| `ingress.annotations` | Ingress annotations | `{}` | +| `ingress.host.name` | Ingress hostname | `""` | +| `ingress.host.path` | Ingress path prefix | `/` | +| `ingress.tls` | Ingress tls | `/` | +| `ingress.ingressClassName` | Ingress tls | `""` | ### **Existing Clusters** diff --git a/Documentation/Helm-Charts/ceph-cluster-chart.md b/Documentation/Helm-Charts/ceph-cluster-chart.md index cfccd5d68..482071f29 100644 --- a/Documentation/Helm-Charts/ceph-cluster-chart.md +++ b/Documentation/Helm-Charts/ceph-cluster-chart.md @@ -137,6 +137,12 @@ The `cephObjectStores` array in the values file will define a list of CephObject | `storageClass.name` | The name of the storage class | `ceph-bucket` | | `storageClass.parameters` | See [Object Store storage class](../Storage-Configuration/Object-Storage-RGW/ceph-object-bucket-claim.md) documentation or the helm values.yaml for suitable values | see values.yaml | | `storageClass.reclaimPolicy` | The default [Reclaim Policy](https://kubernetes.io/docs/concepts/storage/storage-classes/#reclaim-policy) to apply to PVCs created with this storage class. | `Delete` | +| `ingress.enabled` | Enable an ingress for the object store | `false` | +| `ingress.annotations` | Ingress annotations | `{}` | +| `ingress.host.name` | Ingress hostname | `""` | +| `ingress.host.path` | Ingress path prefix | `/` | +| `ingress.tls` | Ingress tls | `/` | +| `ingress.ingressClassName` | Ingress tls | `""` | ### **Existing Clusters** diff --git a/deploy/charts/rook-ceph-cluster/templates/cephobjectstore-ingress.yaml b/deploy/charts/rook-ceph-cluster/templates/cephobjectstore-ingress.yaml new file mode 100644 index 000000000..014d2ab87 --- /dev/null +++ b/deploy/charts/rook-ceph-cluster/templates/cephobjectstore-ingress.yaml @@ -0,0 +1,35 @@ +{{- range .Values.cephObjectStores }} +{{- if dig "ingress" "enabled" false . }} +--- +apiVersion: {{ include "capabilities.ingress.apiVersion" $ }} +kind: Ingress +metadata: + name: {{ .name }} + {{- with .ingress.annotations }} + annotations: {{- toYaml . | nindent 4 }} + {{- end }} +spec: + rules: + - host: {{ .ingress.host.name }} + http: + paths: + - path: {{ .ingress.host.path | default "/" }} + backend: +{{- if (eq "networking.k8s.io/v1" (include "capabilities.ingress.apiVersion" $)) }} + service: + name: rook-ceph-rgw-{{ .name }} + port: + number: {{ .spec.gateway.securePort | default .spec.gateway.port }} + pathType: Prefix +{{- else }} + serviceName: rook-ceph-rgw-{{ .name }} + servicePort: {{ .spec.gateway.securePort | default .spec.gateway.port }} +{{- end }} + {{- with .ingress.ingressClassName }} + ingressClassName: {{ . }} + {{- end }} + {{- with .ingress.tls }} + tls: {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} +{{- end }} diff --git a/deploy/charts/rook-ceph-cluster/values.yaml b/deploy/charts/rook-ceph-cluster/values.yaml index 5daca18b7..97f206f7c 100644 --- a/deploy/charts/rook-ceph-cluster/values.yaml +++ b/deploy/charts/rook-ceph-cluster/values.yaml @@ -600,3 +600,15 @@ cephObjectStores: parameters: # note: objectStoreNamespace and objectStoreName are configured by the chart region: us-east-1 + ingress: + # Enable an ingress for the ceph-objectstore + enabled: false + # annotations: {} + # host: + # name: objectstore.example.com + # path: / + # tls: + # - hosts: + # - objectstore.example.com + # secretName: ceph-objectstore-tls + # ingressClassName: nginx