8000 Merge main · nginx/kubernetes-ingress@81b1ac7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 81b1ac7

Browse files
author
Jim Ryan
committed
Merge main
1 parent 3fb9e5a commit 81b1ac7

File tree

26 files changed

+366
-101
lines changed

26 files changed

+366
-101
lines changed

.github/scripts/variables.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env bash
2+
3+
if [ "$1" = "" ]; then
4+
echo "ERROR: paramater needed"
5+
exit 2
6+
fi
7+
8+
INPUT=$1
9+
ROOTDIR=$(git rev-parse --show-toplevel || echo ".")
10+
if [ "$PWD" != "$ROOTDIR" ]; then
11+
# shellcheck disable=SC2164
12+
cd "$ROOTDIR";
13+
fi
14+
15+
case $INPUT in
16+
docker_md5)
17+
docker_md5=$(find . -type f \( -name "Dockerfile" -o -name version.txt \) -not -path "./tests*" -exec md5sum {} + | LC_ALL=C sort | md5sum | awk '{ print $1 }')
18+
echo "docker_md5=${docker_md5:0:8}"
19+
;;
20+
21+
go_code_md5)
22+
echo "go_code_md5=$(find . -type f \( -name "*.go" -o -name go.mod -o -name go.sum -o -name "*.tmpl" \) -not -path "./docs*" -exec md5sum {} + | LC_ALL=C sort | md5sum | awk '{ print $1 }')"
23+
;;
24+
25+
*)
26+
echo "ERROR: option not found"
27+
exit 2
28+
;;
29+
esac

.github/workflows/build-base-images.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ jobs:
3232
- name: Output Variables
3333
id: vars
3434
run: |
35-
docker_md5=$(find . -type f \( -name "Dockerfile" -o -name version.txt \) -not -path "./tests*" -exec md5sum {} + | LC_ALL=C sort | md5sum | awk '{ print $1 }')
36-
echo "docker_md5=${docker_md5:0:8}" >> $GITHUB_OUTPUT
35+
./.github/scripts/variables.sh docker_md5 >> $GITHUB_OUTPUT
3736
source .github/data/version.txt
3837
echo "ic_version=${IC_VERSION}" >> $GITHUB_OUTPUT
3938
cat $GITHUB_OUTPUT

.github/workflows/cache-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Output Variables
2929
id: vars
3030
run: |
31-
echo go_code_md5=$(find . -type f \( -name "*.go" -o -name go.mod -o -name go.sum -o -name "*.tmpl" -o -name .goreleaser.yml -o -name .github/data/version.txt \) -not -path "./docs*" -exec md5sum {} + | LC_ALL=C sort | md5sum | awk '{ print $1 }') >> $GITHUB_OUTPUT
31+
./.github/scripts/variables.sh go_code_md5 >> $GITHUB_OUTPUT
3232
source .github/data/version.txt
3333
echo "chart_version=${HELM_CHART_VERSION}" >> $GITHUB_OUTPUT
3434
cat $GITHUB_OUTPUT

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ jobs:
8181
| jq -R -s -c 'split("\n")[:-1]')
8282
echo "latest_kindest_node_versions=$kindest_versions" >> $GITHUB_OUTPUT
8383
echo "go_path=$(go env GOPATH)" >> $GITHUB_OUTPUT
84-
echo go_code_md5=$(find . -type f \( -name "*.go" -o -name go.mod -o -name go.sum -o -name "*.tmpl" -o -name .goreleaser.yml -o -name .github/data/version.txt \) -not -path "./docs*" -exec md5sum {} + | LC_ALL=C sort | md5sum | awk '{ print $1 }') >> $GITHUB_OUTPUT
8584
source .github/data/version.txt
8685
echo "ic_version=${IC_VERSION}" >> $GITHUB_OUTPUT
8786
echo "chart_version=${HELM_CHART_VERSION}" >> $GITHUB_OUTPUT
@@ -94,8 +93,8 @@ jobs:
9493
publish=true
9594
fi
9695
echo "publish=$publish" >> $GITHUB_OUTPUT
97-
docker_md5=$(find . -type f \( -name "Dockerfile" -o -name version.txt \) -not -path "./tests*" -exec md5sum {} + | LC_ALL=C sort | md5sum | awk '{ print $1 }')
98-
echo "docker_md5=${docker_md5:0:8}" >> $GITHUB_OUTPUT
96+
./.github/scripts/variables.sh go_code_md5 >> $GITHUB_OUTPUT
97+
./.github/scripts/variables.sh docker_md5 >> $GITHUB_OUTPUT
9998
cat $GITHUB_OUTPUT
10099
101100
- name: Fetch Cached Binary Artifacts

.github/workflows/update-docker-images.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
versions: ${{ steps.versions.outputs.matrix }}
3131
go-md5: ${{ steps.md5.outputs.go_code_md5 }}
3232
binary-cache-hit: ${{ steps.binary-cache.outputs.cache-hit }}
33+
base-image-md5: ${{ steps.md5.outputs.docker_md5 }}
3334
steps:
3435
- name: Checkout Repository
3536
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
@@ -57,7 +58,9 @@ jobs:
5758
5859
- name: Set Go MD5sums
5960
id: md5
60-
run: echo go_code_md5=$(find . -type f \( -name "*.go" -o -name go.mod -o -name go.sum -o -name "*.tmpl" \) -not -path "./docs*" -exec md5sum {} + | LC_ALL=C sort | md5sum | awk '{ print $1 }') >> $GITHUB_OUTPUT
61+
run: |
62+
./.github/scripts/variables.sh go_code_md5 >> $GITHUB_OUTPUT
63+
./.github/scripts/variables.sh docker_md5 >> $GITHUB_OUTPUT
6164
6265
- name: Fetch Cached Binary Artifacts
6366
id: binary-cache
@@ -144,6 +147,7 @@ jobs:
144147
image: debian
145148
tag: ${{ needs.variables.outputs.kic-tag }}
146149
go-md5: ${{ needs.variables.outputs.go-md5 }}
150+
base-image-md5: ${{ needs.variables.outputs.base-image-md5 }}
147151
permissions:
148152
contents: read
149153
actions: read
@@ -162,6 +166,7 @@ jobs:
162166
image: alpine
163167
tag: ${{ needs.variables.outputs.kic-tag }}
164168
go-md5: ${{ needs.variables.outputs.go-md5 }}
169+
base-image-md5: ${{ needs.variables.outputs.base-image-md5 }}
165170
permissions:
166171
contents: read
167172
actions: read
@@ -180,6 +185,7 @@ jobs:
180185
image: ubi
181186
tag: ${{ needs.variables.outputs.kic-tag }}
182187
go-md5: ${{ needs.variables.outputs.go-md5 }}
188+
base-image-md5: ${{ needs.variables.outputs.base-image-md5 }}
183189
permissions:
184190
contents: read
185191
actions: read

charts/nginx-ingress/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ The following tables lists the configurable parameters of the NGINX Ingress Cont
387387
|`controller.replicaCount` | The number of replicas of the Ingress Controller deployment. | 1 |
388388
|`controller.ingressClass.name` | A class of the Ingress Controller. An IngressClass resource with the name equal to the class must be deployed. Otherwise, the Ingress Controller will fail to start. The Ingress Controller only processes resources that belong to its class - i.e. have the "ingressClassName" field resource equal to the class. The Ingress Controller processes all the VirtualServer/VirtualServerRoute/TransportServer resources that do not have the "ingressClassName" field for all versions of Kubernetes. | nginx |
389389
|`controller.ingressClass.create` | Creates a new IngressClass object with the name `controller.ingressClass.name`. Set to `false` to use an existing ingressClass created using `kubectl` with the same name. If you use `helm upgrade`, do not change the values from the previous release as helm will delete IngressClass objects managed by helm. If you are upgrading from a release earlier than 3.4.3, do not set the value to false. | true |
390-
|`controller.ingressClass.setAsDefaultIngress` | New Ingresses without an `"ingressClassName"` field specified will be assigned the class specified in `controller.ingressClass.name`. Requires `controller.ingressClass.create`. | false |
390+
|`controller.ingressClass.setAsDefaultIngress` | New Ingresses without an `"ingressClassName"` field specified will be assigned the class specified in `controller.ingressClass.name`. Requires `controller.ingressClass.create`. | false |
391391
|`controller.watchNamespace` | Comma separated list of namespaces the Ingress Controller should watch for resources. By default the Ingress Controller watches all namespaces. Mutually exclusive with `controller.watchNamespaceLabel`. Please note that if configuring multiple namespaces using the Helm cli `--set` option, the string needs to wrapped in double quotes and the commas escaped using a backslash - e.g. `--set controller.watchNamespace="default\,nginx-ingress"`. | "" |
392392
|`controller.watchNamespaceLabel` | Configures the Ingress Controller to watch only those namespaces with label foo=bar. By default the Ingress Controller watches all namespaces. Mutually exclusive with `controller.watchNamespace`. | "" |
393393
|`controller.watchSecretNamespace` | Comma separated list of namespaces the Ingress Controller should watch for resources of type Secret. If this arg is not configured, the Ingress Controller watches the same namespaces for all resources. See `controller.watchNamespace` and `controller.watchNamespaceLabel`. Please note that if configuring multiple namespaces using the Helm cli `--set` option, the string needs to wrapped in double quotes and the commas escaped using a backslash - e.g. `--set controller.watchSecretNamespace="default\,nginx-ingress"`. | "" |
@@ -466,11 +466,11 @@ The following tables lists the configurable parameters of the NGINX Ingress Cont
466466
|`controller.podDisruptionBudget.maxUnavailable` | The number of Ingress Controller pods that can be unavailable. This is a mutually exclusive setting with "minAvailable". | 0 |
467467
|`controller.strategy` | Specifies the strategy used to replace old Pods with new ones. Docs for [Deployment update strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) and [Daemonset update strategy](https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy) | {} |
468468
|`controller.disableIPV6` | Disable IPV6 listeners explicitly for nodes that do not support the IPV6 stack. | false |
469-
|`controller.defaultHTTPListenerPort` | Sets the port for the HTTP `default_server` listener. | 80 |
469+
|`controller.defaultHTTPListenerPort` | Sets the port for the HTTP `default_server` listener. | 80 |
470470
|`controller.defaultHTTPSListenerPort` | Sets the port for the HTTPS `default_server` listener. | 443 |
471471
|`controller.readOnlyRootFilesystem` | Configure root filesystem as read-only and add volumes for temporary data. Three major releases after 3.5.x this argument will be moved permanently to the `controller.securityContext` section. | false |
472472
|`controller.enableSSLDynamicReload` | Enable lazy loading for SSL Certificates. | true |
473-
|`controller.enableTelemetryReporting` | Enable telemetry reporting. | true |
473+
|`controller.telemetryReporting.enable` | Enable telemetry reporting. | true |
474474
|`controller.enableWeightChangesWithoutReload` | Enable weight changes without reloading the NGINX configuration. | false |
475475
|`rbac.create` | Configures RBAC. | true |
476476
|`prometheus.create` | Expose NGINX or NGINX Plus metrics in the Prometheus format. | true |

charts/nginx-ingress/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ Build the args for the service binary.
277277
- -ready-status-port={{ .Values.controller.readyStatus.port }}
278278
- -enable-latency-metrics={{ .Values.controller.enableLatencyMetrics }}
279279
- -ssl-dynamic-reload={{ .Values.controller.enableSSLDynamicReload }}
280-
- -enable-telemetry-reporting={{ .Values.controller.enableTelemetryReporting}}
280+
- -enable-telemetry-reporting={{ .Values.controller.telemetryReporting.enable}}
281281
- -weight-changes-without-reload={{ .Values.controller.enableWeightChangesWithoutReload}}
282282
{{- if .Values.nginxAgent.enable }}
283283
- -agent=true

charts/nginx-ingress/templates/clusterrole.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ rules:
5555
- nodes
5656
verbs:
5757
- list
58+
- apiGroups:
59+
- "apps"
60+
resources:
61+
- replicasets
62+
- daemonsets
63+
verbs:
64+
- get
5865
- apiGroups:
5966
- networking.k8s.io
6067
resources:

charts/nginx-ingress/values.schema.json

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,13 +1417,21 @@
14171417
true
14181418
]
14191419
},
1420-
"enableTelemetryReporting": {
1421-
"type": "boolean",
1422-
"default": true,
1423-
"title": "Enable telemetry reporting",
1424-
"examples": [
1425-
true
1426-
]
1420+
"telemetryReporting": {
1421+
"type": "object",
1422+
"default": {},
1423+
"title": "Configure telemetry reporting options",
1424+
"required": [],
1425+
"properties": {
1426+
"enable": {
1427+
"type": "boolean",
1428+
"default": true,
1429+
"title": "Enable telemetry reporting",
1430+
"examples": [
1431+
true
1432+
]
1433+
}
1434+
}
14271435
},
14281436
"enableWeightChangesWithoutReload": {
14291437
"type": "boolean",

charts/nginx-ingress/values.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,10 @@ controller:
487487
## Enable dynamic reloading of certificates
488488
enableSSLDynamicReload: true
489489

490-
## Enable telemetry reporting
491-
enableTelemetryReporting: true
490+
## Configure telemetry reporting options
491+
telemetryReporting:
492+
## Enable telemetry reporting
493+
enable: true
492494

493495
## Enables weight changes without reloading the NGINX Configuration for two way splits in NGINX Plus.
494496
## Enabling this feature may require increasing map_hash_bucket_size, map_hash_max_size,

0 commit comments

Comments
 (0)
0