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

Services created by wasmcloud-operator Are Non-Functional #108

Open
albertoec opened this issue Dec 17, 2024 · 0 comments
Open

Services created by wasmcloud-operator Are Non-Functional #108

albertoec opened this issue Dec 17, 2024 · 0 comments

Comments

@albertoec
Copy link

I have been experimenting with the wasmcloud-operator as described in the official documentation, and I have encountered unexpected behavior regarding the ports defined in the "Application" CR.

The wasmCloud documentation claims the operator provides Kubernetes services integration, specifically "automatically creating services for wasmCloud applications deployed with an HTTP Server capability (in the future, this will become configurable)." In reality, this functionality appears to be partially broken:

Issues Identified

  1. Service Object Missing a Selector:
    The operator creates the Service object but doesn’t assign a selector to the wasmcloud-host pod. Even if you manually add the selector, the Service still doesn’t work.

  2. Immutable Pod Ports:
    The issue seems to stem from the fact that the list of ports in a pod is immutable. This makes it impossible to update the ports on the wasmcloud-host pod dynamically when new applications are deployed.

Current Limitations

Given the current behavior, I’ve been considering ways to make Kubernetes Services work properly for wasmCloud applications. Here are two potential solutions, though there are likely others:

  1. Modify the Deployment During Application Requests:

    • When a client requests a new application, the operator would need to:
      • Edit the wasmcloud-host deployment to include the new port.
      • Create a Service with a selector pointing to the updated pod.
    • Downside: This triggers a pod rollout, which may disrupt active connections.
  2. Predefine a Range of Ports at Host Instantiation:

    • At the time of creating the wasmcloud-host, predefine a range of ports that will be available for application workloads.
    • When a new application is deployed, the operator dynamically creates a Service with a selector pointing to the corresponding pod.
    • To enforce this, a Validating Admission Webhook can be used to ensure that the application's port definition falls within the predefined range.
@albertoec albertoec changed the title Services Created by wasmcloud-operator Are Non-Functional Services created by wasmcloud-operator Are Non-Functional Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant