Skip to content

Commit 355c1f5

Browse files
committed
CP/DP Split: remove unneeded provisioner mode
With the new deployment model, the provisioner mode for conformance tests is no longer needed. This code is removed, and at a later date the conformance tests will be updated to work with the new model. Also removed some unneeded metrics collection.
1 parent 785b809 commit 355c1f5

File tree

21 files changed

+8
-1410
lines changed

21 files changed

+8
-1410
lines changed

.github/workflows/conformance.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,6 @@ jobs:
7676
type=ref,event=pr
7777
type=ref,event=branch,suffix=-rc,enable=${{ startsWith(github.ref, 'refs/heads/release') }}
7878
79-
- name: Generate static deployment
80-
run: |
81-
ngf_prefix=ghcr.io/nginx/nginx-gateway-fabric
82-
ngf_tag=${{ steps.ngf-meta.outputs.version }}
83-
make generate-static-deployment PLUS_ENABLED=${{ inputs.image == 'plus' && 'true' || 'false' }} PREFIX=${ngf_prefix} TAG=${ngf_tag}
84-
working-directory: ./tests
85-
8679
- name: Build binary
8780
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6.2.1
8881
with:
@@ -151,7 +144,6 @@ jobs:
151144
ngf_tag=${{ steps.ngf-meta.outputs.version }}
152145
if [ ${{ github.event_name }} == "schedule" ]; then export GW_API_VERSION=main; fi
153146
make helm-install-local${{ inputs.image == 'plus' && '-with-plus' || ''}} PREFIX=${ngf_prefix} TAG=${ngf_tag}
154-
make deploy-updated-provisioner PREFIX=${ngf_prefix} TAG=${ngf_tag}
155147
working-directory: ./tests
156148

157149
- name: Run conformance tests

cmd/gateway/commands.go

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
ctlrZap "sigs.k8s.io/controller-runtime/pkg/log/zap"
2222

2323
"github.com/nginx/nginx-gateway-fabric/internal/framework/file"
24-
"github.com/nginx/nginx-gateway-fabric/internal/mode/provisioner"
2524
"github.com/nginx/nginx-gateway-fabric/internal/mode/static"
2625
"github.com/nginx/nginx-gateway-fabric/internal/mode/static/config"
2726
"github.com/nginx/nginx-gateway-fabric/internal/mode/static/licensing"
@@ -443,56 +442,6 @@ func createStaticModeCommand() *cobra.Command {
443442
return cmd
444443
}
445444

446-
func createProvisionerModeCommand() *cobra.Command {
447-
var (
448-
gatewayCtlrName = stringValidatingValue{
449-
validator: validateGatewayControllerName,
450-
}
451-
gatewayClassName = stringValidatingValue{
452-
validator: validateResourceName,
453-
}
454-
)
455-
456-
cmd := &cobra.Command{
457-
Use: "provisioner-mode",
458-
Short: "Provision a static-mode NGINX Gateway Fabric Deployment per Gateway resource",
459-
Hidden: true,
460-
RunE: func(_ *cobra.Command, _ []string) error {
461-
logger := ctlrZap.New()
462-
commit, date, dirty := getBuildInfo()
463-
logger.Info(
464-
"Starting NGINX Gateway Fabric Provisioner",
465-
"version", version,
466-
"commit", commit,
467-
"date", date,
468-
"dirty", dirty,
469-
)
470-
471-
return provisioner.StartManager(provisioner.Config{
472-
Logger: logger,
473-
GatewayClassName: gatewayClassName.value,
474-
GatewayCtlrName: gatewayCtlrName.value,
475-
})
476-
},
477-
}
478-
479-
cmd.Flags().Var(
480-
&gatewayCtlrName,
481-
gatewayCtlrNameFlag,
482-
fmt.Sprintf(gatewayCtlrNameUsageFmt, domain),
483-
)
484-
utilruntime.Must(cmd.MarkFlagRequired(gatewayCtlrNameFlag))
485-
486-
cmd.Flags().Var(
487-
&gatewayClassName,
488-
gatewayClassFlag,
489-
gatewayClassNameUsage,
490-
)
491-
utilruntime.Must(cmd.MarkFlagRequired(gatewayClassFlag))
492-
493-
return cmd
494-
}
495-
496445
// FIXME(pleshakov): Remove this command once NGF min supported Kubernetes version supports sleep action in
497446
// preStop hook.
498447
// See https://github.com/kubernetes/enhancements/tree/4ec371d92dcd4f56a2ab18c8ba20bb85d8d20efe/keps/sig-node/3960-pod-lifecycle-sleep-action

cmd/gateway/commands_test.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@ func TestCommonFlagsValidation(t *testing.T) {
126126
t.Parallel()
127127
testFlag(t, createStaticModeCommand(), test)
128128
})
129-
t.Run(test.name+"_provisioner_mode", func(t *testing.T) {
130-
t.Parallel()
131-
testFlag(t, createProvisionerModeCommand(), test)
132-
})
133129
}
134130
}
135131

@@ -445,22 +441,6 @@ func TestStaticModeCmdFlagValidation(t *testing.T) {
445441
}
446442
}
447443

448-
func TestProvisionerModeCmdFlagValidation(t *testing.T) {
449-
t.Parallel()
450-
testCase := flagTestCase{
451-
name: "valid flags",
452-
args: []string{
453-
"--gateway-ctlr-name=gateway.nginx.org/nginx-gateway", // common and required flag
454-
"--gatewayclass=nginx", // common and required flag
455-
},
456-
wantErr: false,
457-
}
458-
459-
// common flags validation is tested separately
460-
461-
testFlag(t, createProvisionerModeCommand(), testCase)
462-
}
463-
464444
func TestSleepCmdFlagValidation(t *testing.T) {
465445
t.Parallel()
466446
tests := []flagTestCase{

cmd/gateway/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ func main() {
2222

2323
rootCmd.AddCommand(
2424
createStaticModeCommand(),
25-
createProvisionerModeCommand(),
2625
createInitializeCommand(),
2726
createSleepCommand(),
2827
)

docs/developer/release-process.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ To create a new release, follow these steps:
4444
1. Kick off the [longevity tests](https://github.com/nginx/nginx-gateway-fabric/blob/main/tests/README.md#longevity-testing) for both OSS and Plus. You'll need to create two clusters and VMs for this. Before running, update your `vars.env` file with the proper image tag and prefixes. NGF and nginx images will be available from `ghcr.io`, and nginx plus will be available in GCP (`us-docker.pkg.dev/<GCP_PROJECT_ID>/nginx-gateway-fabric/nginx-plus`). These tests need to run for 4 days before releasing. The results should be committed to the main branch and then cherry-picked to the release branch.
4545
2. Kick off the [NFR workflow](https://github.com/nginx/nginx-gateway-fabric/actions/workflows/nfr.yml) in the browser. For `image_tag`, use `release-X.X-rc`, and for `version`, use the upcoming `X.Y.Z` NGF version. Run the workflow on the new release branch. This will run all of the NFR tests which are automated and open a PR with the results files when it is complete. Review this PR and make any necessary changes before merging. Once merged, be sure to cherry-pick the commit to the main branch as well (the original PR targets the release branch).
4646
5. Run the [Release PR](https://github.com/nginx/nginx-gateway-fabric/actions/workflows/release-pr.yml) workflow to update the repo files for the release. Then there are a few manual steps to complete:
47-
1. Update the version tag used in the [provisioner manifest](/tests/conformance/provisioner/provisioner.yaml) and [getting started guide](/site/content/get-started.md).
48-
2. Update the [README](/README.md) to include information about the release.
49-
3. Update the [changelog](/CHANGELOG.md). There is going to be a new blank section generated by the automation that needs to be adjusted accordingly.
47+
1. Update the [README](/README.md) to include information about the release.
48+
2. Update the [changelog](/CHANGELOG.md). There is going to be a new blank section generated by the automation that needs to be adjusted accordingly.
5049
- At the top there will be a list of all PRs that are labeled with `release-notes`.
5150
The changelog includes only important (from the user perspective)
5251
changes to NGF. This is in contrast with the autogenerated full changelog, which is created in the next

docs/proposals/nginx-extensions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ spec:
155155
name: my-annotation
156156
```
157157

158-
Infrastructure labels and annotations should be applied to all resources created in response to the Gateway. This only applies to _automated deployments_ (i.e., provisioner mode), implementations that automatically deploy the data plane based on a Gateway.
158+
Infrastructure labels and annotations should be applied to all resources created in response to the Gateway.
159159
Other use cases for this API are Service type, Service IP, CPU memory requests, affinity rules, and Gateway routability (public, private, and cluster).
160160

161161
### TLS Options

embedded.go

Lines changed: 0 additions & 11 deletions
This file was deleted.

internal/mode/provisioner/deployment.go

Lines changed: 0 additions & 43 deletions
This file was deleted.

internal/mode/provisioner/doc.go

Lines changed: 0 additions & 6 deletions
This file was deleted.

internal/mode/provisioner/handler.go

Lines changed: 0 additions & 186 deletions
This file was deleted.

0 commit comments

Comments
 (0)