-
Notifications
You must be signed in to change notification settings - Fork 745
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
ServiceMonitor manifests are not getting created #1127
Comments
As this comment mentioned
you should probably install prometheus-operator first. |
@zyyw Prometheus operator was deployed prior to harbor. |
I'm seeing this behaviour too:
values.yaml:
In my case I am using customize to deploy the helm charts:
I deployed the Prometheus helm chart after harbor, but the template should be yaml should get regenerated and reapplied each time and I get no Harbor ServiceMonitor listed in the latest yaml that kustomize generates. |
Ok, in my case I think it's that kustomize isn't telling Harbor that that API exists. I will store a local copy and update the chart to remove that check (storing a local copy and manually rebasing seems to be a best practice anyway). |
I too am facing same issue with kustomize. Not sure if creating ServiceMonitor separately is a good idea. |
when kustomize executes helm it probably does not get the capabilites correctly. maybe it's better to remove that check like most helm charts do? |
Any use of helm template will also have this issue. I think removing the Capabilities check entirely would be best. |
…itor-capabilities Fix #1127 - remove capabilities check for prometheus
Signed-off-by: Andy Suderman <andy@suderman.dev> Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
I am able to deploy the Harbor in K8S cluster. Harbor is up and running without any issues. I am using the latest release
https://github.com/goharbor/harbor-helm/releases/tag/v1.8.1
Harbor OSS version: v2.4.1
For monitoring purpose via Prometheus, I am planning to enable the metrics and it's subfield servicemonitor to true. So that servicemonitor manifests will be created. But somehow these ServiceMonitor manifests are not getting created. While checking the templates for metrcis. It is passing all the checks
{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
As per expression
metrics.enabled
istrue
as well asmetrics.serviceMonitor.enabled
istrue
. And this check (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1"
) has the requestedapi-version
Could someone provide the insight why the ServiceMonitor manifests are not generating? What mistake I am making in values.yaml file?
The text was updated successfully, but these errors were encountered: