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

Traefik Support installing Harbor via helm? #582

Closed
rsoika opened this issue May 9, 2020 · 7 comments
Closed

Traefik Support installing Harbor via helm? #582

rsoika opened this issue May 9, 2020 · 7 comments

Comments

@rsoika
Copy link

rsoika commented May 9, 2020

I can see that the helm chart seem to support traefik in some way. But I can't find any example how to use this.

I have installed a self managed Kubernetes Cluster with Traefik V2.
What I need is an example how to install harbor via helm to use my existing traefik reverse proxy.

Should I create a Ingress rule by myself, or can I configure this by setting specific parameters when installing Harbor via helm?

Thanks for a short example or any hints.

@rsoika
Copy link
Author

rsoika commented May 9, 2020

I did a lot of trail and error and come to a working solution with the following install command (where my-registry.foo.com is my public domain name):

helm install registry harbor/harbor --set persistence.enabled=false\
    -n harbor --namespace harbor\
    --set expose.ingress.hosts.core=my-registry.foo.com \
    --set expose.ingress.annotations.'traefik\.ingress\.kubernetes\.io/router\.entrypoints'=websecure \
    --set externalURL=https://my-registry.foo.com \
    --set notary.enabled=false

Can someone confirm that this is the expected configuration? If so we maybe should add this example to the REAEMD.md file?

@reasonerjt
Copy link
Contributor

Leveraging the ingress controller by different vendor is mainly about setting the annotations correct.

Unfortunately, I have limited bandwidth to verify each ingress controller.
I wish to suggest you follow the doc of Traefik to set the right annotations.

I'll create an item in faq somewhere in this repo for other users' reference.

@djpbessems
Copy link

This might be relevant information:
I have added the following ingressRoute and left the ingress annotations unmodified:

piVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: harbor
  namespace: harbor
spec:
  entryPoints:
    - websecure
  routes:
  - match: Host(`registry.example.com`)
    kind: Rule
    services:
    - name: harbor-harbor-portal
      namespace: harbor
      port: 80
  - match: Host(`registry.example.com`) && PathPrefix(`/api/`, `/service/`, `/v2/`, `/chartrepo/`, `/c/`)
    kind: Rule
    services:
    - name: harbor-harbor-core
      namespace: harbor
      port: 80
  - match: Host(`notary.example.com`)
    kind: Rule
    services:
    - name: harbor-harbor-notary-server
      namespace: harbor
      port: 4443
  tls:
    certResolver: default
    domains:
    - main: '*.example.com'
      sans:
      - 'example.com'

@Tchoupinax
Copy link

The previous configuration fixed my issue :) Thank you !

@lexermal
Copy link

lexermal commented Jan 6, 2023

@rsoika thanks to your command I was able to figure it out!

Here is the full solution https://github.com/lexermal/website-weixler-me/blob/master/blog/K3s%20Applications/Install%20Harbor.md

Copy link

github-actions bot commented Feb 8, 2024

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

Copy link

This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2024
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

5 participants