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

[dev] Include expose settings in show application output #12005

Conversation

achilleasa
Copy link
Contributor

Description of change

This PR updates the juju show application command so that it includes information about exposed endpoints.

QA steps

# Deploy the following bundle:
$ cat bundle.yaml
series: bionic
applications:
  apache2:
    charm: cs:apache2-35
    num_units: 1
    to:
    - "0"
machines:
  "0": {}
--- # overlay.yaml
applications:
  apache2:
    exposed-endpoints:
      "":
        expose-to-cidrs:
        - 0.0.0.0/0
      website:
        expose-to-cidrs:
        - 10.0.0.0/24

$ juju deploy ./bundle.yaml
$ juju show-application apache2
apache2:
  charm: apache2
  series: bionic
  principal: true
  exposed: true
  exposed-endpoints:
    "":
      expose-to-cidrs:
      - 0.0.0.0/0
    website:
      expose-to-spaces:
      - alpha
      expose-to-cidrs:
      - 10.0.0.0/24
  remote: false
  endpoint-bindings:
    "": alpha
    apache-website: alpha
    balancer: alpha
    local-monitors: alpha
    logging: alpha
    logs: alpha
    nrpe-external-master: alpha
    reverseproxy: alpha
    vhost-config: alpha
    website: alpha
    website-cache: alpha

$ juju show-application apache2 --format json | jq .
{
  "apache2": {
    "charm": "apache2",
    "series": "bionic",
    "constraints": {},
    "principal": true,
    "exposed": true,
    "exposed-endpoints": {
      "": {
        "expose-to-cidrs": [
          "0.0.0.0/0"
        ]
      },
      "website": {
        "expose-to-spaces": [
          "alpha"
        ],
        "expose-to-cidrs": [
          "10.0.0.0/24"
        ]
      }
    },
    "remote": false,
    "endpoint-bindings": {
      "": "alpha",
      "apache-website": "alpha",
      "balancer": "alpha",
      "local-monitors": "alpha",
      "logging": "alpha",
      "logs": "alpha",
      "nrpe-external-master": "alpha",
      "reverseproxy": "alpha",
      "vhost-config": "alpha",
      "website": "alpha",
      "website-cache": "alpha"
    }
  }
}

The application facade version has already been bumped as part of recent
2.9-related changes so no further bump is required.
@achilleasa achilleasa force-pushed the dev-show-expose-settings-in-show-application-output branch from e3b0032 to 63f00d9 Compare September 16, 2020 16:08
@achilleasa
Copy link
Contributor Author

$$merge$$

@jujubot jujubot merged commit cb726d6 into juju:develop Sep 17, 2020
@achilleasa achilleasa deleted the dev-show-expose-settings-in-show-application-output branch September 17, 2020 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants