Review: Needs Fixing We should block if tls_secret_name isn't set.
Diff comments: > diff --git a/src/charm.py b/src/charm.py > index 46ad990..947dd6a 100755 > --- a/src/charm.py > +++ b/src/charm.py > @@ -156,6 +158,39 @@ class WordpressK8sCharm(CharmBase): > else: > logger.info("Spec changes ignored by non-leader") > > + def make_pod_resources(self): > + resources = { > + "kubernetesResources": { > + "ingressResources": [{ > + "name": self.app.name, > + "spec": { > + "rules": [{ > + "host": self.model.config["blog_hostname"], > + "http": { > + "paths": [{ > + "path": "/", > + "backend": { > + "serviceName": self.app.name, > + "servicePort": 80 > + } > + }] > + } > + }], > + "tls": [{ > + "hosts": [self.model.config["blog_hostname"]], > + "secretName": > self.model.config["tls_secret_name"], > + }], I think we'd want to block if tls_secret_name isn't set. > + } > + }] > + } > + } > + > + out = io.StringIO() > + pprint(resources, out) > + logger.info("This is the Kubernetes Pod resources > <<EOM\n{}\nEOM".format(out.getvalue())) > + > + return resources > + > def make_pod_spec(self): > config = self.model.config > full_pod_config = generate_pod_config(config, secured=False) -- https://code.launchpad.net/~tcuthbert/charm-k8s-wordpress/+git/charm-k8s-wordpress/+merge/384611 Your team Wordpress Charmers is subscribed to branch charm-k8s-wordpress:master. -- Mailing list: https://launchpad.net/~wordpress-charmers Post to : wordpress-charmers@lists.launchpad.net Unsubscribe : https://launchpad.net/~wordpress-charmers More help : https://help.launchpad.net/ListHelp