Skip to content

Commit

Permalink
🪄 For Openshift, adding the magic cert injection and patch file for i…
Browse files Browse the repository at this point in the history
…t. This allows us to mount in custom ca bundles via ConfigMap/VolumeSource. (#437)

OCP documentation is here: https://docs.openshift.com/container-platform/4.14/networking/configuring-a-custom-pki.html#certificate-injection-using-operators_configuring-a-custom-pki

Signed-off-by: Matthias Wessendorf <[email protected]>
  • Loading branch information
matzew authored Nov 28, 2023
1 parent 0bca1b7 commit d8390aa
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
23 changes: 23 additions & 0 deletions config/openshift-trusted-cabundle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2020 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
kind: ConfigMap
metadata:
name: config-openshift-trusted-cabundle
namespace: knative-eventing
labels:
app.kubernetes.io/version: devel
app.kubernetes.io/name: knative-eventing
config.openshift.io/inject-trusted-cabundle: "true"
30 changes: 30 additions & 0 deletions openshift/patches/023-configmap-trusted-cabundle.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
diff --git a/config/openshift-trusted-cabundle.yaml b/config/openshift-trusted-cabundle.yaml
new file mode 100644
index 000000000..a4c1a5f73
--- /dev/null
+++ b/config/openshift-trusted-cabundle.yaml
@@ -0,0 +1,23 @@
+# Copyright 2020 The Knative Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: config-openshift-trusted-cabundle
+ namespace: knative-eventing
+ labels:
+ app.kubernetes.io/version: devel
+ app.kubernetes.io/name: knative-eventing
+ config.openshift.io/inject-trusted-cabundle: "true"
--
24 changes: 24 additions & 0 deletions openshift/release/artifacts/eventing-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5033,3 +5033,27 @@ roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: openshift-serverless-view-eventing-configmaps
---
# Copyright 2020 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
kind: ConfigMap
metadata:
name: config-openshift-trusted-cabundle
namespace: knative-eventing
labels:
app.kubernetes.io/version: v1.11
app.kubernetes.io/name: knative-eventing
config.openshift.io/inject-trusted-cabundle: "true"

0 comments on commit d8390aa

Please sign in to comment.