-
Notifications
You must be signed in to change notification settings - Fork 10
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
Missing open ports in COS charms when running juju status #43
Comments
@rbarry82 can probably explain the ins and outs of this. BTW, K8s itself does list the ports, for example alertmanager: _ports = SimpleNamespace(api=9093, ha=9094)
# ...
self.service_patcher = KubernetesServicePatch(
self,
[
(f"{self.app.name}", self._ports.api, self._ports.api),
(f"{self.app.name}-ha", self._ports.ha, self._ports.ha),
],
)
|
I know this does not solve your issue, but I still have some comments that I think are worthwhile to post.
Traefik can be used in tandem with any other ingress controller on the deployed MicroK8s. It is, right now, the only ingress controller that fully supports the functionality needed by COS Lite.
I would not recommend this topology for anything production or production-like. I totally get why this is tempting to keep the amount of moving parts as low as possible, but for COS Lite - or any observability solution really - to interfere as little as possible with your workloads, and more importantly: vice versa, we recommend you to always deploy it on an isolated MicroK8s cluster. |
@sed-i Thank you that is good information to manually create the ingress resources. Still, I am guessing Juju is be ignoring this information when running |
@simskij I started deploying Traefik just like the full bundle renders. However, I got Traefik charm stuck on waiting status with a message like "not obtaining a gateway ip". I assumed it was a conflict with the existing ingress controller from Microk8s ingress addon and did not dig much into it. If Traefik can co-exist with this plugin then that might be another issue I have to take a look back. |
Yeah that error message might not be the best tbh. What it means is thay you lack a source of external IPs, like MetalLB |
@simskij Thank you this is valuable information to take into account for other deployments. I did not considered it for two reasons. One is that I have a really small deployment intended for demo purposes. And the other reason is I tried using COS to monitor some VM charmed workloads and hit into this caveat, which seems I would need to either use just one juju controller for the whole deployment or do some extra configuration when bootstraping the N controllers so that they can discover the pods network direction. |
Traefik can definitely exist with the other ingress controller, assuming that your load balancer has more than one IP in the pool (since nginx will otherwise bind to 80/443, and Traefik won't be able to). I've never really checked into whether One controller for the whole deployment works, as long as that controller is publicly routable. The other configuration actually isn't about the pod's network direction, and more due to Juju not "knowing" what external address it should use for the controller, ala What is the actual "error" from the controller when you try to consume? |
This is currently blocked pending a native way of opening ports using Juju/OF. |
This could nominally be tested on a current version of Juju by using |
@benhoyt - do you have any suggestion as to how we could accomplish this for sidecar charms? |
@simskij Yes, now that canonical/operator#905 is merged (and included in ops 2.1.0+) you should be able to use |
There are some related juju issues still open: We should use open_port, but it may still not be visible in juju status. |
Bug Description
To Reproduce
On a Microk8s cloud
Environment
Cloud: Microk8s v1.25/stable (Remote)
Juju: 2.9.34 (Client and Controller)
COS bundle:
./microk8s/lma/lma_servers.yaml
Relevant log output
Additional context
I did not use Traefik as a ingress controller in this Microk8s deployment since I wanted to expose other k8s charm services deployed on the same Microk8s which do not have the ingress relation implemented (apps model: redis-k8s, mattermost-k8s, discourse-k8s, wordpress-k8s).
When running
juju config <app> juju-external-hostname=<>; juju expose <app>
for any charm in apps model I would get the ingress resource created on Microk8s when using ingress addon (kubectl get ingress --all-namespaces
).However when doing the same for COS charms no ingress resource would get created.
I would think that showing open ports for COS charms would allow to be able to expose its services with Microk8s ingress addon just like the k8s charms I have on the apps model.
The text was updated successfully, but these errors were encountered: