forked from knative/eventing
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release-v1.13] Ocp bundle injection apiserversoure 1.13 (#557)
* Adding support for creating CA trustbundle in user namespace, and mounting it on the deployment of the apiserversource (#441) Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Align mounth path for OCP cert inject towards the other workloads in Serverless Operator 1.32 (#506) Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> --------- Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
- Loading branch information
Showing
4 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
pkg/reconciler/apiserversource/resources/cabundle_configmap.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package resources | ||
|
||
import ( | ||
corev1 "k8s.io/api/core/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"knative.dev/pkg/kmeta" | ||
) | ||
|
||
const ( | ||
// user-provided and system CA certificates | ||
TrustedCAConfigMapName = "config-openshift-trusted-cabundle" | ||
TrustedCAConfigMapVolume = TrustedCAConfigMapName + "-volume" | ||
TrustedCAKey = "ca-bundle.crt" | ||
) | ||
|
||
func MakeTrustedCABundleConfigMap(args *ReceiveAdapterArgs) *corev1.ConfigMap { | ||
return &corev1.ConfigMap{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: TrustedCAConfigMapName, | ||
Namespace: args.Source.Namespace, | ||
Labels: map[string]string{ | ||
"app.kubernetes.io/name": "knative-eventing", | ||
// user-provided and system CA certificates | ||
"config.openshift.io/inject-trusted-cabundle": "true", | ||
}, | ||
OwnerReferences: []metav1.OwnerReference{ | ||
*kmeta.NewControllerRef(args.Source), | ||
}, | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters