Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Target Cluster IP #77

Open
hufhend opened this issue Apr 24, 2024 · 7 comments
Open

[REQUEST] Target Cluster IP #77

hufhend opened this issue Apr 24, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@hufhend
Copy link

hufhend commented Apr 24, 2024

Is your feature request related to a problem? Please describe.
I'm not sure I'm doing anything wrong. When I deploy onionbalancedservices together with Ghost, for example, it works.
But if I redeploy Ghost, it changes its internal IP address including the service and onion (Target Cluster IP) points to a blank space.

Describe the solution you'd like
Couldn't it be modified to refer to a name that will be different but the same?

Describe alternatives you've considered
Deleting and re-creating the OnionService helps

Additional context

Namespace:    ghost
Labels:       app.kubernetes.io/instance=tor-apps
Annotations:  <none>
API Version:  tor.k8s.torproject.org/v1alpha2
Kind:         OnionBalancedService
[...]
Status:
  Backends:
    ghost-onion-service-tor-obb-1:
      Hostname:           ***.onion
      Target Cluster IP:  10.233.38.53
    ghost-onion-service-tor-obb-2:
      Hostname:           ***.onion
      Target Cluster IP:  10.233.1.13
  Hostname:               ***.onion

  Target Cluster IP:  10.233.37.155
Events:               <none>
@hufhend hufhend added the enhancement New feature or request label Apr 24, 2024
@hufhend hufhend changed the title [REQUEST] title [REQUEST] Target Cluster IP Apr 25, 2024
@bugfest
Copy link
Owner

bugfest commented Apr 28, 2024

Hi @hufhend, does your onion service stop working when you update your backend (ghost)?

@hufhend
Copy link
Author

hufhend commented Apr 28, 2024

Yes it is, when updating, but also when forced to move to another node.
I think it is related to the change of the internal IP address.

@bugfest
Copy link
Owner

bugfest commented May 5, 2024

Can you share your complete onionbalancedservice manifest?

@hufhend
Copy link
Author

hufhend commented May 6, 2024

Yes, I'm posting here, just starring the hostname:

apiVersion: v1
items:
- apiVersion: tor.k8s.torproject.org/v1alpha2
  kind: OnionBalancedService
  metadata:
    annotations:
      kubectl.kubernetes.io/last-applied-configuration: |
        {"apiVersion":"tor.k8s.torproject.org/v1alpha2","kind":"OnionBalancedService","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"tor-apps"},"name":"ghost-onion-service","namespace":"tor-controller"},"spec":{"backends":2,"privateKeySecret":{"name":"my-full-onion-secret"},"template":{"spec":{"extraConfig":"HiddenServiceEnableIntroDoSDefense 1\n","rules":[{"backend":{"service":{"name":"ghost-tor","port":{"number":80}}},"port":{"number":80}}],"version":3}}}}
    creationTimestamp: "2024-04-28T20:20:06Z"
    generation: 1
    labels:
      app.kubernetes.io/instance: tor-apps
    name: ghost-onion-service
    namespace: tor-controller
    resourceVersion: "78844440"
    uid: 78a78746-971e-4830-b4f5-526f42af5bd0
  spec:
    backends: 2
    privateKeySecret:
      name: my-full-onion-secret
    serviceMonitor: false
    template:
      spec:
        extraConfig: |
          HiddenServiceEnableIntroDoSDefense 1
        rules:
        - backend:
            service:
              name: ghost-tor
              port:
                number: 80
          port:
            number: 80
        serviceMonitor: false
        version: 3
    version: 3
  status:
    backends:
      ghost-onion-service-tor-obb-1:
        hostname: *****.onion
        targetClusterIP: 10.233.18.234
      ghost-onion-service-tor-obb-2:
        hostname: *****.onion
        targetClusterIP: 10.233.7.186
    hostname: |
      *****.onion
    targetClusterIP: 10.233.57.78
kind: List
metadata:
  resourceVersion: ""

I was wondering, could the fact that I'm deploying it via ArgoCD affect the functionality?

@bugfest
Copy link
Owner

bugfest commented May 6, 2024

I don't think Argo does has anything to do with your issue. As per your config, the Tor instance should be resolving the service ghost-tor and then exposing that port (tcp/80) over the Tor network as hidden service. The targetClusterIPs are the Onion Balancer instance's. Do the same happen when using a simple Onion Service (not the onion balanced one)?

@hufhend
Copy link
Author

hufhend commented May 6, 2024

I understand. I confess I don't know. I'll edit it and try it. I just noticed that here as targetClusterIP, the value is correct after ghost (or wordpress) starts if it starts all together.
On a new deployment it stays the same and points to nothing.

@hufhend
Copy link
Author

hufhend commented May 12, 2024

Tried and tested. Yes, this happens even when using the simple Onion Service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants