From 2951fa00b063832334d1eb7cf56f87aedb75b914 Mon Sep 17 00:00:00 2001 From: Povilas Versockas Date: Thu, 19 Oct 2023 09:04:28 +0300 Subject: [PATCH] feat: helm allow disabling prometheus rules (#96) --- charts/coralogix-operator/README.md | 11 +++++------ charts/coralogix-operator/templates/deployment.yaml | 3 ++- charts/coralogix-operator/values.yaml | 4 ++++ docs/api.md | 8 ++++---- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/charts/coralogix-operator/README.md b/charts/coralogix-operator/README.md index 1e4a913..1781ed9 100644 --- a/charts/coralogix-operator/README.md +++ b/charts/coralogix-operator/README.md @@ -1,6 +1,6 @@ # coralogix-operator -![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.11](https://img.shields.io/badge/AppVersion-0.1.11-informational?style=flat-square) +![Version: 0.1.5](https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.18](https://img.shields.io/badge/AppVersion-0.1.18-informational?style=flat-square) Coralogix Operator Helm Chart @@ -25,8 +25,8 @@ Kubernetes: `>=1.16.0-0` | Key | Type | Default | Description | |-----|------|---------|-------------| | affinity | object | `{}` | ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | -| coralogixOperator | object | `{"image":{"repository":"coralogixrepo/coralogix-operator","tag":""},"region":"","resources":{},"securityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true}}` | Coralogix operator container config | -| coralogixOperator.image | object | `{"repository":"coralogixrepo/coralogix-operator","tag":""}` | Coralogix operator Image | +| coralogixOperator | object | `{"image":{"pullPolicy":"IfNotPresent","repository":"coralogixrepo/coralogix-operator","tag":""},"prometheusRules":{"enabled":true},"region":"","resources":{},"securityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true}}` | Coralogix operator container config | +| coralogixOperator.image | object | `{"pullPolicy":"IfNotPresent","repository":"coralogixrepo/coralogix-operator","tag":""}` | Coralogix operator Image | | coralogixOperator.region | string | `""` | Coralogix Account Region | | coralogixOperator.resources | object | `{}` | resource config for Coralogix operator | | coralogixOperator.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true}` | Security context for Coralogix operator container | @@ -51,8 +51,7 @@ Kubernetes: `>=1.16.0-0` | serviceAccount.create | bool | `true` | Specifies whether a service account should be created | | serviceAccount.name | string | `""` | If not set and create is true, a name is generated using the fullname template | | tolerations | list | `[]` | ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ | - ----------------------------------------------- +----------------------------------------------- Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) ## Installation @@ -74,4 +73,4 @@ To uninstall the helm chart you can run: ```bash helm delete -``` \ No newline at end of file +``` diff --git a/charts/coralogix-operator/templates/deployment.yaml b/charts/coralogix-operator/templates/deployment.yaml index 4145638..d019812 100644 --- a/charts/coralogix-operator/templates/deployment.yaml +++ b/charts/coralogix-operator/templates/deployment.yaml @@ -12,7 +12,7 @@ spec: template: metadata: annotations: - kubectl.kubernetes.io/default-container: manager + kubectl.kubernetes.io/default-container: {{ .Chart.Name }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} @@ -54,6 +54,7 @@ spec: - --health-probe-bind-address=:8081 - --metrics-bind-address=127.0.0.1:8080 - --leader-elect + - --prometheus-rule-controller={{.Values.coralogixOperator.prometheusRules.enabled}} env: - name: CORALOGIX_REGION value: {{ .Values.coralogixOperator.region | quote }} diff --git a/charts/coralogix-operator/values.yaml b/charts/coralogix-operator/values.yaml index 93fe159..d06e96a 100644 --- a/charts/coralogix-operator/values.yaml +++ b/charts/coralogix-operator/values.yaml @@ -85,6 +85,10 @@ kubeRbacProxy: # -- Coralogix operator container config coralogixOperator: + # Set this is to true if Prometheus Operator is installed and + # PrometheusRule CRD is available in cluster. + prometheusRules: + enabled: true # -- Coralogix operator Image image: repository: coralogixrepo/coralogix-operator diff --git a/docs/api.md b/docs/api.md index d89b3f8..1cec06a 100644 --- a/docs/api.md +++ b/docs/api.md @@ -49,7 +49,7 @@ Alert is the Schema for the alerts API true - metadata + metadata object Refer to the Kubernetes API documentation for the fields of the `metadata` field. true @@ -4621,7 +4621,7 @@ RecordingRuleGroupSet is the Schema for the recordingrulegroupsets API true - metadata + metadata object Refer to the Kubernetes API documentation for the fields of the `metadata` field. true @@ -4925,7 +4925,7 @@ RuleGroup is the Schema for the rulegroups API true - metadata + metadata object Refer to the Kubernetes API documentation for the fields of the `metadata` field. true @@ -6200,4 +6200,4 @@ RuleGroupStatus defines the observed state of RuleGroup true - \ No newline at end of file +