Skip to content

Conversation

@jurim76
Copy link
Contributor

@jurim76 jurim76 commented Dec 11, 2025

Type of Change

  • Refactor

Related Issues

Summary of Changes

  • Update NOTES.txt
  • Render RUSTFS_VOLUMES with a template helper, allow to override RUSTFS_VOLUMES in values file
  • Add commonLabels support
  • Add config.rustfs.obs_environment config parameter
  • Replace selector labels with rustfs.selectorLabels template, replace app label with app.kubernetes.io/name label
  • Fix podSecurityContext indent
  • Refactor service.yaml
  • Refactor init container command
  • Add affinnity podAntiAffinity and nodeAffinity support
  • Add nodeSelector support
  • Add tolerations support
  • Allow to redefine probes
  • Allow to redefine logs dir
  • Fix helm tests
  • Update README.md

Checklist

  • I have read and followed the CONTRIBUTING.md guidelines
  • Documentation updated (if needed)

Impact

  • Breaking change (compatibility)
  • Requires doc/config/deployment update

Additional Notes


Thank you for your contribution! Please ensure your PR follows the community standards (CODE_OF_CONDUCT.md) and sign the CLA if this is your first contribution.

@CLAassistant
Copy link

CLAassistant commented Dec 11, 2025

CLA assistant check
All committers have signed the CLA.

@majinghe
Copy link
Contributor

@jurim76 Thanks for you contribution.

  • For 4 replicas, we Will not support one pvc for each pod, we only support 4 pvc for each pods, the current configuration simulates MNMD mode, so singledata flag not be a good choice. For detail info, please refer to helm: Allow configuration of volumes per replica #1107.
  • For README.md and README.md.gotmlp, user should execute one more step to generate README.md from README.md.gotmlp, what you see is what you get maybe a good choice.

Thx.

@jurim76 jurim76 force-pushed the jurim branch 2 times, most recently from de921f7 to 0ca2395 Compare December 12, 2025 16:09
@jurim76
Copy link
Contributor Author

jurim76 commented Dec 12, 2025

@majinghe
I've removed singledata and readme template and added imagePullSecrets support plus missing fixes for deployment.

enabled: true
distributed:
enabled: false

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our default mode should be distributed with 4 pods and 16 pvc, so distributed.enabled should be true.

@majinghe
Copy link
Contributor

@jurim76 Just leave one comment, please FYI. In addition, there are some conflicts, after resolved, will merge this PR. Thx.

@jurim76 jurim76 force-pushed the jurim branch 2 times, most recently from d03f15f to 0bdf72e Compare December 13, 2025 15:20
Signed-off-by: Juri Malinovski <juri.malinovski@coolbet.com>

return  mode

Signed-off-by: Juri Malinovski <juri.malinovski@coolbet.com>
@jurim76
Copy link
Contributor Author

jurim76 commented Dec 13, 2025

@majinghe
Please check with a latest changes.
I've enabled distributed mode, added nodeSelector support and updated Readme

@jurim76 jurim76 changed the title refactor helm chart helm: refactor helm chart Dec 13, 2025
@majinghe
Copy link
Contributor

@jurim76 Have you tested on local env due to the code had a lot of changes, i will need to test on local env for standalone and distributed mode. Will update test result here.

@jurim76
Copy link
Contributor Author

jurim76 commented Dec 14, 2025

@majinghe yep, works for me

btw, in distributed mode the pod was crushed/recreated 3 times before pod got running.
I guess the process should wait a little bit more for the service, before giving up, imho (I've tried to play with readiness and startup probes, but with no success)

# Standalone mode enabled
$ helm install rustfs . -f values.custom.yaml  --set mode.standalone.enabled=true --set mode.distributed.enabled=false
NAME: rustfs
LAST DEPLOYED: Sun Dec 14 15:26:14 2025
NAMESPACE: test
STATUS: deployed
REVISION: 1
NOTES:
1. Watch all pods come up
  kubectl get pods -w -l app.kubernetes.io/name=rustfs -n test
2. Visit the dashboard
  https://rustfs.opsdev.clusters.***
 
$ kubectl get pods -w -l app.kubernetes.io/name=rustfs -n test
NAME                     READY   STATUS    RESTARTS   AGE
rustfs-675ff84d4-mpq9k   1/1     Running   0          93s

# Distributed mode enabled
$ helm install rustfs . -f values.custom.yaml  --set mode.standalone.enabled=false --set mode.distributed.enabled=true
NAME: rustfs
LAST DEPLOYED: Sun Dec 14 15:30:14 2025
NAMESPACE: test
STATUS: deployed
REVISION: 1
NOTES:
1. Watch all pods come up
  kubectl get pods -w -l app.kubernetes.io/name=rustfs -n test
2. Visit the dashboard
  https://rustfs.opsdev.clusters.***
  
$ kubectl get pods -w -l app.kubernetes.io/name=rustfs -n test
NAME       READY   STATUS    RESTARTS       AGE
rustfs-0   1/1     Running   3 (113s ago)   2m22s
rustfs-1   1/1     Running   3 (111s ago)   2m21s
rustfs-2   1/1     Running   3 (112s ago)   2m21s
rustfs-3   1/1     Running   3 (108s ago)   2m21s


# values.custom.yaml
imagePullSecrets:
  - name: regcred

podLabels:
  owner_team: ops-infra

commonLabels:
  owner_team: ops-infra

ingress:
  className: "nginx"
  hosts:
    - host: rustfs.opsdev.clusters.***
      paths:
        - path: /
          pathType: ImplementationSpecific

tls:
  enabled: false

affinity:
  podAntiAffinity:
    enabled: true
    topologyKey: kubernetes.io/hostname
  nodeAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      nodeSelectorTerms:
      - matchExpressions:
        - key: role
          operator: In
          values:
          - storage-node

storageclass:
  name: topolvm-xfs
  size: 1Gi
  dataStorageSize: 1Gi
  logStorageSize: 1Gi

@majinghe
Copy link
Contributor

@jurim76 I finished testing on local kind env, worked fine. Thanks for your contribution.

/LGTM

/cc @houseme @loverustfs

@loverustfs
Copy link
Contributor

@jurim76 I finished testing on local kind env, worked fine. Thanks for your contribution.

/LGTM

/cc @houseme @loverustfs

Ok.

@loverustfs loverustfs merged commit 7178a94 into rustfs:main Dec 15, 2025
1 check passed
@loverustfs
Copy link
Contributor

Hey @majinghe ,

Merged.

@loverustfs
Copy link
Contributor

Hi @jurim76,

Thank you for your contribution!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants