From 0fb0f463688049ab65dcc5b1192b9e77a4fc3306 Mon Sep 17 00:00:00 2001 From: Alper Rifat Ulucinar Date: Fri, 16 Feb 2024 14:53:40 +0300 Subject: [PATCH 1/3] Fix the update loop in Firewall.networkfirewall resource - Extend the example manifest for the Firewall.networkfirewall resource with some extra parameters and enable the update tests on it. Signed-off-by: Alper Rifat Ulucinar (cherry picked from commit e8b5f1a58096157f488e91efe51e759675521873) --- config/networkfirewall/config.go | 3 +++ examples/networkfirewall/v1beta1/firewall.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/config/networkfirewall/config.go b/config/networkfirewall/config.go index cac046ddc4..62cd141098 100644 --- a/config/networkfirewall/config.go +++ b/config/networkfirewall/config.go @@ -76,6 +76,9 @@ func Configure(p *config.Provider) { // nolint:gocyclo } } } + if diff.Attributes != nil { + delete(diff.Attributes, "firewall_status.#") + } return diff, nil } }) diff --git a/examples/networkfirewall/v1beta1/firewall.yaml b/examples/networkfirewall/v1beta1/firewall.yaml index b02016cb89..8dae458c08 100644 --- a/examples/networkfirewall/v1beta1/firewall.yaml +++ b/examples/networkfirewall/v1beta1/firewall.yaml @@ -4,11 +4,14 @@ metadata: annotations: uptest.upbound.io/timeout: "3600" meta.upbound.io/example-id: networkfirewall/v1beta1/firewall + uptest.upbound.io/update-parameter: '{"tags":{"update-test-tag":"val"}}' labels: testing.upbound.io/example-name: example name: firewallname spec: forProvider: + firewallPolicyChangeProtection: true + subnetChangeProtection: true firewallPolicyArnSelector: matchLabels: testing.upbound.io/example-name: example From 834a049af85a28f122f76ea2c27ea5fb033f7230 Mon Sep 17 00:00:00 2001 From: Alper Rifat Ulucinar Date: Tue, 27 Feb 2024 14:51:01 +0300 Subject: [PATCH 2/3] Bump uptest to v0.11.1 Signed-off-by: Alper Rifat Ulucinar --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bb9bc1ae5b..cd86d175ed 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ export SUBPACKAGES := $(SUBPACKAGES) KIND_VERSION = v0.21.0 UP_VERSION = v0.20.0 UP_CHANNEL = stable -UPTEST_VERSION = v0.11.0 +UPTEST_VERSION = v0.11.1 KUSTOMIZE_VERSION = v5.3.0 YQ_VERSION = v4.40.5 From e059d5c02c7773fe44627124fbd52af73943fc61 Mon Sep 17 00:00:00 2001 From: Alper Rifat Ulucinar Date: Tue, 27 Feb 2024 15:58:00 +0300 Subject: [PATCH 3/3] Fix the meta.upbound.io/example-id annotations of the dependencies in examples/networkfirewall/v1beta1/firewall.yaml. Signed-off-by: Alper Rifat Ulucinar --- examples/networkfirewall/v1beta1/firewall.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/networkfirewall/v1beta1/firewall.yaml b/examples/networkfirewall/v1beta1/firewall.yaml index 8dae458c08..efd5457a37 100644 --- a/examples/networkfirewall/v1beta1/firewall.yaml +++ b/examples/networkfirewall/v1beta1/firewall.yaml @@ -116,6 +116,8 @@ spec: apiVersion: ec2.aws.upbound.io/v1beta1 kind: VPC metadata: + annotations: + meta.upbound.io/example-id: networkfirewall/v1beta1/firewall labels: testing.upbound.io/example-name: example name: sample-vpc @@ -131,6 +133,8 @@ spec: apiVersion: ec2.aws.upbound.io/v1beta1 kind: Subnet metadata: + annotations: + meta.upbound.io/example-id: networkfirewall/v1beta1/firewall labels: testing.upbound.io/example-name: example name: sample-subnet1 @@ -148,7 +152,7 @@ apiVersion: networkfirewall.aws.upbound.io/v1beta1 kind: LoggingConfiguration metadata: annotations: - meta.upbound.io/example-id: networkfirewall/v1beta1/loggingconfiguration + meta.upbound.io/example-id: networkfirewall/v1beta1/firewall labels: testing.upbound.io/example-name: example name: example @@ -171,9 +175,11 @@ spec: apiVersion: s3.aws.upbound.io/v1beta1 kind: Bucket metadata: - name: uptest-networkfirewall-logging + annotations: + meta.upbound.io/example-id: networkfirewall/v1beta1/firewall labels: testing.upbound.io/example-name: s3-networkfirewall + name: uptest-networkfirewall-logging spec: deletionPolicy: Orphan forProvider: