mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-28 22:08:34 +00:00
🚀 Change Hub's and Front's resource type from Pod
to Deployment
(#1412)
* change services to ClusterIP and update selector labels Signed-off-by: Luiz Oliveira <ziuloliveira@gmail.com> * replace kind of hub and front to Deployments Pod -> Deployments hub config -> Uses a config-map license -> Ises a secret Signed-off-by: Luiz Oliveira <ziuloliveira@gmail.com> * uses map of labels to select pods and services Signed-off-by: Luiz Oliveira <ziuloliveira@gmail.com> * remove ListAllNamespaces method Signed-off-by: Luiz Oliveira <ziuloliveira@gmail.com> * include livenessProbe and readinessProbe for deployments Signed-off-by: Luiz Oliveira <ziuloliveira@gmail.com> --------- Signed-off-by: Luiz Oliveira <ziuloliveira@gmail.com>
This commit is contained in:
@@ -24,6 +24,7 @@ const selfServicePort = 80
|
||||
|
||||
func StartProxy(kubernetesProvider *Provider, proxyHost string, srcPort uint16, selfNamespace string, selfServiceName string) (*http.Server, error) {
|
||||
log.Info().
|
||||
Str("proxy-host", proxyHost).
|
||||
Str("namespace", selfNamespace).
|
||||
Str("service", selfServiceName).
|
||||
Int("src-port", int(srcPort)).
|
||||
@@ -101,7 +102,7 @@ func getRerouteHttpHandlerSelfStatic(proxyHandler http.Handler, selfNamespace st
|
||||
}
|
||||
|
||||
func NewPortForward(kubernetesProvider *Provider, namespace string, podRegex *regexp.Regexp, srcPort uint16, dstPort uint16, ctx context.Context) (*portforward.PortForwarder, error) {
|
||||
pods, err := kubernetesProvider.ListAllRunningPodsMatchingRegex(ctx, podRegex, []string{namespace})
|
||||
pods, err := kubernetesProvider.ListPodsByAppLabel(ctx, namespace, map[string]string{"app.kubeshark.co/app": "hub"})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if len(pods) == 0 {
|
||||
|
Reference in New Issue
Block a user