Skip to content

Commit b86101f

Browse files
authored
Merge branch 'main' into feat/pipeline-certfication-testing
2 parents edd64df + e4eed2d commit b86101f

File tree

15 files changed

+44
-22
lines changed

15 files changed

+44
-22
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ jobs:
184184
- name: Scan SBOM
185185
id: scan
186186
if: ${{ !inputs.dry_run }}
187-
uses: anchore/scan-action@9e8428812aebf5a6a5fc3fdd55de39d1c79b8b12 # v7.0.1
187+
uses: anchore/scan-action@a5605eb0943e46279cb4fbd9d44297355d3520ab # v7.0.2
188188
with:
189189
sbom: "sbom-${{ inputs.image }}.json"
190190
only-fixed: true

.github/workflows/ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
if [[ "${{ secrets.ARTIFACTORY_USER }}" == "" ]]; then
6161
echo "No Artifactory secrets available - using direct GOPROXY"
6262
GOPROXY_VALUE="direct"
63-
elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ ("${{ github.event_name }}" == "push" || "${{ github.event_name }}" == "schedule") && "${{ github.ref }}" == "refs/heads/main" ]]; then
63+
elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ ("${{ github.event_name }}" == "push" || "${{ github.event_name }}" == "schedule") && ("${{ github.ref }}" == "refs/heads/main" || "${{ github.ref }}" =~ ^refs/heads/release-) ]]; then
6464
echo "Production mode - using production Artifactory"
6565
GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_ENDPOINT }}"
6666
else
@@ -167,7 +167,7 @@ jobs:
167167

168168
binary:
169169
name: Build Binary
170-
runs-on: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || ((github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
170+
runs-on: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || ((github.event_name == 'push' || github.event_name == 'schedule') && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-')))) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
171171
needs: [vars, unit-tests, njs-unit-tests]
172172
outputs:
173173
json: ${{ steps.gateway_binaries.outputs.json }}
@@ -187,7 +187,7 @@ jobs:
187187
if [[ "${{ secrets.ARTIFACTORY_USER }}" == "" ]]; then
188188
echo "No Artifactory secrets available - using direct GOPROXY"
189189
GOPROXY_VALUE="direct"
190-
elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ ("${{ github.event_name }}" == "push" || "${{ github.event_name }}" == "schedule") && "${{ github.ref }}" == "refs/heads/main" ]]; then
190+
elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ ("${{ github.event_name }}" == "push" || "${{ github.event_name }}" == "schedule") && ("${{ github.ref }}" == "refs/heads/main" || "${{ github.ref }}" =~ ^refs/heads/release-) ]]; then
191191
echo "Production mode - using production Artifactory"
192192
GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_ENDPOINT }}"
193193
else
@@ -215,7 +215,7 @@ jobs:
215215
with:
216216
minor-label: "enhancement"
217217
major-label: "change"
218-
publish: ${{ inputs.is_production_release && (inputs.dry_run == false || inputs.dry_run == null) }}
218+
publish: ${{ inputs.is_production_release && (inputs.dry_run == false || inputs.dry_run == null) && true || false }}
219219
collapse-after: 20
220220
notes-header: |
221221
*Below is the auto-generated changelog, which includes all PRs that went into the release.
@@ -224,11 +224,11 @@ jobs:
224224

225225
- name: Download Syft
226226
if: ${{ inputs.is_production_release }}
227-
uses: anchore/sbom-action/download-syft@d8a2c0130026bf585de5c176ab8f7ce62d75bf04 # v0.20.7
227+
uses: anchore/sbom-action/download-syft@aa0e114b2e19480f157109b9922bda359bd98b90 # v0.20.8
228228

229229
- name: Install Cosign
230230
if: ${{ inputs.is_production_release }}
231-
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 # v3.10.0
231+
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
232232

233233
- name: Build binary
234234
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
@@ -352,7 +352,7 @@ jobs:
352352
build-os: ${{ matrix.build-os }}
353353
tag: ${{ inputs.release_version || '' }}
354354
dry_run: ${{ inputs.dry_run || false}}
355-
runner: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || ((github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
355+
runner: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || ((github.event_name == 'push' || github.event_name == 'schedule') && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-')))) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
356356
permissions:
357357
contents: read # for docker/build-push-action to read repo content
358358
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
@@ -374,7 +374,7 @@ jobs:
374374
build-os: ${{ matrix.build-os }}
375375
tag: ${{ inputs.release_version || '' }}
376376
dry_run: ${{ inputs.dry_run || false }}
377-
runner: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || ((github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
377+
runner: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || ((github.event_name == 'push' || github.event_name == 'schedule') && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-')))) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
378378
permissions:
379379
contents: read # for docker/build-push-action to read repo content
380380
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
@@ -391,7 +391,7 @@ jobs:
391391
platforms: "linux/arm64, linux/amd64"
392392
tag: ${{ inputs.operator_version || '' }}
393393
dry_run: ${{ inputs.dry_run || false }}
394-
runner: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || ((github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
394+
runner: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || ((github.event_name == 'push' || github.event_name == 'schedule') && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-')))) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
395395
permissions:
396396
contents: read # for docker/build-push-action to read repo content
397397
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
@@ -490,7 +490,7 @@ jobs:
490490

491491
publish-helm:
492492
name: Package and Publish Helm Chart
493-
runs-on: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || ((github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
493+
runs-on: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || ((github.event_name == 'push' || github.event_name == 'schedule') && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-')))) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
494494
needs: [vars, helm-tests]
495495
if: ${{ (inputs.is_production_release && (inputs.dry_run == false || inputs.dry_run == null)) || (github.event_name == 'push' && ! startsWith(github.ref, 'refs/heads/release-')) }}
496496
permissions:

build/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ COPY --from=ca-certs-provider --link /etc/ssl/certs/ca-certificates.crt /etc/ssl
1717
USER 101:1001
1818
ARG BUILD_AGENT
1919
ENV BUILD_AGENT=${BUILD_AGENT}
20+
ENV BUILD_OS=alpine
2021
ENTRYPOINT [ "/usr/bin/gateway" ]
2122

2223
FROM common AS container

build/ubi/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ COPY --from=ca-certs-provider --link /etc/ssl/certs/ca-certificates.crt /etc/ssl
1717
USER 101:1001
1818
ARG BUILD_AGENT
1919
ENV BUILD_AGENT=${BUILD_AGENT}
20+
ENV BUILD_OS=ubi
2021

2122
LABEL name="F5 NGINX Gateway Fabric NGINX Plus" \
2223
maintainer="[email protected]" \
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4-
- https://github.com/kubernetes-sigs/gateway-api-inference-extension/config/crd?timeout=120&ref=v1.0.0
4+
- https://github.com/kubernetes-sigs/gateway-api-inference-extension/config/crd?timeout=120&ref=v1.0.2

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/nginx/nginx-gateway-fabric/v2
33
go 1.24.2
44

55
require (
6-
github.com/envoyproxy/go-control-plane/envoy v1.32.4
6+
github.com/envoyproxy/go-control-plane/envoy v1.35.0
77
github.com/fsnotify/fsnotify v1.9.0
88
github.com/go-logr/logr v1.4.3
99
github.com/google/go-cmp v0.7.0
@@ -29,7 +29,7 @@ require (
2929
k8s.io/klog/v2 v2.130.1
3030
sigs.k8s.io/controller-runtime v0.22.3
3131
sigs.k8s.io/gateway-api v1.3.0
32-
sigs.k8s.io/gateway-api-inference-extension v1.0.0
32+
sigs.k8s.io/gateway-api-inference-extension v1.0.1
3333
)
3434

3535
require (

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ github.com/ebitengine/purego v0.8.4 h1:CF7LEKg5FFOsASUj0+QwaXf8Ht6TlFxg09+S9wz0o
4141
github.com/ebitengine/purego v0.8.4/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
4242
github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU=
4343
github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
44-
github.com/envoyproxy/go-control-plane/envoy v1.32.4 h1:jb83lalDRZSpPWW2Z7Mck/8kXZ5CQAFYVjQcdVIr83A=
45-
github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1Zm+wSYE20UrLtt7JZMWiWQXQEw=
44+
github.com/envoyproxy/go-control-plane/envoy v1.35.0 h1:ixjkELDE+ru6idPxcHLj8LBVc2bFP7iBytj353BoHUo=
45+
github.com/envoyproxy/go-control-plane/envoy v1.35.0/go.mod h1:09qwbGVuSWWAyN5t/b3iyVfz5+z8QWGrzkoqm/8SbEs=
4646
github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8=
4747
github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU=
4848
github.com/evanphx/json-patch v0.5.2 h1:xVCHIVMUu1wtM/VkR9jVZ45N3FhZfYMMYGorLCR8P3k=
@@ -364,8 +364,8 @@ sigs.k8s.io/controller-runtime v0.22.3 h1:I7mfqz/a/WdmDCEnXmSPm8/b/yRTy6JsKKENTi
364364
sigs.k8s.io/controller-runtime v0.22.3/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8=
365365
sigs.k8s.io/gateway-api v1.3.0 h1:q6okN+/UKDATola4JY7zXzx40WO4VISk7i9DIfOvr9M=
366366
sigs.k8s.io/gateway-api v1.3.0/go.mod h1:d8NV8nJbaRbEKem+5IuxkL8gJGOZ+FJ+NvOIltV8gDk=
367-
sigs.k8s.io/gateway-api-inference-extension v1.0.0 h1:GsHvlu1Cn1t6+vrHoPdNNlpwKxf/y1HuQSlUjd58Ds8=
368-
sigs.k8s.io/gateway-api-inference-extension v1.0.0/go.mod h1:qxSY10qt2+YnZJ43VfpMXa6wpiENPderI2BnNZ4Kxfc=
367+
sigs.k8s.io/gateway-api-inference-extension v1.0.1 h1:n/zyxk/1RCT1nNoCdKiZsN7XTz9mTk3Cu1fWWbtZMBw=
368+
sigs.k8s.io/gateway-api-inference-extension v1.0.1/go.mod h1:qxSY10qt2+YnZJ43VfpMXa6wpiENPderI2BnNZ4Kxfc=
369369
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
370370
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
371371
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=

internal/controller/telemetry/collector.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"errors"
66
"fmt"
7+
"os"
78
"runtime"
89
"sort"
910
"strings"
@@ -40,7 +41,7 @@ type ConfigurationGetter interface {
4041
// Data is telemetry data.
4142
//
4243
//go:generate go run -tags generator github.com/nginx/telemetry-exporter/cmd/generator -type=Data -scheme -scheme-protocol=NGFProductTelemetry -scheme-df-datatype=ngf-product-telemetry
43-
type Data struct {
44+
type Data struct { //nolint //required to skip golangci-lint-full fieldalignment
4445
// ImageSource tells whether the image was built by GitHub or locally (values are 'gha', 'local', or 'unknown')
4546
ImageSource string
4647
tel.Data // embedding is required by the generator.
@@ -68,6 +69,8 @@ type Data struct {
6869
NginxOneConnectionEnabled bool
6970
// InferencePoolCount is the number of InferencePools that are referenced by at least one Route.
7071
InferencePoolCount int64
72+
// BuildOS is the base operating system the control plane was built on (e.g. alpine, ubi).
73+
BuildOS string
7174
}
7275

7376
// NGFResourceCounts stores the counts of all relevant resources that NGF processes and generates configuration from.
@@ -123,6 +126,8 @@ type DataCollectorConfig struct {
123126
Version string
124127
// ImageSource is the source of the NGF image.
125128
ImageSource string
129+
// BuildOS is the base operating system the control plane was built on (e.g. alpine, ubi).
130+
BuildOS string
126131
// Flags contains the command-line NGF flag keys and values.
127132
Flags config.Flags
128133
// NginxOneConsoleConnection is a boolean that indicates whether the connection to the Nginx One Console is enabled.
@@ -176,6 +181,10 @@ func (c DataCollectorImpl) Collect(ctx context.Context) (Data, error) {
176181

177182
nginxPodCount := getNginxPodCount(g, clusterInfo.NodeCount)
178183

184+
buildOs := os.Getenv("BUILD_OS")
185+
if buildOs == "" {
186+
buildOs = "alpine"
187+
}
179188
inferencePoolCount := int64(len(g.ReferencedInferencePools))
180189

181190
data := Data{
@@ -191,6 +200,7 @@ func (c DataCollectorImpl) Collect(ctx context.Context) (Data, error) {
191200
},
192201
NGFResourceCounts: graphResourceCount,
193202
ImageSource: c.cfg.ImageSource,
203+
BuildOS: buildOs,
194204
FlagNames: c.cfg.Flags.Names,
195205
FlagValues: c.cfg.Flags.Values,
196206
SnippetsFiltersDirectives: snippetsFiltersDirectives,

internal/controller/telemetry/collector_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ var _ = Describe("Collector", Ordered, func() {
172172
NGFResourceCounts: telemetry.NGFResourceCounts{},
173173
ControlPlanePodCount: 1,
174174
ImageSource: "local",
175+
BuildOS: "alpine",
175176
FlagNames: flags.Names,
176177
FlagValues: flags.Values,
177178
SnippetsFiltersDirectives: []string{},
@@ -193,6 +194,7 @@ var _ = Describe("Collector", Ordered, func() {
193194
Version: version,
194195
PodNSName: podNSName,
195196
ImageSource: "local",
197+
BuildOS: "alpine",
196198
Flags: flags,
197199
NginxOneConsoleConnection: true,
198200
})
@@ -524,6 +526,7 @@ var _ = Describe("Collector", Ordered, func() {
524526
expData.NginxPodCount = int64(8)
525527
expData.ControlPlanePodCount = int64(2)
526528
expData.NginxOneConnectionEnabled = true
529+
expData.BuildOS = "alpine"
527530

528531
expData.InferencePoolCount = 3
529532

internal/controller/telemetry/data.avdl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,8 @@ attached at the Gateway level. */
117117
/** InferencePoolCount is the number of InferencePools that are referenced by at least one Route. */
118118
long? InferencePoolCount = null;
119119

120+
/** BuildOS is the base operating system the control plane was built on (e.g. alpine, ubi). */
121+
string? BuildOS = null;
122+
120123
}
121124
}

0 commit comments

Comments
 (0)