Can't set up CaaS charm with no ports

Bug #1838664 reported by Kenneth Koski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Yang Kelvin Liu

Bug Description

I am trying to write a charm that doesn't require having any ports open, and I'm required to add a dummy port, otherwise I get this error:

    creating or updating service for foo: Service "foo" is invalid: spec.ports: Required value

I don't need a Service resource created for this charm, since there's no open ports anyways. Would it be possible to just not set up the Service if no ports are defined?

Revision history for this message
Ian Booth (wallyworld) wrote :

It's already possible to not create the k8s service by adding this to your podspec yaml:

omitServiceFrontend: true

Can you see if this works for you?

Revision history for this message
Kenneth Koski (knkski) wrote :

Thanks for the response, and that was close to working, though now I get this error:

    kubernetes service is required when using storage

This is despite the charm not using storage as defined in the `storage:` key in `metadata.yaml`, though it is making files available to the pod via the `files: {...}` section of `pod_spec_set`.

Revision history for this message
Richard Harding (rharding) wrote : Re: [Bug 1838664] Re: Can't set up CaaS charm with no ports

This sounds like it might be another case where if you set a port we'd flip
this to false and otherwise default to this as true vs asking the user to
tie together the different config items correctly,.

On Thu, Aug 1, 2019 at 5:31 PM Ian Booth <email address hidden> wrote:

> It's already possible to not create the k8s service by adding this to
> your podspec yaml:
>
> omitServiceFrontend: true
>
> Can you see if this works for you?
>
> --
> You received this bug notification because you are subscribed to juju.
> https://bugs.launchpad.net/bugs/1838664
>
> Title:
> Can't set up CaaS charm with no ports
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1838664/+subscriptions
>

Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.6.7
status: New → Triaged
importance: Undecided → High
Changed in juju:
assignee: nobody → Yang Kelvin Liu (kelvin.liu)
status: Triaged → In Progress
Revision history for this message
Yang Kelvin Liu (kelvin.liu) wrote :

https://github.com/juju/juju/pull/10483 is merging to 2.6.7 and develop to fix this

Revision history for this message
Yang Kelvin Liu (kelvin.liu) wrote :

https://github.com/juju/juju/pull/10489 is merging to 2.6 and will be released in 2.6.7

Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
milestone: 2.6.7 → 2.6.8
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.