+ return (fernet_keys, credential_keys)
+
+ def _make_pod_files(
+ self, fernet_keys: List[str], credential_keys: List[str]
+ ) -> List[Dict[str, Any]]:
+ """Generating ConfigMap information.
+
+ Args:
+ fernet_keys (List[str]): keys for fernet.
+ credential_keys (List[str]): keys for credentials.
+
+ Returns:
+ List[Dict[str, Any]]: ConfigMap information.
+ """
+ files = [
+ {
+ "name": "fernet-keys",
+ "mountPath": FERNET_KEYS_PATH,
+ "files": [
+ {"path": str(key_id), "content": value}
+ for (key_id, value) in enumerate(fernet_keys)
+ ],
+ }
+ ]
+
+ files.append(
+ {
+ "name": "credential-keys",
+ "mountPath": CREDENTIAL_KEYS_PATH,
+ "files": [
+ {"path": str(key_id), "content": value}
+ for (key_id, value) in enumerate(credential_keys)
+ ],
+ }
+ )
+
+ return files
+
+ def configure_pod(self, event: EventBase) -> NoReturn:
+ """Assemble the pod spec and apply it, if possible.
+
+ Args:
+ event (EventBase): Hook or Relation event that started the
+ function.
+ """