type: string
description: Ingress URL
default: ""
+ cluster_issuer:
+ type: string
+ description: Name of the cluster issuer for TLS certificates
+ default: ""
osm_dashboards:
type: boolean
description: Enable OSM System monitoring dashboards
max_file_size: int
osm_dashboards: bool
site_url: Optional[str]
+ cluster_issuer: Optional[str]
ingress_whitelist_source_range: Optional[str]
tls_secret_name: Optional[str]
"nginx.ingress.kubernetes.io/whitelist-source-range"
] = config.ingress_whitelist_source_range
+ if config.cluster_issuer:
+ annotations["cert-manager.io/cluster-issuer"] = config.cluster_issuer
+
if parsed.scheme == "https":
ingress_resource_builder.add_tls(
[parsed.hostname], config.tls_secret_name
"ingress_whitelist_source_range": "",
"tls_secret_name": "",
"site_url": "https://grafana.192.168.100.100.xip.io",
+ "cluster_issuer": "vault-issuer",
"osm_dashboards": True,
}
self.harness.update_config(self.config)
type: string
description: Ingress URL
default: ""
+ cluster_issuer:
+ type: string
+ description: Name of the cluster issuer for TLS certificates
+ default: ""
"site_url": lambda value, _: isinstance(value, str)
if value is not None
else True,
+ "cluster_issuer": lambda value, _: isinstance(value, str)
+ if value is not None
+ else True,
"ingress_whitelist_source_range": lambda value, _: _validate_ip_network(value),
"tls_secret_name": lambda value, _: isinstance(value, str)
if value is not None
return
ingress_whitelist_source_range = config["ingress_whitelist_source_range"]
+ cluster_issuer = config["cluster_issuer"]
annotations = {}
"nginx.ingress.kubernetes.io/whitelist-source-range"
] = ingress_whitelist_source_range
+ if cluster_issuer:
+ annotations["cert-manager.io/cluster-issuer"] = cluster_issuer
+
ingress_spec_tls = None
if parsed.scheme == "https":
}
],
"envConfig": {},
- "command": ["kafka-exporter", "--kafka.server=kafka:9090"],
+ "command": ["kafka_exporter", "--kafka.server=kafka:9090"],
"kubernetes": {
"readinessProbe": {
"httpGet": {
}
],
"envConfig": {},
- "command": ["kafka-exporter", "--kafka.server=kafka:9090"],
+ "command": ["kafka_exporter", "--kafka.server=kafka:9090"],
"kubernetes": {
"readinessProbe": {
"httpGet": {
}
],
"envConfig": {},
- "command": ["kafka-exporter", "--kafka.server=kafka:9090"],
+ "command": ["kafka_exporter", "--kafka.server=kafka:9090"],
"kubernetes": {
"readinessProbe": {
"httpGet": {
}
],
"envConfig": {},
- "command": ["kafka-exporter", "--kafka.server=kafka:9090"],
+ "command": ["kafka_exporter", "--kafka.server=kafka:9090"],
"kubernetes": {
"readinessProbe": {
"httpGet": {
def test_make_pod_ingress_resources_without_site_url(self) -> NoReturn:
"""Testing make pod ingress resources without site_url."""
- config = {"site_url": ""}
+ config = {
+ "cluster_issuer": "",
+ "site_url": "",
+ }
app_name = "kafka-exporter"
port = 9308
def test_make_pod_ingress_resources(self) -> NoReturn:
"""Testing make pod ingress resources."""
config = {
+ "cluster_issuer": "",
"site_url": "http://kafka-exporter",
"ingress_whitelist_source_range": "",
}
"""Testing make pod ingress resources with whitelist_source_range."""
config = {
"site_url": "http://kafka-exporter",
+ "cluster_issuer": "",
"ingress_whitelist_source_range": "0.0.0.0/0",
}
app_name = "kafka-exporter"
config = {
"site_url": "https://kafka-exporter",
"max_file_size": 0,
+ "cluster_issuer": "",
"ingress_whitelist_source_range": "",
"tls_secret_name": "",
}
config = {
"site_url": "https://kafka-exporter",
"max_file_size": 0,
+ "cluster_issuer": "",
"ingress_whitelist_source_range": "",
"tls_secret_name": "secret_name",
}
}
expected_result = [
- "kafka-exporter",
+ "kafka_exporter",
"--kafka.server={}:{}".format(
relation.get("kafka_host"), relation.get("kafka_port")
),
image_info = {"upstream-source": "bitnami/kafka-exporter:latest"}
config = {
"site_url": "",
+ "cluster_issuer": "",
}
relation_state = {
"kafka_host": "kafka",
}
],
"envConfig": {},
- "command": ["kafka-exporter", "--kafka.server=kafka:9090"],
+ "command": ["kafka_exporter", "--kafka.server=kafka:9090"],
"kubernetes": {
"readinessProbe": {
"httpGet": {
image_info = {"upstream-source": "bitnami/kafka-exporter:latest"}
config = {
"site_url": "https://kafka-exporter",
+ "cluster_issuer": "",
"tls_secret_name": "kafka-exporter",
"max_file_size": 0,
"ingress_whitelist_source_range": "0.0.0.0/0",
}
],
"envConfig": {},
- "command": ["kafka-exporter", "--kafka.server=kafka:9090"],
+ "command": ["kafka_exporter", "--kafka.server=kafka:9090"],
"kubernetes": {
"readinessProbe": {
"httpGet": {
image_info = None
config = {
"site_url": "",
+ "cluster_issuer": "",
}
relation_state = {
"kafka_host": "kafka",
image_info = {"upstream-source": "bitnami/kafka-exporter:latest"}
config = {
"site_url": "",
+ "cluster_issuer": "",
}
relation_state = {}
app_name = "kafka-exporter"
type: string
description: Ingress URL
default: ""
+ cluster_issuer:
+ type: string
+ description: Name of the cluster issuer for TLS certificates
+ default: ""
"site_url": lambda value, _: isinstance(value, str)
if value is not None
else True,
+ "cluster_issuer": lambda value, _: isinstance(value, str)
+ if value is not None
+ else True,
"ingress_whitelist_source_range": lambda value, _: _validate_ip_network(value),
"tls_secret_name": lambda value, _: isinstance(value, str)
if value is not None
return
ingress_whitelist_source_range = config["ingress_whitelist_source_range"]
+ cluster_issuer = config["cluster_issuer"]
+
annotations = {}
if ingress_whitelist_source_range:
"nginx.ingress.kubernetes.io/whitelist-source-range"
] = ingress_whitelist_source_range
+ if cluster_issuer:
+ annotations["cert-manager.io/cluster-issuer"] = cluster_issuer
+
ingress_spec_tls = None
if parsed.scheme == "https":
def test_make_pod_ingress_resources_without_site_url(self) -> NoReturn:
"""Testing make pod ingress resources without site_url."""
- config = {"site_url": ""}
+ config = {
+ "site_url": "",
+ "cluster_issuer": "",
+ }
app_name = "mongodb-exporter"
port = 9216
"""Testing make pod ingress resources."""
config = {
"site_url": "http://mongodb-exporter",
+ "cluster_issuer": "",
"ingress_whitelist_source_range": "",
}
app_name = "mongodb-exporter"
"""Testing make pod ingress resources with whitelist_source_range."""
config = {
"site_url": "http://mongodb-exporter",
+ "cluster_issuer": "",
"ingress_whitelist_source_range": "0.0.0.0/0",
}
app_name = "mongodb-exporter"
"""Testing make pod ingress resources with HTTPs."""
config = {
"site_url": "https://mongodb-exporter",
+ "cluster_issuer": "",
"ingress_whitelist_source_range": "",
"tls_secret_name": "",
}
"""Testing make pod ingress resources with HTTPs and TLS secret name."""
config = {
"site_url": "https://mongodb-exporter",
+ "cluster_issuer": "",
"ingress_whitelist_source_range": "",
"tls_secret_name": "secret_name",
}
image_info = {"upstream-source": "bitnami/mongodb-exporter:latest"}
config = {
"site_url": "",
+ "cluster_issuer": "",
}
relation_state = {
"mongodb_connection_string": "mongodb://mongo",
image_info = {"upstream-source": "bitnami/mongodb-exporter:latest"}
config = {
"site_url": "https://mongodb-exporter",
+ "cluster_issuer": "",
"tls_secret_name": "mongodb-exporter",
"ingress_whitelist_source_range": "0.0.0.0/0",
}
image_info = None
config = {
"site_url": "",
+ "cluster_issuer": "",
}
relation_state = {
"mongodb_connection_string": "mongodb://mongo",
image_info = {"upstream-source": "bitnami/mongodb-exporter:latest"}
config = {
"site_url": "",
+ "cluster_issuer": "",
}
relation_state = {}
app_name = "mongodb-exporter"
type: string
description: Ingress URL
default: ""
+ cluster_issuer:
+ type: string
+ description: Name of the cluster issuer for TLS certificates
+ default: ""
"site_url": lambda value, _: isinstance(value, str)
if value is not None
else True,
+ "cluster_issuer": lambda value, _: isinstance(value, str)
+ if value is not None
+ else True,
"ingress_whitelist_source_range": lambda value, _: _validate_ip_network(value),
"tls_secret_name": lambda value, _: isinstance(value, str)
if value is not None
return
ingress_whitelist_source_range = config["ingress_whitelist_source_range"]
+ cluster_issuer = config["cluster_issuer"]
annotations = {}
"nginx.ingress.kubernetes.io/whitelist-source-range"
] = ingress_whitelist_source_range
+ if cluster_issuer:
+ annotations["cert-manager.io/cluster-issuer"] = cluster_issuer
+
ingress_spec_tls = None
if parsed.scheme == "https":
def test_make_pod_ingress_resources_without_site_url(self) -> NoReturn:
"""Testing make pod ingress resources without site_url."""
- config = {"site_url": ""}
+ config = {
+ "site_url": "",
+ "cluster_issuer": "",
+ }
app_name = "mysqld-exporter"
port = 9104
"""Testing make pod ingress resources."""
config = {
"site_url": "http://mysqld-exporter",
+ "cluster_issuer": "",
"ingress_whitelist_source_range": "",
}
app_name = "mysqld-exporter"
"""Testing make pod ingress resources with whitelist_source_range."""
config = {
"site_url": "http://mysqld-exporter",
+ "cluster_issuer": "",
"ingress_whitelist_source_range": "0.0.0.0/0",
}
app_name = "mysqld-exporter"
"""Testing make pod ingress resources with HTTPs."""
config = {
"site_url": "https://mysqld-exporter",
+ "cluster_issuer": "",
"ingress_whitelist_source_range": "",
"tls_secret_name": "",
}
"""Testing make pod ingress resources with HTTPs and TLS secret name."""
config = {
"site_url": "https://mysqld-exporter",
+ "cluster_issuer": "",
"ingress_whitelist_source_range": "",
"tls_secret_name": "secret_name",
}
image_info = {"upstream-source": "bitnami/mysqld-exporter:latest"}
config = {
"site_url": "",
+ "cluster_issuer": "",
}
relation_state = {
"mysql_host": "mysql",
image_info = {"upstream-source": "bitnami/mysqld-exporter:latest"}
config = {
"site_url": "https://mysqld-exporter",
+ "cluster_issuer": "",
"tls_secret_name": "mysqld-exporter",
"ingress_whitelist_source_range": "0.0.0.0/0",
}
image_info = None
config = {
"site_url": "",
+ "cluster_issuer": "",
}
relation_state = {
"mysql_host": "mysql",
image_info = {"upstream-source": "bitnami/mysqld-exporter:latest"}
config = {
"site_url": "",
+ "cluster_issuer": "",
}
relation_state = {}
app_name = "mysqld-exporter"
type: string
description: Ingress URL
default: ""
+ cluster_issuer:
+ type: string
+ description: Name of the cluster issuer for TLS certificates
+ default: ""
log_level:
description: "Log Level"
type: string
log_level: str
max_file_size: int
site_url: Optional[str]
+ cluster_issuer: Optional[str]
ingress_whitelist_source_range: Optional[str]
tls_secret_name: Optional[str]
"nginx.ingress.kubernetes.io/whitelist-source-range"
] = config.ingress_whitelist_source_range
+ if config.cluster_issuer:
+ annotations["cert-manager.io/cluster-issuer"] = config.cluster_issuer
+
if parsed.scheme == "https":
ingress_resource_builder.add_tls(
[parsed.hostname], config.tls_secret_name
"ingress_whitelist_source_range": "",
"tls_secret_name": "",
"site_url": "https://nbi.192.168.100.100.xip.io",
+ "cluster_issuer": "vault-issuer",
}
self.harness.update_config(self.config)
type: string
description: Ingress URL
default: ""
+ cluster_issuer:
+ type: string
+ description: Name of the cluster issuer for TLS certificates
+ default: ""
server_name: str
max_file_size: int
site_url: Optional[str]
+ cluster_issuer: Optional[str]
ingress_whitelist_source_range: Optional[str]
tls_secret_name: Optional[str]
"nginx.ingress.kubernetes.io/whitelist-source-range"
] = config.ingress_whitelist_source_range
+ if config.cluster_issuer:
+ annotations["cert-manager.io/cluster-issuer"] = config.cluster_issuer
+
if parsed.scheme == "https":
ingress_resource_builder.add_tls(
[parsed.hostname], config.tls_secret_name
"ingress_whitelist_source_range": "",
"tls_secret_name": "",
"site_url": "https://ui.192.168.100.100.xip.io",
+ "cluster_issuer": "vault-issuer",
}
self.harness.update_config(self.config)
type: string
description: Ingress URL
default: ""
+ cluster_issuer:
+ type: string
+ description: Name of the cluster issuer for TLS certificates
+ default: ""
enable_web_admin_api:
type: boolean
description: Boolean to enable the web admin api
default_target: str
max_file_size: int
site_url: Optional[str]
+ cluster_issuer: Optional[str]
ingress_whitelist_source_range: Optional[str]
tls_secret_name: Optional[str]
enable_web_admin_api: bool
"nginx.ingress.kubernetes.io/whitelist-source-range"
] = config.ingress_whitelist_source_range
+ if config.cluster_issuer:
+ annotations["cert-manager.io/cluster-issuer"] = config.cluster_issuer
+
if parsed.scheme == "https":
ingress_resource_builder.add_tls(
[parsed.hostname], config.tls_secret_name
"ingress_whitelist_source_range": "",
"tls_secret_name": "",
"site_url": "https://prometheus.192.168.100.100.xip.io",
+ "cluster_issuer": "vault-issuer",
"enable_web_admin_api": False,
}
self.harness.update_config(self.config)