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

How to override the numberOfReplicas for PV Longhorn storageclasses #1780

Open
3 tasks done
craph opened this issue Mar 19, 2024 · 1 comment
Open
3 tasks done

How to override the numberOfReplicas for PV Longhorn storageclasses #1780

craph opened this issue Mar 19, 2024 · 1 comment

Comments

@craph
Copy link
Contributor

craph commented Mar 19, 2024

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that the AWX Operator is open source software provided for free and that I might not receive a timely response.

Bug Summary

Is there any documentation that explain how to override the numberOfReplicas for the Longhorn storageclasses ?
In the documentation, there is only : postgres_storage_class option

spec:
  accessModes:
    - ReadWriteOnce
  capacity:
    storage: 8Gi
  claimRef:
    apiVersion: v1
    kind: PersistentVolumeClaim
    name: postgres-13-awx-demo-postgres-13-0
    namespace: awx
    resourceVersion: '56730655'
    uid: eac8a8d5-6d74-4d37-819b-ee89154cd60a
  csi:
    driver: driver.longhorn.io
    fsType: ext4
    volumeAttributes:
      dataLocality: disabled
      fromBackup: ''
      fsType: ext4
      numberOfReplicas: '3'
      staleReplicaTimeout: '30'
      storage.kubernetes.io/csiProvisionerIdentity: 1689570108485-8081-driver.longhorn.io
    volumeHandle: pvc-eac8a8d5-6d74-4d37-819b-ee89154cd60a
  persistentVolumeReclaimPolicy: Delete
  storageClassName: longhorn
  volumeMode: Filesystem

Thank you very much for your help

AWX Operator version

2.12.2

AWX version

23.9.0

Kubernetes platform

kubernetes

Kubernetes/Platform version

v1.25.16+rke2r1

Modifications

no

Steps to reproduce

Default installation process

Expected results

Possibility to override the numberOfReplicas for Longhorn storageClasses

Actual results

Possibility to override the numberOfReplicas for Longhorn storageClasses

Additional information

No response

Operator Logs

No response

@YaronL16
Copy link
Contributor

Hey,
Correct me if I'm mistaken, but as far as I know, it isn't possible to define the number of Longhorn replicas in the PVC, only in the StorageClass.
Therefore, it's not possible to create an option to override the replica count.

Instead, you should create an additional StorageClass for Longhorn that has a different replica count, and reference it to the AWX resouce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants