diff --git a/README.md b/README.md index f8ac0ad..f5121f9 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,8 @@ kubectl apply -f /tmp/interpolator.yaml --namespace interpolator-system You can see the full list of parameters (along with their meaning and default values) in the chart's [values.yaml](https://github.com/grzegorzgniadek/interpolator-operator/blob/master/charts/interpolator/values.yaml) file. +#### Customize resources + ```bash helm upgrade --install \ --create-namespace --namespace interpolator-system \ @@ -64,6 +66,17 @@ helm upgrade --install \ --set controllerManager.manager.resources.limits.cpu=200m ``` +#### Turn on Prometheus Service Monitor(Metrics) + +```bash +helm install \ + --create-namespace --namespace interpolator-system \ + interpolator . \ + --set prometheusCRDS.enabled=true \ + --set prometheusMonitor.enabled=true \ + --set prometheusMonitor.interval=15s +``` + ## Use sample resource ```bash kubectl apply -f https://raw.githubusercontent.com/grzegorzgniadek/interpolator-operator/master/config/samples/inter_v1_interpolator.yaml diff --git a/charts/interpolator/Chart.lock b/charts/interpolator/Chart.lock new file mode 100644 index 0000000..78b68de --- /dev/null +++ b/charts/interpolator/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: prometheus-operator-crds + repository: https://prometheus-community.github.io/helm-charts + version: 14.0.0 +digest: sha256:a5bb39969b061f10b1c6d2669a7ebc9f9b4daeb7389d4e1721ab93c8e2bd972a +generated: "2024-08-21T23:39:33.415230523+02:00" diff --git a/charts/interpolator/Chart.yaml b/charts/interpolator/Chart.yaml index bf51e1d..04b3ccf 100644 --- a/charts/interpolator/Chart.yaml +++ b/charts/interpolator/Chart.yaml @@ -13,9 +13,14 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.6.0 +version: 0.6.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. appVersion: "0.6.0" +dependencies: +- name: prometheus-operator-crds + version: "14.0.*" + repository: "https://prometheus-community.github.io/helm-charts" + condition: prometheusCRDS.enabled \ No newline at end of file diff --git a/charts/interpolator/README.md b/charts/interpolator/README.md index 14520df..e5c9dba 100644 --- a/charts/interpolator/README.md +++ b/charts/interpolator/README.md @@ -2,7 +2,7 @@ -![Version: 0.6.0](https://img.shields.io/badge/Version-0.6.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.6.0](https://img.shields.io/badge/AppVersion-0.6.0-informational?style=flat-square) +![Version: 0.6.1](https://img.shields.io/badge/Version-0.6.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.6.0](https://img.shields.io/badge/AppVersion-0.6.0-informational?style=flat-square) Interpolator Helm Chart @@ -12,7 +12,11 @@ Interpolator Helm Chart - +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| https://prometheus-community.github.io/helm-charts | prometheus-operator-crds | 14.0.* | ## Values @@ -39,5 +43,6 @@ Interpolator Helm Chart | metricsService.ports[0].protocol | string | `"TCP"` | | | metricsService.ports[0].targetPort | int | `8080` | | | metricsService.type | string | `"ClusterIP"` | | +| prometheusCRDS.enabled | bool | `false` | | | prometheusMonitor.enabled | bool | `false` | | | prometheusMonitor.interval | string | `"15s"` | | \ No newline at end of file diff --git a/charts/interpolator/charts/prometheus-operator-crds-14.0.0.tgz b/charts/interpolator/charts/prometheus-operator-crds-14.0.0.tgz new file mode 100644 index 0000000..e5b3a63 Binary files /dev/null and b/charts/interpolator/charts/prometheus-operator-crds-14.0.0.tgz differ diff --git a/charts/interpolator/templates/metrics-monitor.yaml b/charts/interpolator/templates/metrics-monitor.yaml index b828fa4..bd26a56 100644 --- a/charts/interpolator/templates/metrics-monitor.yaml +++ b/charts/interpolator/templates/metrics-monitor.yaml @@ -5,6 +5,10 @@ metadata: name: {{ include "interpolator.fullname" . }}-metrics-monitor labels: {{- include "interpolator.labels" . | nindent 4 }} + annotations: + {{- if .Values.prometheusCRDS.enabled }} + "helm.sh/hook": post-install + {{- end }} spec: endpoints: - interval: {{ .Values.prometheusMonitor.interval }} diff --git a/charts/interpolator/values.yaml b/charts/interpolator/values.yaml index f94ace9..cf1bbbc 100644 --- a/charts/interpolator/values.yaml +++ b/charts/interpolator/values.yaml @@ -32,6 +32,8 @@ metricsService: protocol: TCP targetPort: 8080 type: ClusterIP +prometheusCRDS: + enabled: false prometheusMonitor: enabled: false interval: 15s