Skip to content

Commit 8717cf7

Browse files
committed
Rename metricsScrapingServiceConfigs to prometheusServerConfigs
1 parent 93d2e6b commit 8717cf7

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

intents-operator/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
| `operator.enableIstioPolicyCreation` | Whether the operator should create Istio authorization policies according to ClientIntents | `true` |
4646
| `operator.ingressControllerConfigs` | Restricts the automatically created external traffic network policies to only allow access to an ingress controller within the cluster. Only relevant if you use an in-cluster ingress controller, such as nginx or HAProxy. A list of objects with keys `name`, `namespace` and `kind`, such as `ingress-nginx-controller`, `nginx` and `Deployment`. | `(none)` |
4747
| `operator.ingressControllerAWSALBExempt` | If set to true, the operator will allow all traffic if an Ingress is managed by the AWS ALB Ingress Controller. | `false` |
48-
| `operator.automateThirdPartyNetworkPolicies` | `ifBlockedByOtterize`, `off` or `always`. Automatically creates network policies to allow required traffic from load balancers, reverse proxies, and Prometheus by tracking Service and Ingress resources, as well as Prometheus scrape annotations. To enable metrics scraping by metrics, `metricsScrapingServiceConfigs` must be set as well | `ifBlockedByOtterize` |
49-
| `operator.metricsScrapingServiceConfigs` | Restricts the automatically created network policies for scraping metrics to only be accessed by the scraping service. A list of objects with keys `name`, `namespace` and `kind`, such as `Deployment`. | `(none)` |
48+
| `operator.automateThirdPartyNetworkPolicies` | `ifBlockedByOtterize`, `off` or `always`. Automatically creates network policies to allow required traffic from load balancers, reverse proxies, and Prometheus by tracking Service and Ingress resources, as well as Prometheus scrape annotations. To enable Prometheus metrics scraping traffic, `prometheusServerConfigs` must be set as well | `ifBlockedByOtterize` |
49+
| `operator.prometheusServerConfigs` | Restricts the automatically created network policies for Prometheus metrics scraping to only originate from Prometheus server. A list of objects with keys `name`, `namespace` and `kind`, such as `Deployment`. | `(none)` |
5050
| `operator.externallyManagedPolicyWorkloads` | Workloads assumed to have externally managed network policies, allowing traffic to/from them. Otterize Cloud will not suggest new ClientIntents for these workloads. | `(none)` |
5151
| `operator.resources` | Resources override. | |
5252
| `operator.enableDatabasePolicyCreation` | Whether the operator should create database policies according to ClientIntents | `true` |

intents-operator/templates/extended-config-configmap.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if or .Values.global.aws.rolesAnywhere.enabled .Values.operator.ingressControllerConfigs .Values.operator.externallyManagedPolicyWorkloads .Values.operator.metricsScrapingServiceConfigs }}
1+
{{- if or .Values.global.aws.rolesAnywhere.enabled .Values.operator.ingressControllerConfigs .Values.operator.externallyManagedPolicyWorkloads .Values.operator.prometheusServerConfigs }}
22
apiVersion: v1
33
kind: ConfigMap
44
metadata:
@@ -42,12 +42,12 @@ data:
4242
kind: {{ $workload.kind | quote | required "Workload kind required: kind" }}
4343
{{- end }}
4444
{{- end }}
45-
{{- if .Values.operator.metricsScrapingServiceConfigs }}
46-
metricsScrapingService:
47-
{{- range $config := .Values.operator.metricsScrapingServiceConfigs }}
48-
- name: {{ $config.name | quote | required "metricsScrapingService name required: name" }}
49-
namespace: {{ $config.namespace | quote | required "metricsScrapingService namespace required: namespace" }}
50-
kind: {{ $config.kind | quote | required "metricsScrapingService kind required: kind" }}
45+
{{- if .Values.operator.prometheusServerConfigs }}
46+
prometheusServerConfigs:
47+
{{- range $config := .Values.operator.prometheusServerConfigs }}
48+
- name: {{ $config.name | quote | required "prometheusServerConfigs name required: name" }}
49+
namespace: {{ $config.namespace | quote | required "prometheusServerConfigs namespace required: namespace" }}
50+
kind: {{ $config.kind | quote | required "prometheusServerConfigs kind required: kind" }}
5151
{{- end }}
5252
{{- end }}
5353
{{- end }}

intents-operator/templates/intents-operator-deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ spec:
280280
name: spiffe
281281
readOnly: true
282282
{{- end }}
283-
{{- if or .Values.global.aws.rolesAnywhere.enabled .Values.operator.ingressControllerConfigs .Values.operator.externallyManagedPolicyWorkloads .Values.operator.metricsScrapingServiceConfigs }}
283+
{{- if or .Values.global.aws.rolesAnywhere.enabled .Values.operator.ingressControllerConfigs .Values.operator.externallyManagedPolicyWorkloads .Values.operator.prometheusServerConfigs }}
284284
- name: extended-config
285285
mountPath: /etc/otterize
286286
readOnly: true
@@ -353,7 +353,7 @@ spec:
353353
aws.spiffe.csi.cert-manager.io/enable: "true"
354354
spiffe.csi.cert-manager.io/fs-group: "65532"
355355
{{- end }}
356-
{{- if or .Values.global.aws.rolesAnywhere.enabled .Values.operator.ingressControllerConfigs .Values.operator.externallyManagedPolicyWorkloads .Values.operator.metricsScrapingServiceConfigs }}
356+
{{- if or .Values.global.aws.rolesAnywhere.enabled .Values.operator.ingressControllerConfigs .Values.operator.externallyManagedPolicyWorkloads .Values.operator.prometheusServerConfigs }}
357357
- name: extended-config
358358
configMap:
359359
name: intents-operator-config

intents-operator/values.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ operator:
4040
# namespace: ingress-nginx
4141
# kind: Deployment
4242

43-
metricsScrapingServiceConfigs: # restrict network policies created by automateThirdPartyNetworkPolicies for metrics scraping (like Prometheus) to be accessed
44-
# only from the scraping server.
43+
prometheusServerConfigs: # Restricts the automatically created network policies for Prometheus metrics scraping to only originate from Prometheus server
4544
# - name: prometheus-server
4645
# namespace: prometheus
4746
# kind: Deployment
@@ -66,7 +65,7 @@ operator:
6665
# may need a manually created network policy to allow the traffic
6766
# - `always` - create network policies for every relevant service, regardless of whether it is protected
6867
# by otterize or not
69-
# To enable metrics scraping by metrics, `metricsScrapingServiceConfigs` must be set as well
68+
# To enable Prometheus metrics scraping traffic, `prometheusServerConfigs` must be set as well
7069
automateThirdPartyNetworkPolicies: ifBlockedByOtterize
7170
enableIstioPolicyCreation: true
7271
enableDatabasePolicyCreation: true

0 commit comments

Comments
 (0)