nebula-operator icon indicating copy to clipboard operation
nebula-operator copied to clipboard

Provide PodDisruptionBudget spec

Open porscheme opened this issue 3 years ago • 8 comments

Please check the FAQ documentation before raising an issue

Describe the bug (required)

  • Current charts does not provided PodDisruptionBudget spec. Withtout this, nebula cluster reliability goes down in the cloud deployments.

Please refer to bug 5335 on Nebula repo

Your Environments (required) v3.3.0

porscheme avatar Feb 14 '23 17:02 porscheme

@MegaByte875 could you please take a look at this? thanks

wey-gu avatar Feb 16 '23 02:02 wey-gu

Can you prioritize this, its happened again today.

I wonder how product team does it? without PDB?

porscheme avatar Feb 16 '23 06:02 porscheme

@porscheme Actually nebula-operator haven't support it yet, I think do a loseless upgrade with k8s nodes need consider many things, I will provide you the PDB configuration in charts asap.

MegaByte875 avatar Feb 16 '23 07:02 MegaByte875

Thanks for opening, looking forward for PDB instructions.

porscheme avatar Feb 16 '23 14:02 porscheme

Any update?

porscheme avatar Feb 27 '23 15:02 porscheme

apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: nebula-storaged-pdb
  namespace: nebula
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      app.kubernetes.io/cluster: nebula
      app.kubernetes.io/component: storaged
      app.kubernetes.io/managed-by: nebula-operator
      app.kubernetes.io/name: nebula-graph

Here is a reference @porscheme

MegaByte875 avatar Mar 27 '23 09:03 MegaByte875

managed-by

Thanks for the spec @MegaByte875

Where would this go?

  • 'nebula-operator/charts/nebula-cluster/templates/' folder?
  • 'nebula-operator/charts/nebula-operator/templates/' folder?

Also, your comments 5335 are bit confusing

  • Are you suggesting, we have to implement them on our own?
  • nebula-operator charts already has the ValidatingAdmissionWebhook?
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: nebula-storaged-pdb
  namespace: {{ template "nebula-cluster.namespace" . }}
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      app.kubernetes.io/cluster: {{ template "nebula-cluster.name" . }}
      app.kubernetes.io/component: storaged
      app.kubernetes.io/managed-by: nebula-operator
      app.kubernetes.io/name: nebula-graph

porscheme avatar Mar 30 '23 20:03 porscheme

  1. Put pdb yamls in nebula-cluster/templates/ folder
  2. We haven't implemented the full solution in operator yet, if your business need the feature, we can plan the it ahead.
  3. The existing ValidatingAdmissionWebhook is used for validating replicas, your case webhook is used for prevent draining stateful pods until the states on which transfer successfully @porscheme

MegaByte875 avatar Apr 03 '23 08:04 MegaByte875