Skip to content

Commit e4ca5ee

Browse files
authored
Merge branch 'main' into jkroepke-patch-1
2 parents adea577 + 2e62c4f commit e4ca5ee

File tree

4 files changed

+76
-62
lines changed

4 files changed

+76
-62
lines changed

.github/workflows/issue-triage.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ jobs:
4646
uses: redhat-plumbers-in-action/advanced-issue-labeler@b80ae64e3e156e9c111b075bfa04b295d54e8e2e # v3.2.4
4747
with:
4848
issue-form: ${{ steps.issue-parser.outputs.jsonString }}
49+
template: >-
50+
${{
51+
contains(github.event.issue.labels.*.name, 'bug')
52+
&& 'bug_report.yml' || 'feature_request.yml'
53+
}}
4954
section: chart-name
5055
config-path: .github/advanced-issue-labeler.yml
5156
token: ${{ github.token }}

charts/grafana/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -243,14 +243,15 @@ The minimum required Kubernetes version is now 1.25. All references to deprecate
243243
| livenessProbe.initialDelaySeconds | int | `60` | |
244244
| livenessProbe.timeoutSeconds | int | `30` | |
245245
| namespaceOverride | string | `""` | |
246-
| networkPolicy.allowExternal | bool | `true` | |
247-
| networkPolicy.egress.blockDNSResolution | bool | `false` | |
248-
| networkPolicy.egress.enabled | bool | `false` | |
249-
| networkPolicy.egress.ports | list | `[]` | |
250-
| networkPolicy.egress.to | list | `[]` | |
251-
| networkPolicy.enabled | bool | `false` | |
252-
| networkPolicy.explicitNamespacesSelector | object | `{}` | |
253-
| networkPolicy.ingress | bool | `true` | |
246+
| networkPolicy.allowExternal | bool | `true` | networkPolicy.ingress When true enables the creation an ingress network policy |
247+
| networkPolicy.egress.blockDNSResolution | bool | `false` | networkPolicy.egress.blockDNSResolution When enabled, DNS resolution will be blocked for all pods in the grafana namespace. |
248+
| networkPolicy.egress.enabled | bool | `false` | networkPolicy.egress.enabled When enabled, an egress network policy will be created allowing grafana to connect to external data sources from kubernetes cluster. |
249+
| networkPolicy.egress.ports | list | `[]` | networkPolicy.egress.ports Add individual ports to be allowed by the egress |
250+
| networkPolicy.egress.to | list | `[]` | networkPolicy.egress.to Allow egress traffic to specific destinations |
251+
| networkPolicy.enabled | bool | `false` | networkPolicy.enabled Enable creation of NetworkPolicy resources. Only Ingress traffic is filtered for now. |
252+
| networkPolicy.explicitIpBlocks | list | `[]` | networkPolicy.explicitIpBlocks List of CIDR blocks allowed as ingress sources. Each entry must be a valid CIDR notation string (e.g. 10.0.0.0/8). When defined, the specified CIDR ranges are added to the ingress `from` rules using `ipBlock` entries and complement the other configured ingress sources. </br> Example: ``` explicitIpBlocks: - 35.191.0.0/16 - 130.211.0.0/22 ``` |
253+
| networkPolicy.explicitNamespacesSelector | object | `{}` | networkPolicy.explicitNamespacesSelector A Kubernetes LabelSelector to explicitly select namespaces from which traffic could be allowed If explicitNamespacesSelector is missing or set to {}, only client Pods that are in the networkPolicy's namespace and that match other criteria, the ones that have the good label, can reach the grafana. But sometimes, we want the grafana to be accessible to clients from other namespaces, in this case, we can use this LabelSelector to select these namespaces, note that the networkPolicy's namespace should also be explicitly added. </br> Example: ``` explicitNamespacesSelector: matchLabels: role: frontend matchExpressions: - {key: role, operator: In, values: [frontend]} ``` |
254+
| networkPolicy.ingress | bool | `true` | networkPolicy.allowExternal Don't require client label for connections The Policy model to apply. When set to false, only pods with the correct client label will have network access to grafana port defined. When true, grafana will accept connections from any source (with the correct destination port). |
254255
| nodeSelector | object | `{}` | |
255256
| notifiers | object | `{}` | |
256257
| persistence.accessModes[0] | string | `"ReadWriteOnce"` | |

charts/grafana/templates/networkpolicy.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ spec:
5252
- namespaceSelector:
5353
{{- toYaml . | nindent 12 }}
5454
{{- end }}
55+
{{- range .Values.networkPolicy.explicitIpBlocks }}
56+
- ipBlock:
57+
cidr: {{ . | quote }}
58+
{{- end }}
5559
- podSelector:
5660
matchLabels:
5761
{{- include "grafana.labels" . | nindent 14 }}

charts/grafana/values.yaml

Lines changed: 58 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,69 +1596,73 @@ imageRenderer:
15961596
extraVolumes: []
15971597

15981598
networkPolicy:
1599-
## @param networkPolicy.enabled Enable creation of NetworkPolicy resources. Only Ingress traffic is filtered for now.
1600-
##
1599+
# -- networkPolicy.enabled Enable creation of NetworkPolicy resources. Only Ingress traffic is filtered for now.
16011600
enabled: false
1602-
## @param networkPolicy.allowExternal Don't require client label for connections
1603-
## The Policy model to apply. When set to false, only pods with the correct
1604-
## client label will have network access to grafana port defined.
1605-
## When true, grafana will accept connections from any source
1606-
## (with the correct destination port).
1607-
##
1601+
# --networkPolicy.allowExternal Don't require client label for connections
1602+
# The Policy model to apply. When set to false, only pods with the correct
1603+
# client label will have network access to grafana port defined.
1604+
# When true, grafana will accept connections from any source
1605+
# (with the correct destination port).
1606+
#
16081607
ingress: true
1609-
## @param networkPolicy.ingress When true enables the creation
1610-
## an ingress network policy
1611-
##
1608+
# -- networkPolicy.ingress When true enables the creation
1609+
# an ingress network policy
16121610
allowExternal: true
1613-
## @param networkPolicy.explicitNamespacesSelector A Kubernetes LabelSelector to explicitly select namespaces from which traffic could be allowed
1614-
## If explicitNamespacesSelector is missing or set to {}, only client Pods that are in the networkPolicy's namespace
1615-
## and that match other criteria, the ones that have the good label, can reach the grafana.
1616-
## But sometimes, we want the grafana to be accessible to clients from other namespaces, in this case, we can use this
1617-
## LabelSelector to select these namespaces, note that the networkPolicy's namespace should also be explicitly added.
1618-
##
1619-
## Example:
1620-
## explicitNamespacesSelector:
1621-
## matchLabels:
1622-
## role: frontend
1623-
## matchExpressions:
1624-
## - {key: role, operator: In, values: [frontend]}
1625-
##
1611+
# -- networkPolicy.explicitNamespacesSelector A Kubernetes LabelSelector to explicitly select namespaces from which traffic could be allowed
1612+
# If explicitNamespacesSelector is missing or set to {}, only client Pods that are in the networkPolicy's namespace
1613+
# and that match other criteria, the ones that have the good label, can reach the grafana.
1614+
# But sometimes, we want the grafana to be accessible to clients from other namespaces, in this case, we can use this
1615+
# LabelSelector to select these namespaces, note that the networkPolicy's namespace should also be explicitly added.
1616+
# </br>
1617+
#
1618+
# Example:
1619+
#
1620+
# ```
1621+
# explicitNamespacesSelector:
1622+
# matchLabels:
1623+
# role: frontend
1624+
# matchExpressions:
1625+
# - {key: role, operator: In, values: [frontend]}
1626+
# ```
16261627
explicitNamespacesSelector: {}
1627-
##
1628-
##
1629-
##
1630-
##
1631-
##
1632-
##
1628+
# -- networkPolicy.explicitIpBlocks List of CIDR blocks allowed as ingress sources.
1629+
# Each entry must be a valid CIDR notation string (e.g. 10.0.0.0/8).
1630+
# When defined, the specified CIDR ranges are added to the ingress `from` rules
1631+
# using `ipBlock` entries and complement the other configured ingress sources.
1632+
# </br>
1633+
#
1634+
# Example:
1635+
#
1636+
# ```
1637+
# explicitIpBlocks:
1638+
# - 35.191.0.0/16
1639+
# - 130.211.0.0/22
1640+
# ```
1641+
#
1642+
explicitIpBlocks: []
1643+
16331644
egress:
1634-
## @param networkPolicy.egress.enabled When enabled, an egress network policy will be
1635-
## created allowing grafana to connect to external data sources from kubernetes cluster.
1645+
# -- networkPolicy.egress.enabled When enabled, an egress network policy will be
1646+
# created allowing grafana to connect to external data sources from kubernetes cluster.
16361647
enabled: false
1637-
##
1638-
## @param networkPolicy.egress.blockDNSResolution When enabled, DNS resolution will be blocked
1639-
## for all pods in the grafana namespace.
1648+
# -- networkPolicy.egress.blockDNSResolution When enabled, DNS resolution will be blocked
1649+
# for all pods in the grafana namespace.
16401650
blockDNSResolution: false
1641-
##
1642-
## @param networkPolicy.egress.ports Add individual ports to be allowed by the egress
1651+
# -- networkPolicy.egress.ports Add individual ports to be allowed by the egress
16431652
ports: []
1644-
## Add ports to the egress by specifying - port: <port number>
1645-
## E.X.
1646-
## - port: 80
1647-
## - port: 443
1648-
##
1649-
## @param networkPolicy.egress.to Allow egress traffic to specific destinations
1653+
# Add ports to the egress by specifying - port: <port number>
1654+
# E.X.
1655+
# - port: 80
1656+
# - port: 443
1657+
#
1658+
# -- networkPolicy.egress.to Allow egress traffic to specific destinations
16501659
to: []
1651-
## Add destinations to the egress by specifying - ipBlock: <CIDR>
1652-
## E.X.
1653-
## to:
1654-
## - namespaceSelector:
1655-
## matchExpressions:
1656-
## - {key: role, operator: In, values: [grafana]}
1657-
##
1658-
##
1659-
##
1660-
##
1661-
##
1660+
# -- destinations to the egress by specifying - ipBlock: <CIDR>
1661+
# E.X.
1662+
# to:
1663+
# - namespaceSelector:
1664+
# matchExpressions:
1665+
# - {key: role, operator: In, values: [grafana]}
16621666

16631667
# Enable backward compatibility of kubernetes where version below 1.13 doesn't have the enableServiceLinks option
16641668
enableKubeBackwardCompatibility: false

0 commit comments

Comments
 (0)