bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.81k stars 9.1k forks source link

[bitnami/kafka] Adding "external" PV controllers like vSphere for OpenShift #25221

Closed iamigui closed 4 months ago

iamigui commented 4 months ago

Name and Version

bitnami/kafka:latest

What is the problem this feature will solve?

The problem of generating PVC based on vmdk volumes for vSphere (as an example)

What is the feature you are proposing to solve the problem?

By adding this line in broker/controller.persistence

vsphereVolume: {}
 vsphereVolume: {}
    ## fsType: ext4
    ## volumePath: "[vsanDatastore] volumes/kafka-dev.vmdk"

and also configuring the statefulset to write it.

  volumeClaimTemplates:
    {{- if and .Values.broker.persistence.enabled (not .Values.broker.persistence.existingClaim) }}
    - apiVersion: v1
      kind: PersistentVolumeClaim
      metadata:
        name: data
        {{- if .Values.broker.persistence.annotations }}
        annotations: {{- include "common.tplvalues.render" (dict "value" .Values.broker.persistence.annotations "context" $) | nindent 10 }}
        {{- end }}
        {{- if .Values.broker.persistence.labels }}
        labels: {{- include "common.tplvalues.render" (dict "value" .Values.broker.persistence.labels "context" $) | nindent 10 }}
        {{- end }}
      spec:
        accessModes:
        {{- range .Values.broker.persistence.accessModes }}
          - {{ . | quote }}
        {{- end }}
        resources:
          requests:
            storage: {{ .Values.broker.persistence.size | quote }}
        {{- include "common.storage.class" (dict "persistence" .Values.broker.persistence "global" .Values.global) | nindent 8 }}
        {{- if .Values.broker.persistence.selector }}
        selector: {{- include "common.tplvalues.render" (dict "value" .Values.broker.persistence.selector "context" $) | nindent 10 }}
        {{- end -}}
        {{- if .Values.broker.persistence.vsphereVolume.enabled }}
        vsphereVolume: {{- include "common.tplvalues.render" (dict "value" .Values.broker.persistence.vsphereVolume "context" $) | nindent 10 }}
        {{- end }}

What alternatives have you considered?

It will also be needed configuration for the rest of the external storage class providers, like Azure, AWS, etc.

It is referred in this documentation:

https://docs.openshift.com/container-platform/4.13/storage/persistent_storage/persistent-storage-vsphere.html

javsalgar commented 4 months ago

Hi!

Thank you so much for the feature request. As you already detailed the necessary YAML, would you like to submit a PR with it?