Skip to content

Conversation

nepomucen
Copy link

What does this change resolve?

  • it allows users the add annotations to each harbor's component Deployment.

Example use case:
Users of stakater/Reloader can now specify annotations to the various Harbor components, to let reloader perform a rolling upgrade on related Deployment's pods when secret specified in annotation is updated.

Testing

 helm template . --set core.annotations."secret\.reloader\.stakater\.com/reload"="custom-harbor-secret" | grep -A 9 core-dpl.yaml
# Source: harbor/templates/core/core-dpl.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: release-name-harbor-core
  namespace: "website-operator"
  annotations:
    secret.reloader.stakater.com/reload: custom-harbor-secret
  labels:
    heritage: Helm

@MinerYang
Copy link
Collaborator

Hi @nepomucen ,

Thanks for your contribution to harbor-helm!

Could you also help to update the configuration part of the README.md file? Appreciate!
https://github.com/goharbor/harbor-helm/blob/main/README.md#configuration

@nepomucen nepomucen force-pushed the add/annotations branch 2 times, most recently from 78528b9 to 532abe1 Compare February 11, 2025 15:59
@nepomucen
Copy link
Author

Hi @MinerYang

Thanks for the code review. The documentation part is now updated too.

@nepomucen
Copy link
Author

@MinerYang would you be so kind, and re-review my PR with absorbed fixes.

Copy link

This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.

@nepomucen
Copy link
Author

@reasonerjt Could you please take a look at this PR ? I'd appreciate a review.

@igcherkaev
Copy link

Was about to open an issue as to why users cannot adjust annotations on deployments, only on pods, but then found this PR. What is the hold up here?

@igcherkaev
Copy link

@nepomucen btw, would be a good idea to add it to the nginx component. It's the only one left without it.

@martijnhybrit
Copy link

I also need this feature to be able to skip some opt-out kyverno policies on my openshift cluster, can this please get some more attention. Being able to set annotations to facilitate cross operability between componentes/tools is a pretty core aspect of helm charts

Signed-off-by: nepomucen <szymon@aus.krakow.pl>
Signed-off-by: nepomucen <szymon@aus.krakow.pl>
Signed-off-by: nepomucen <szymon@aus.krakow.pl>
Signed-off-by: nepomucen <szymon@aus.krakow.pl>
Signed-off-by: nepomucen <szymon@aus.krakow.pl>
@nepomucen
Copy link
Author

@igcherkaev, thx for suggestion, the last remaining component nginx got its annotations templated as well.

@igcherkaev
Copy link

@nepomucen I ended up just forking this repo and adjusting the templates and hosting the chart privately :(

P.S. I also had to change logic around storage persistence and gcs-key.json mount. Not sure how persistence.enabled is related to mounting gcs-key.json tbh, but it is what it is right now...

@nepomucen
Copy link
Author

I merged the 'upstream/main' into my 'add/annotations' branch, and manually resolved conflict.
@MinerYang would you please give it a second review.

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.

5 participants