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

Install PodDistruptionBudgets when replica greater than 1 #1509

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

rgarcia89
Copy link
Contributor

Currently there is no pdb deployed for components were the replica is defined greater than 1. This can lead to an outage of the components during a cluster update. The added pdb definitions will be added automatically once the replica size is greater than 1 and ensure that at least one replica is ready before the pod will be drained.

@rgarcia89 rgarcia89 changed the title Add PodDistruptionBudgets when replica greater than 1 Install PodDistruptionBudgets when replica greater than 1 May 17, 2023
@rgarcia89
Copy link
Contributor Author

@Vad1mo ready for review

@Vad1mo
Copy link
Member

Vad1mo commented May 23, 2023

I like it. It would be beneficial to make it optional:

  • add enable/disable flag, on each component an
  • Allow to set
    Min amount

@rgarcia89
Copy link
Contributor Author

Is setting the min amount really necessary? Currently at least one pod is necessary in order for the component to fulfill its tasks. Therefore I think we should be good with the fix value.

@MarcHenriot
Copy link

Thanks for the implementation, it's really cool!

I quite agree with @Vad1mo and I understand your point of view, but harcoding values is never very good, some users may have use cases that push them to change this number. (If, for example, the harbor has a lot of simultaneous users, perhaps two replicas of a certain service is the bare minimum required to maintain the desired quality of service when operating on Kubernetes nodes.)

In issue #1181 robinkb proposed a rather elegant solution from the oauth2-proxy chart.

I think it would be better to set the default value to 1 and leave it up to the user to choose what best suits their needs. (ref helm doc)

It might also be cool to have the same logic with maxUnavailable fields. (ref #1182)

@MarcHenriot
Copy link

MarcHenriot commented Jul 12, 2023

@rgarcia89 I have pushed a version of the above changes in my fork, can we merge my version to yours ?

Repo : https://github.com/MarcHenriot/harbor-helm

zyyw and others added 19 commits July 12, 2023 14:54
…_HTTP_CLIENT_TIMEOUT

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
Signed-off-by: Gene Liu <geneliu@users.noreply.github.com>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
Signed-off-by: Cyril Jouve <jv.cyril@gmail.com>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
Signed-off-by: Rafał Boniecki <rafal@boniecki.cc>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
Signed-off-by: OrlinVasilev <ovasilev@vmware.com>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
Based on multiple discussions and questions from the community. https://cloud-native.slack.com/archives/CC1E09J6S/p1682520074518419

It would make sense to update the readme and clarify the use of username password

Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
The JSON string set in core.configureUserSettings string
will be added to the core secret and loaded into the
environment variable CONFIG_OVERWRITE_JSON

Signed-off-by: Philip Nelson <philipnelson5@gmail.com>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
…Y_CACHE

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
Signed-off-by: Mitsuru Kariya <mitsuru.kariya@nttdata.com>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
Signed-off-by: Mitsuru Kariya <mitsuru.kariya@nttdata.com>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
the commend above the existing secret field specified the wrong information for the what the key of the secret should be

Signed-off-by: Arjun Gandhi <contact@arjungandhi.com>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
Signed-off-by: Hein-Jan Vervoorn <heinjan.vervoorn@ns.nl>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
Co-authored-by: Stephan Mauermann <stephan.mauermann@rtl.com>
Co-authored-by: Stephan Mauermann <stephan.mauermann@rtl.de>
Signed-off-by: Diogo Guerra <diogo.filipe.tomas.guerra@cern.ch>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
Signed-off-by: Andy Suderman <andy@suderman.dev>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
@rgarcia89
Copy link
Contributor Author

@rgarcia89 I have pushed a version of the above changes in my fork, can we merge my version to yours ?

Repo : https://github.com/MarcHenriot/harbor-helm

Looks good to me. I have merged your fork.
Thanks

@MarcHenriot
Copy link

MarcHenriot commented Jul 12, 2023

I forgot to sign my commits …. What do we do ?

@rgarcia89
Copy link
Contributor Author

I forgot to sign my commits …. What do we do ?

Yeah I just signed them one by one. Should be fine now

@rgarcia89
Copy link
Contributor Author

@Vad1mo I think this PR is ready to be merged

@MarcHenriot
Copy link

There is typo in all pdb, I will push a fix to your fork.

It misses matchLabels in the selector section.

MarcHenriot and others added 4 commits August 2, 2023 19:12
Signed-off-by: Marc Henriot <marck.henriot@gmail.com>
Signed-off-by: Marc Henriot <marck.henriot@gmail.com>
Fix pdb configuration and add pdb to exporter
@rgarcia89
Copy link
Contributor Author

@Vad1mo any idea when this can be merged?

@OrlinVasilev
Copy link
Member

@zyyw can you please review that PR thank you!

@rgarcia89
Copy link
Contributor Author

@MinerYang @Kajot-dev maybe you can have a look here too

@slushysnowman
Copy link

Would be great to get this in - at the moment we're manually adding it for our Harbor setup

@Kajot-dev
Copy link
Contributor

That would be great to have! We're adding these besides the helm chart currently

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

Successfully merging this pull request may close these issues.

None yet