Skip to content

Commit

Permalink
Adding SSL env vars
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Wessendorf <[email protected]>
  • Loading branch information
matzew committed Oct 24, 2024
1 parent a811dc2 commit 4f8eb69
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pkg/reconciler/integrationsource/resources/containersource.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func NewContainerSource(source *v1alpha1.IntegrationSource) *sourcesv1.Container
}

func generateEnvVarsFromStruct(prefix string, s interface{}) []corev1.EnvVar {
var envVars []corev1.EnvVar
var envVars = makeSSLEnvVar()

// Use reflection to inspect the struct fields
v := reflect.ValueOf(s)
Expand Down Expand Up @@ -168,6 +168,19 @@ func makeEnv(source *v1alpha1.IntegrationSource) []corev1.EnvVar {
return envVars
}

func makeSSLEnvVar() []corev1.EnvVar {
return []corev1.EnvVar{
{
Name: "CAMEL_KNATIVE_CLIENT_SSL_ENABLED",
Value: "true",
},
{
Name: "CAMEL_KNATIVE_CLIENT_SSL_CERT_PATH",
Value: "/knative-custom-certs/knative-eventing-bundle.pem",
},
}
}

func selectImage(source *v1alpha1.IntegrationSource) string {
if source.Spec.Timer != nil {
return "quay.io/openshift-knative/timer-source:1.0-SNAPSHOT"
Expand Down

0 comments on commit 4f8eb69

Please sign in to comment.