Skip to content

Commit

Permalink
adding a bit of https port for deployment/service of the IntegrationSink
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Wessendorf <[email protected]>
  • Loading branch information
matzew committed Dec 13, 2024
1 parent 8f0b74d commit 3dd433f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 11 deletions.
24 changes: 18 additions & 6 deletions pkg/reconciler/integration/sink/integrationsink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ func TestReconcile(t *testing.T) {
serviceLister: listers.GetServiceLister(),
secretLister: listers.GetSecretLister(),
eventPolicyLister: listers.GetEventPolicyLister(),
systemNamespace: testNS,
}

return integrationsink.NewReconciler(ctx, logging.FromContext(ctx), fakeeventingclient.Get(ctx), listers.GetIntegrationSinkLister(), controller.GetEventRecorder(ctx), r)
Expand Down Expand Up @@ -205,11 +204,18 @@ func makeDeployment(sink *sinksv1alpha1.IntegrationSink, ready *corev1.Condition
Name: "sink",
Image: "gcr.io/knative-nightly/log-sink:latest",
ImagePullPolicy: corev1.PullIfNotPresent,
Ports: []corev1.ContainerPort{{
ContainerPort: 8080,
Protocol: corev1.ProtocolTCP,
Name: "http",
}},
Ports: []corev1.ContainerPort{
{
ContainerPort: 8080,
Protocol: corev1.ProtocolTCP,
Name: "http",
},
{
ContainerPort: 8443,
Protocol: corev1.ProtocolTCP,
Name: "https",
},
},
Env: []corev1.EnvVar{
{
Name: "CAMEL_KAMELET_LOG_SINK_LEVEL",
Expand Down Expand Up @@ -295,6 +301,12 @@ func makeService(name, namespace string) *corev1.Service {
Port: 80,
TargetPort: intstr.IntOrString{IntVal: 8080},
},
{
Name: "https",
Protocol: corev1.ProtocolTCP,
Port: 443,
TargetPort: intstr.IntOrString{IntVal: 8443},
},
},
Selector: integration.Labels(sinkName),
},
Expand Down
22 changes: 17 additions & 5 deletions pkg/reconciler/integration/sink/resources/container_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,17 @@ func MakeDeploymentSpec(sink *v1alpha1.IntegrationSink) *appsv1.Deployment {
Name: "sink",
Image: selectImage(sink),
ImagePullPolicy: corev1.PullIfNotPresent,
Ports: []corev1.ContainerPort{{
ContainerPort: 8080,
Protocol: corev1.ProtocolTCP,
Name: "http",
}},
Ports: []corev1.ContainerPort{
{
ContainerPort: 8080,
Protocol: corev1.ProtocolTCP,
Name: "http",
},
{
ContainerPort: 8443,
Protocol: corev1.ProtocolTCP,
Name: "https",
}},
Env: makeEnv(sink),
},
},
Expand Down Expand Up @@ -102,6 +108,12 @@ func MakeService(sink *v1alpha1.IntegrationSink) *corev1.Service {
Port: 80,
TargetPort: intstr.IntOrString{IntVal: 8080},
},
{
Name: "https",
Protocol: corev1.ProtocolTCP,
Port: 443,
TargetPort: intstr.IntOrString{IntVal: 443},
},
},
},
}
Expand Down

0 comments on commit 3dd433f

Please sign in to comment.