type: boolean
description: Enable OSM System monitoring dashboards
default: false
+ image_pull_policy:
+ type: string
+ description: |
+ ImagePullPolicy configuration for the pod.
+ Possible values: always, ifnotpresent, never
+ default: always
ingress_class: Optional[str]
ingress_whitelist_source_range: Optional[str]
tls_secret_name: Optional[str]
+ image_pull_policy: Optional[str]
@validator("max_file_size")
def validate_max_file_size(cls, v):
ip_network(v)
return v
+ @validator("image_pull_policy")
+ def validate_image_pull_policy(cls, v):
+ values = {
+ "always": "Always",
+ "ifnotpresent": "IfNotPresent",
+ "never": "Never",
+ }
+ v = v.lower()
+ if v not in values.keys():
+ raise ValueError("value must be always, ifnotpresent or never")
+ return values[v]
+
class GrafanaCharm(CharmedOsmBase):
"""GrafanaCharm Charm."""
# Create Builder for the PodSpec
pod_spec_builder = PodSpecV3Builder()
# Build Container
- container_builder = ContainerV3Builder(self.app.name, image_info)
+ container_builder = ContainerV3Builder(
+ self.app.name, image_info, config.image_pull_policy
+ )
container_builder.add_port(name=self.app.name, port=PORT)
container_builder.add_http_readiness_probe(
"/api/health",
type: string
description: Name of the cluster issuer for TLS certificates
default: ""
+ image_pull_policy:
+ type: string
+ description: |
+ ImagePullPolicy configuration for the pod.
+ Possible values: always, ifnotpresent, never
+ default: always
ingress_class: Optional[str]
ingress_whitelist_source_range: Optional[str]
tls_secret_name: Optional[str]
+ image_pull_policy: Optional[str]
@validator("site_url")
def validate_site_url(cls, v):
ip_network(v)
return v
+ @validator("image_pull_policy")
+ def validate_image_pull_policy(cls, v):
+ values = {
+ "always": "Always",
+ "ifnotpresent": "IfNotPresent",
+ "never": "Never",
+ }
+ v = v.lower()
+ if v not in values.keys():
+ raise ValueError("value must be always, ifnotpresent or never")
+ return values[v]
+
class KafkaExporterCharm(CharmedOsmBase):
def __init__(self, *args) -> NoReturn:
pod_spec_builder = PodSpecV3Builder()
# Build container
- container_builder = ContainerV3Builder(self.app.name, image_info)
+ container_builder = ContainerV3Builder(
+ self.app.name, image_info, config.image_pull_policy
+ )
container_builder.add_port(name=self.app.name, port=PORT)
container_builder.add_http_readiness_probe(
path="/api/health",
type: string
description: Ingress URL
default: ""
+ image_pull_policy:
+ type: string
+ description: |
+ ImagePullPolicy configuration for the pod.
+ Possible values: always, ifnotpresent, never
+ default: always
region_id:
type: string
description: Region ID to be created when starting the service
mysql_host: Optional[str]
mysql_port: Optional[int]
mysql_root_password: Optional[str]
+ image_pull_policy: Optional[str]
@validator("max_file_size")
def validate_max_file_size(cls, v):
raise ValueError("Mysql port out of range")
return v
+ @validator("image_pull_policy")
+ def validate_image_pull_policy(cls, v):
+ values = {
+ "always": "Always",
+ "ifnotpresent": "IfNotPresent",
+ "never": "Never",
+ }
+ v = v.lower()
+ if v not in values.keys():
+ raise ValueError("value must be always, ifnotpresent or never")
+ return values[v]
+
class ConfigLdapModel(ModelValidator):
ldap_enabled: bool
pod_spec_builder = PodSpecV3Builder()
# Build Container
- container_builder = ContainerV3Builder(self.app.name, image_info)
+ container_builder = ContainerV3Builder(
+ self.app.name, image_info, config.image_pull_policy
+ )
container_builder.add_port(name=self.app.name, port=PORT)
# Build files
description: CA certificates to validate access to Helm repository
type: string
default: ""
+ image_pull_policy:
+ type: string
+ description: |
+ ImagePullPolicy configuration for the pod.
+ Possible values: always, ifnotpresent, never
+ default: always
vca_model_config_update_status_hook_interval: Optional[str]
vca_stablerepourl: Optional[str]
vca_helm_ca_certs: Optional[str]
+ image_pull_policy: Optional[str]
@validator("log_level")
def validate_log_level(cls, v):
raise ValueError("mongodb_uri is not properly formed")
return v
+ @validator("image_pull_policy")
+ def validate_image_pull_policy(cls, v):
+ values = {
+ "always": "Always",
+ "ifnotpresent": "IfNotPresent",
+ "never": "Never",
+ }
+ v = v.lower()
+ if v not in values.keys():
+ raise ValueError("value must be always, ifnotpresent or never")
+ return values[v]
+
class LcmCharm(CharmedOsmBase):
def __init__(self, *args) -> NoReturn:
pod_spec_builder = PodSpecV3Builder()
# Build Container
- container_builder = ContainerV3Builder(self.app.name, image_info)
+ container_builder = ContainerV3Builder(
+ self.app.name, image_info, config.image_pull_policy
+ )
container_builder.add_port(name=self.app.name, port=PORT)
container_builder.add_envs(
{
name: name of the file for the certificate
content: base64 content of the certificate
The path for the files is /certs.
+ image_pull_policy:
+ type: string
+ description: |
+ ImagePullPolicy configuration for the pod.
+ Possible values: always, ifnotpresent, never
+ default: always
grafana_user: str
grafana_password: str
certificates: Optional[str]
+ image_pull_policy: Optional[str]
@validator("log_level")
def validate_log_level(cls, v):
raise ValueError("mongodb_uri is not properly formed")
return v
+ @validator("image_pull_policy")
+ def validate_image_pull_policy(cls, v):
+ values = {
+ "always": "Always",
+ "ifnotpresent": "IfNotPresent",
+ "never": "Never",
+ }
+ v = v.lower()
+ if v not in values.keys():
+ raise ValueError("value must be always, ifnotpresent or never")
+ return values[v]
+
@property
def certificates_dict(cls):
return _extract_certificates(cls.certificates) if cls.certificates else {}
pod_spec_builder = PodSpecV3Builder()
# Build Container
- container_builder = ContainerV3Builder(self.app.name, image_info)
+ container_builder = ContainerV3Builder(
+ self.app.name, image_info, config.image_pull_policy
+ )
certs_files = self._build_cert_files(config)
if certs_files:
mongodb_uri:
type: string
description: MongoDB URI (external database)
+ image_pull_policy:
+ type: string
+ description: |
+ ImagePullPolicy configuration for the pod.
+ Possible values: always, ifnotpresent, never
+ default: always
ingress_whitelist_source_range: Optional[str]
tls_secret_name: Optional[str]
mongodb_uri: Optional[str]
+ image_pull_policy: Optional[str]
@validator("site_url")
def validate_site_url(cls, v):
raise ValueError("mongodb_uri is not properly formed")
return v
+ @validator("image_pull_policy")
+ def validate_image_pull_policy(cls, v):
+ values = {
+ "always": "Always",
+ "ifnotpresent": "IfNotPresent",
+ "never": "Never",
+ }
+ v = v.lower()
+ if v not in values.keys():
+ raise ValueError("value must be always, ifnotpresent or never")
+ return values[v]
+
class MongodbExporterCharm(CharmedOsmBase):
def __init__(self, *args) -> NoReturn:
pod_spec_builder = PodSpecV3Builder()
# Build container
- container_builder = ContainerV3Builder(self.app.name, image_info)
+ container_builder = ContainerV3Builder(
+ self.app.name, image_info, config.image_pull_policy
+ )
container_builder.add_port(name=self.app.name, port=PORT)
container_builder.add_http_readiness_probe(
path="/api/health",
mysql_uri:
type: string
description: MySQL URI (external database)
+ image_pull_policy:
+ type: string
+ description: |
+ ImagePullPolicy configuration for the pod.
+ Possible values: always, ifnotpresent, never
+ default: always
ingress_whitelist_source_range: Optional[str]
tls_secret_name: Optional[str]
mysql_uri: Optional[str]
+ image_pull_policy: Optional[str]
@validator("site_url")
def validate_site_url(cls, v):
raise ValueError("mysql_uri is not properly formed")
return v
+ @validator("image_pull_policy")
+ def validate_image_pull_policy(cls, v):
+ values = {
+ "always": "Always",
+ "ifnotpresent": "IfNotPresent",
+ "never": "Never",
+ }
+ v = v.lower()
+ if v not in values.keys():
+ raise ValueError("value must be always, ifnotpresent or never")
+ return values[v]
+
class MysqlExporterCharm(CharmedOsmBase):
def __init__(self, *args) -> NoReturn:
pod_spec_builder = PodSpecV3Builder()
# Build container
- container_builder = ContainerV3Builder(self.app.name, image_info)
+ container_builder = ContainerV3Builder(
+ self.app.name, image_info, config.image_pull_policy
+ )
container_builder.add_port(name=self.app.name, port=PORT)
container_builder.add_http_readiness_probe(
path="/api/health",
mongodb_uri:
type: string
description: MongoDB URI (external database)
+ image_pull_policy:
+ type: string
+ description: |
+ ImagePullPolicy configuration for the pod.
+ Possible values: always, ifnotpresent, never
+ default: always
ingress_whitelist_source_range: Optional[str]
tls_secret_name: Optional[str]
mongodb_uri: Optional[str]
+ image_pull_policy: Optional[str]
@validator("auth_backend")
def validate_auth_backend(cls, v):
raise ValueError("mongodb_uri is not properly formed")
return v
+ @validator("image_pull_policy")
+ def validate_image_pull_policy(cls, v):
+ values = {
+ "always": "Always",
+ "ifnotpresent": "IfNotPresent",
+ "never": "Never",
+ }
+ v = v.lower()
+ if v not in values.keys():
+ raise ValueError("value must be always, ifnotpresent or never")
+ return values[v]
+
class NbiCharm(CharmedOsmBase):
def __init__(self, *args) -> NoReturn:
)
# Build Container
- container_builder = ContainerV3Builder(self.app.name, image_info)
+ container_builder = ContainerV3Builder(
+ self.app.name, image_info, config.image_pull_policy
+ )
container_builder.add_port(name=self.app.name, port=PORT)
container_builder.add_tcpsocket_readiness_probe(
PORT,
type: string
description: Name of the cluster issuer for TLS certificates
default: ""
+ image_pull_policy:
+ type: string
+ description: |
+ ImagePullPolicy configuration for the pod.
+ Possible values: always, ifnotpresent, never
+ default: always
ingress_class: Optional[str]
ingress_whitelist_source_range: Optional[str]
tls_secret_name: Optional[str]
+ image_pull_policy: Optional[str]
@validator("port")
def validate_port(cls, v):
ip_network(v)
return v
+ @validator("image_pull_policy")
+ def validate_image_pull_policy(cls, v):
+ values = {
+ "always": "Always",
+ "ifnotpresent": "IfNotPresent",
+ "never": "Never",
+ }
+ v = v.lower()
+ if v not in values.keys():
+ raise ValueError("value must be always, ifnotpresent or never")
+ return values[v]
+
class NgUiCharm(CharmedOsmBase):
def __init__(self, *args) -> NoReturn:
# Create Builder for the PodSpec
pod_spec_builder = PodSpecV3Builder()
# Build Container
- container_builder = ContainerV3Builder(self.app.name, image_info)
+ container_builder = ContainerV3Builder(
+ self.app.name, image_info, config.image_pull_policy
+ )
container_builder.add_port(name=self.app.name, port=config.port)
container = container_builder.build()
container_builder.add_tcpsocket_readiness_probe(
mongodb_uri:
type: string
description: MongoDB URI (external database)
+ image_pull_policy:
+ type: string
+ description: |
+ ImagePullPolicy configuration for the pod.
+ Possible values: always, ifnotpresent, never
+ default: always
database_commonkey: str
mongodb_uri: Optional[str]
log_level: str
+ image_pull_policy: Optional[str]
@validator("log_level")
def validate_log_level(cls, v):
raise ValueError("mongodb_uri is not properly formed")
return v
+ @validator("image_pull_policy")
+ def validate_image_pull_policy(cls, v):
+ values = {
+ "always": "Always",
+ "ifnotpresent": "IfNotPresent",
+ "never": "Never",
+ }
+ v = v.lower()
+ if v not in values.keys():
+ raise ValueError("value must be always, ifnotpresent or never")
+ return values[v]
+
class PlaCharm(CharmedOsmBase):
def __init__(self, *args) -> NoReturn:
pod_spec_builder = PodSpecV3Builder()
# Build Container
- container_builder = ContainerV3Builder(self.app.name, image_info)
+ container_builder = ContainerV3Builder(
+ self.app.name, image_info, config.image_pull_policy
+ )
container_builder.add_port(name=self.app.name, port=PORT)
container_builder.add_envs(
{
description: |
Mysql URI with the following format:
mysql://<user>:<password>@<mysql_host>:<mysql_port>/<database>
+ image_pull_policy:
+ type: string
+ description: |
+ ImagePullPolicy configuration for the pod.
+ Possible values: always, ifnotpresent, never
+ default: always
log_level: str
mongodb_uri: Optional[str]
mysql_uri: Optional[str]
+ image_pull_policy: Optional[str]
@validator("log_level")
def validate_log_level(cls, v):
raise ValueError("mysql_uri is not properly formed")
return v
+ @validator("image_pull_policy")
+ def validate_image_pull_policy(cls, v):
+ values = {
+ "always": "Always",
+ "ifnotpresent": "IfNotPresent",
+ "never": "Never",
+ }
+ v = v.lower()
+ if v not in values.keys():
+ raise ValueError("value must be always, ifnotpresent or never")
+ return values[v]
+
class PolCharm(CharmedOsmBase):
def __init__(self, *args) -> NoReturn:
pod_spec_builder = PodSpecV3Builder()
# Build Container
- container_builder = ContainerV3Builder(self.app.name, image_info)
+ container_builder = ContainerV3Builder(
+ self.app.name, image_info, config.image_pull_policy
+ )
container_builder.add_port(name=self.app.name, port=PORT)
container_builder.add_envs(
{
type: boolean
description: Boolean to enable the web admin api
default: false
+ image_pull_policy:
+ type: string
+ description: |
+ ImagePullPolicy configuration for the pod.
+ Possible values: always, ifnotpresent, never
+ default: always
ingress_whitelist_source_range: Optional[str]
tls_secret_name: Optional[str]
enable_web_admin_api: bool
+ image_pull_policy: Optional[str]
@validator("web_subpath")
def validate_web_subpath(cls, v):
ip_network(v)
return v
+ @validator("image_pull_policy")
+ def validate_image_pull_policy(cls, v):
+ values = {
+ "always": "Always",
+ "ifnotpresent": "IfNotPresent",
+ "never": "Never",
+ }
+ v = v.lower()
+ if v not in values.keys():
+ raise ValueError("value must be always, ifnotpresent or never")
+ return values[v]
+
class PrometheusCharm(CharmedOsmBase):
pod_spec_builder.add_container(backup_container)
# Build Container
- container_builder = ContainerV3Builder(self.app.name, image_info)
+ container_builder = ContainerV3Builder(
+ self.app.name, image_info, config.image_pull_policy
+ )
container_builder.add_port(name=self.app.name, port=PORT)
container_builder.add_http_readiness_probe(
"/-/ready",
name: name of the file for the certificate
content: base64 content of the certificate
The path for the files is /certs.
+ image_pull_policy:
+ type: string
+ description: |
+ ImagePullPolicy configuration for the pod.
+ Possible values: always, ifnotpresent, never
+ default: always
ro_database: str
openmano_tenant: str
certificates: Optional[str]
+ image_pull_policy: Optional[str]
@validator("log_level")
def validate_log_level(cls, v):
raise ValueError("Mysql port out of range")
return v
+ @validator("image_pull_policy")
+ def validate_image_pull_policy(cls, v):
+ values = {
+ "always": "Always",
+ "ifnotpresent": "IfNotPresent",
+ "never": "Never",
+ }
+ v = v.lower()
+ if v not in values.keys():
+ raise ValueError("value must be always, ifnotpresent or never")
+ return values[v]
+
@property
def certificates_dict(cls):
return _extract_certificates(cls.certificates) if cls.certificates else {}
pod_spec_builder = PodSpecV3Builder()
# Build Container
- container_builder = ContainerV3Builder(self.app.name, image_info)
+ container_builder = ContainerV3Builder(
+ self.app.name, image_info, config.image_pull_policy
+ )
certs_files = self._build_cert_files(config)
if certs_files: