From 97b214c2cf90d5702e47d17353b794b6686e715c Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Wed, 16 Nov 2022 15:44:14 +0100 Subject: [PATCH 1/2] [main] Patches to make OCP 48 -> OCP 4.11 work (#1928) * Adding HPA patch Signed-off-by: Matthias Wessendorf * Adding SeccompProfile patch Signed-off-by: Matthias Wessendorf Signed-off-by: Matthias Wessendorf (cherry picked from commit 181f37ba07e0ad08a8b3d5d81c5bea91c20834e3) --- .../keep_hpa_v2beta2_until_ocp_4.13.patch | 13 ++ openshift/patches/remove_seccompProfile.patch | 166 ++++++++++++++++++ 2 files changed, 179 insertions(+) create mode 100644 openshift/patches/keep_hpa_v2beta2_until_ocp_4.13.patch create mode 100644 openshift/patches/remove_seccompProfile.patch diff --git a/openshift/patches/keep_hpa_v2beta2_until_ocp_4.13.patch b/openshift/patches/keep_hpa_v2beta2_until_ocp_4.13.patch new file mode 100644 index 00000000000..371171ee4f2 --- /dev/null +++ b/openshift/patches/keep_hpa_v2beta2_until_ocp_4.13.patch @@ -0,0 +1,13 @@ +diff --git a/config/core/deployments/webhook-hpa.yaml b/config/core/deployments/webhook-hpa.yaml +index 007f98d04..04d5fbfe3 100644 +--- a/config/core/deployments/webhook-hpa.yaml ++++ b/config/core/deployments/webhook-hpa.yaml +@@ -12,7 +12,7 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + +-apiVersion: autoscaling/v2 ++apiVersion: autoscaling/v2beta2 + kind: HorizontalPodAutoscaler + metadata: + name: eventing-webhook diff --git a/openshift/patches/remove_seccompProfile.patch b/openshift/patches/remove_seccompProfile.patch new file mode 100644 index 00000000000..6f327b833e3 --- /dev/null +++ b/openshift/patches/remove_seccompProfile.patch @@ -0,0 +1,166 @@ +diff --git a/config/brokers/mt-channel-broker/deployments/broker-filter.yaml b/config/brokers/mt-channel-broker/deployments/broker-filter.yaml +index 924c132fd..49d53ab9e 100644 +--- a/config/brokers/mt-channel-broker/deployments/broker-filter.yaml ++++ b/config/brokers/mt-channel-broker/deployments/broker-filter.yaml +@@ -97,8 +97,6 @@ spec: + capabilities: + drop: + - ALL +- seccompProfile: +- type: RuntimeDefault + + --- + +diff --git a/config/brokers/mt-channel-broker/deployments/broker-ingress.yaml b/config/brokers/mt-channel-broker/deployments/broker-ingress.yaml +index d8f5ab9a2..7099f5689 100644 +--- a/config/brokers/mt-channel-broker/deployments/broker-ingress.yaml ++++ b/config/brokers/mt-channel-broker/deployments/broker-ingress.yaml +@@ -97,8 +97,6 @@ spec: + capabilities: + drop: + - ALL +- seccompProfile: +- type: RuntimeDefault + + --- + +diff --git a/config/brokers/mt-channel-broker/deployments/controller.yaml b/config/brokers/mt-channel-broker/deployments/controller.yaml +index d4e853b7c..a0eb8583b 100644 +--- a/config/brokers/mt-channel-broker/deployments/controller.yaml ++++ b/config/brokers/mt-channel-broker/deployments/controller.yaml +@@ -81,8 +81,6 @@ spec: + capabilities: + drop: + - ALL +- seccompProfile: +- type: RuntimeDefault + + ports: + - name: metrics +diff --git a/config/channels/in-memory-channel/deployments/controller.yaml b/config/channels/in-memory-channel/deployments/controller.yaml +index 42ef5e957..17ed17d7f 100644 +--- a/config/channels/in-memory-channel/deployments/controller.yaml ++++ b/config/channels/in-memory-channel/deployments/controller.yaml +@@ -78,8 +78,6 @@ spec: + capabilities: + drop: + - ALL +- seccompProfile: +- type: RuntimeDefault + + ports: + - name: metrics +diff --git a/config/channels/in-memory-channel/deployments/dispatcher.yaml b/config/channels/in-memory-channel/deployments/dispatcher.yaml +index fc88c6697..240d2b662 100644 +--- a/config/channels/in-memory-channel/deployments/dispatcher.yaml ++++ b/config/channels/in-memory-channel/deployments/dispatcher.yaml +@@ -95,5 +95,3 @@ spec: + capabilities: + drop: + - ALL +- seccompProfile: +- type: RuntimeDefault +diff --git a/config/core/deployments/controller.yaml b/config/core/deployments/controller.yaml +index d1a38ea62..ddf1259c6 100644 +--- a/config/core/deployments/controller.yaml ++++ b/config/core/deployments/controller.yaml +@@ -97,8 +97,6 @@ spec: + capabilities: + drop: + - ALL +- seccompProfile: +- type: RuntimeDefault + + livenessProbe: + httpGet: +diff --git a/config/core/deployments/pingsource-mt-adapter.yaml b/config/core/deployments/pingsource-mt-adapter.yaml +index c48b4ad21..ccf1af351 100644 +--- a/config/core/deployments/pingsource-mt-adapter.yaml ++++ b/config/core/deployments/pingsource-mt-adapter.yaml +@@ -99,7 +99,5 @@ spec: + capabilities: + drop: + - ALL +- seccompProfile: +- type: RuntimeDefault + + serviceAccountName: pingsource-mt-adapter +diff --git a/config/core/deployments/webhook.yaml b/config/core/deployments/webhook.yaml +index 2ba3c1190..1995a25c3 100644 +--- a/config/core/deployments/webhook.yaml ++++ b/config/core/deployments/webhook.yaml +@@ -101,8 +101,6 @@ spec: + capabilities: + drop: + - ALL +- seccompProfile: +- type: RuntimeDefault + + ports: + - name: https-webhook +diff --git a/config/post-install/storage-version-migrator.yaml b/config/post-install/storage-version-migrator.yaml +index c2d6d836f..8fcc812e7 100644 +--- a/config/post-install/storage-version-migrator.yaml ++++ b/config/post-install/storage-version-migrator.yaml +@@ -62,5 +62,3 @@ spec: + capabilities: + drop: + - ALL +- seccompProfile: +- type: RuntimeDefault +diff --git a/config/tools/appender/appender.yaml b/config/tools/appender/appender.yaml +index 169405198..63e9db6fc 100644 +--- a/config/tools/appender/appender.yaml ++++ b/config/tools/appender/appender.yaml +@@ -35,5 +35,3 @@ spec: + capabilities: + drop: + - ALL +- seccompProfile: +- type: RuntimeDefault +diff --git a/config/tools/event-display/event-display.yaml b/config/tools/event-display/event-display.yaml +index 57538dcc9..fc824255e 100644 +--- a/config/tools/event-display/event-display.yaml ++++ b/config/tools/event-display/event-display.yaml +@@ -32,5 +32,3 @@ spec: + capabilities: + drop: + - ALL +- seccompProfile: +- type: RuntimeDefault +diff --git a/config/tools/heartbeats/heartbeats.yaml b/config/tools/heartbeats/heartbeats.yaml +index c0753a3c8..1c0ba857e 100644 +--- a/config/tools/heartbeats/heartbeats.yaml ++++ b/config/tools/heartbeats/heartbeats.yaml +@@ -34,8 +34,6 @@ spec: + capabilities: + drop: + - ALL +- seccompProfile: +- type: RuntimeDefault + + sink: + ref: +diff --git a/config/tools/recordevents/recordevents.yaml b/config/tools/recordevents/recordevents.yaml +index 3661a16c8..23371182d 100644 +--- a/config/tools/recordevents/recordevents.yaml ++++ b/config/tools/recordevents/recordevents.yaml +@@ -44,5 +44,3 @@ spec: + capabilities: + drop: + - ALL +- seccompProfile: +- type: RuntimeDefault +diff --git a/config/tools/websocket-source/websocket-source.yaml b/config/tools/websocket-source/websocket-source.yaml +index 844c39845..1a590f667 100644 +--- a/config/tools/websocket-source/websocket-source.yaml ++++ b/config/tools/websocket-source/websocket-source.yaml +@@ -30,8 +30,6 @@ spec: + capabilities: + drop: + - ALL +- seccompProfile: +- type: RuntimeDefault + + sink: + ref: From ecee693a8aa1a0b78fa28916e7b1f140eb296b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20St=C3=A4bler?= Date: Fri, 23 Dec 2022 10:28:21 +0100 Subject: [PATCH 2/2] Apply HPA and SeccompProfile patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christoph Stäbler --- .../mt-channel-broker/deployments/broker-filter.yaml | 2 -- .../mt-channel-broker/deployments/broker-ingress.yaml | 2 -- .../brokers/mt-channel-broker/deployments/controller.yaml | 2 -- .../in-memory-channel/deployments/controller.yaml | 2 -- .../in-memory-channel/deployments/dispatcher.yaml | 2 -- config/core/deployments/controller.yaml | 2 -- config/core/deployments/pingsource-mt-adapter.yaml | 2 -- config/core/deployments/webhook-hpa.yaml | 2 +- config/core/deployments/webhook.yaml | 2 -- config/post-install/storage-version-migrator.yaml | 2 -- config/tools/appender/appender.yaml | 2 -- config/tools/event-display/event-display.yaml | 2 -- config/tools/heartbeats/heartbeats.yaml | 2 -- config/tools/recordevents/recordevents.yaml | 2 -- config/tools/websocket-source/websocket-source.yaml | 2 -- openshift/release/artifacts/eventing-core.yaml | 8 +------- openshift/release/artifacts/eventing-post-install.yaml | 2 -- openshift/release/artifacts/in-memory-channel.yaml | 4 ---- openshift/release/artifacts/mt-channel-broker.yaml | 6 ------ 19 files changed, 2 insertions(+), 48 deletions(-) diff --git a/config/brokers/mt-channel-broker/deployments/broker-filter.yaml b/config/brokers/mt-channel-broker/deployments/broker-filter.yaml index 924c132fd67..49d53ab9e3b 100644 --- a/config/brokers/mt-channel-broker/deployments/broker-filter.yaml +++ b/config/brokers/mt-channel-broker/deployments/broker-filter.yaml @@ -97,8 +97,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault --- diff --git a/config/brokers/mt-channel-broker/deployments/broker-ingress.yaml b/config/brokers/mt-channel-broker/deployments/broker-ingress.yaml index d8f5ab9a27b..7099f568976 100644 --- a/config/brokers/mt-channel-broker/deployments/broker-ingress.yaml +++ b/config/brokers/mt-channel-broker/deployments/broker-ingress.yaml @@ -97,8 +97,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault --- diff --git a/config/brokers/mt-channel-broker/deployments/controller.yaml b/config/brokers/mt-channel-broker/deployments/controller.yaml index d4e853b7cde..a0eb8583bd8 100644 --- a/config/brokers/mt-channel-broker/deployments/controller.yaml +++ b/config/brokers/mt-channel-broker/deployments/controller.yaml @@ -81,8 +81,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault ports: - name: metrics diff --git a/config/channels/in-memory-channel/deployments/controller.yaml b/config/channels/in-memory-channel/deployments/controller.yaml index 42ef5e9576c..17ed17d7ff6 100644 --- a/config/channels/in-memory-channel/deployments/controller.yaml +++ b/config/channels/in-memory-channel/deployments/controller.yaml @@ -78,8 +78,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault ports: - name: metrics diff --git a/config/channels/in-memory-channel/deployments/dispatcher.yaml b/config/channels/in-memory-channel/deployments/dispatcher.yaml index fc88c66979d..240d2b662b2 100644 --- a/config/channels/in-memory-channel/deployments/dispatcher.yaml +++ b/config/channels/in-memory-channel/deployments/dispatcher.yaml @@ -95,5 +95,3 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault diff --git a/config/core/deployments/controller.yaml b/config/core/deployments/controller.yaml index d1a38ea62f8..ddf1259c6fd 100644 --- a/config/core/deployments/controller.yaml +++ b/config/core/deployments/controller.yaml @@ -97,8 +97,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault livenessProbe: httpGet: diff --git a/config/core/deployments/pingsource-mt-adapter.yaml b/config/core/deployments/pingsource-mt-adapter.yaml index c48b4ad2133..ccf1af3511e 100644 --- a/config/core/deployments/pingsource-mt-adapter.yaml +++ b/config/core/deployments/pingsource-mt-adapter.yaml @@ -99,7 +99,5 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault serviceAccountName: pingsource-mt-adapter diff --git a/config/core/deployments/webhook-hpa.yaml b/config/core/deployments/webhook-hpa.yaml index d08c1ebeb29..7483fd8808a 100644 --- a/config/core/deployments/webhook-hpa.yaml +++ b/config/core/deployments/webhook-hpa.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: autoscaling/v2 +apiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata: name: eventing-webhook diff --git a/config/core/deployments/webhook.yaml b/config/core/deployments/webhook.yaml index 2ba3c11902a..1995a25c325 100644 --- a/config/core/deployments/webhook.yaml +++ b/config/core/deployments/webhook.yaml @@ -101,8 +101,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault ports: - name: https-webhook diff --git a/config/post-install/storage-version-migrator.yaml b/config/post-install/storage-version-migrator.yaml index c2d6d836fe4..8fcc812e72e 100644 --- a/config/post-install/storage-version-migrator.yaml +++ b/config/post-install/storage-version-migrator.yaml @@ -62,5 +62,3 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault diff --git a/config/tools/appender/appender.yaml b/config/tools/appender/appender.yaml index 169405198ed..63e9db6fce1 100644 --- a/config/tools/appender/appender.yaml +++ b/config/tools/appender/appender.yaml @@ -35,5 +35,3 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault diff --git a/config/tools/event-display/event-display.yaml b/config/tools/event-display/event-display.yaml index 57538dcc9ff..fc824255ed4 100644 --- a/config/tools/event-display/event-display.yaml +++ b/config/tools/event-display/event-display.yaml @@ -32,5 +32,3 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault diff --git a/config/tools/heartbeats/heartbeats.yaml b/config/tools/heartbeats/heartbeats.yaml index c0753a3c83b..1c0ba857ee4 100644 --- a/config/tools/heartbeats/heartbeats.yaml +++ b/config/tools/heartbeats/heartbeats.yaml @@ -34,8 +34,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault sink: ref: diff --git a/config/tools/recordevents/recordevents.yaml b/config/tools/recordevents/recordevents.yaml index 3661a16c8bc..23371182d71 100644 --- a/config/tools/recordevents/recordevents.yaml +++ b/config/tools/recordevents/recordevents.yaml @@ -44,5 +44,3 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault diff --git a/config/tools/websocket-source/websocket-source.yaml b/config/tools/websocket-source/websocket-source.yaml index 844c39845ce..1a590f66756 100644 --- a/config/tools/websocket-source/websocket-source.yaml +++ b/config/tools/websocket-source/websocket-source.yaml @@ -30,8 +30,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault sink: ref: diff --git a/openshift/release/artifacts/eventing-core.yaml b/openshift/release/artifacts/eventing-core.yaml index 6c990659049..455c7540c44 100644 --- a/openshift/release/artifacts/eventing-core.yaml +++ b/openshift/release/artifacts/eventing-core.yaml @@ -4089,8 +4089,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault livenessProbe: httpGet: @@ -4218,8 +4216,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault serviceAccountName: pingsource-mt-adapter --- @@ -4487,8 +4483,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault ports: - name: https-webhook @@ -4796,7 +4790,7 @@ data: # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: autoscaling/v2 +apiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata: name: eventing-webhook diff --git a/openshift/release/artifacts/eventing-post-install.yaml b/openshift/release/artifacts/eventing-post-install.yaml index 219c2b17af9..cc42802b61a 100644 --- a/openshift/release/artifacts/eventing-post-install.yaml +++ b/openshift/release/artifacts/eventing-post-install.yaml @@ -225,5 +225,3 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault diff --git a/openshift/release/artifacts/in-memory-channel.yaml b/openshift/release/artifacts/in-memory-channel.yaml index 420e7f182ce..ce34b6c0b96 100644 --- a/openshift/release/artifacts/in-memory-channel.yaml +++ b/openshift/release/artifacts/in-memory-channel.yaml @@ -224,8 +224,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault ports: - name: metrics @@ -413,8 +411,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault --- # Copyright 2019 The Knative Authors # diff --git a/openshift/release/artifacts/mt-channel-broker.yaml b/openshift/release/artifacts/mt-channel-broker.yaml index 53a789a8d69..911dda6609f 100644 --- a/openshift/release/artifacts/mt-channel-broker.yaml +++ b/openshift/release/artifacts/mt-channel-broker.yaml @@ -358,8 +358,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault --- @@ -486,8 +484,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault --- @@ -598,8 +594,6 @@ spec: capabilities: drop: - ALL - seccompProfile: - type: RuntimeDefault ports: - name: metrics