diff --git a/consumer/src/mode/resolver/types.rs b/consumer/src/mode/resolver/types.rs index c0b3a1b..078a30f 100644 --- a/consumer/src/mode/resolver/types.rs +++ b/consumer/src/mode/resolver/types.rs @@ -69,15 +69,23 @@ impl ResolverMessageType { let ens = Ens::get_ens(Address::from_str(&account.id)?, resolver_consumer_context).await?; if let Some(name) = ens.name.clone() { info!("ENS for account: {:?}", ens); - Account::builder() + let updated_account = Account::builder() .id(account.id.clone()) .label(name.clone()) .image(ens.image.clone().unwrap_or_default()) - .account_type(account.account_type.clone()) - .atom_id(account.atom_id.clone().unwrap_or_default()) - .build() - .upsert(&resolver_consumer_context.pg_pool) - .await?; + .account_type(account.account_type.clone()); + if let Some(atom_id) = account.atom_id.clone() { + updated_account + .atom_id(atom_id) + .build() + .upsert(&resolver_consumer_context.pg_pool) + .await?; + } else { + updated_account + .build() + .upsert(&resolver_consumer_context.pg_pool) + .await?; + } } else { info!("No ENS found for account: {:?}", account); } diff --git a/devops/aws/ipfs/deployment.yaml b/devops/aws/ipfs/deployment.yaml index 3dfcddc..2143977 100644 --- a/devops/aws/ipfs/deployment.yaml +++ b/devops/aws/ipfs/deployment.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: name: ipfs spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: ipfs @@ -45,7 +45,7 @@ spec: volumes: - name: ipfs-data persistentVolumeClaim: - claimName: ipfs-data + claimName: ipfs-data-new - name: ipfs-scripts configMap: name: ipfs-scripts diff --git a/devops/aws/ipfs/pvc.yaml b/devops/aws/ipfs/pvc.yaml index c7a441f..bca6c25 100644 --- a/devops/aws/ipfs/pvc.yaml +++ b/devops/aws/ipfs/pvc.yaml @@ -1,11 +1,13 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: ipfs-data + name: ipfs-data-new + labels: + component: ipfs spec: accessModes: - ReadWriteOnce - storageClassName: gp2-immediate resources: requests: - storage: 20Gi \ No newline at end of file + storage: 20Gi + storageClassName: gp2-resizable \ No newline at end of file diff --git a/devops/aws/ipfs/storage-class.yaml b/devops/aws/ipfs/storage-class.yaml index 8e98035..11ac808 100644 --- a/devops/aws/ipfs/storage-class.yaml +++ b/devops/aws/ipfs/storage-class.yaml @@ -1,9 +1,10 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: - name: gp2-immediate -provisioner: ebs.csi.aws.com -volumeBindingMode: Immediate + name: gp2-resizable +provisioner: kubernetes.io/aws-ebs parameters: type: gp2 - encrypted: "true" \ No newline at end of file +allowVolumeExpansion: true # This is the key setting +reclaimPolicy: Retain +volumeBindingMode: WaitForFirstConsumer \ No newline at end of file diff --git a/devops/aws/safe-content-api/deployment.yaml b/devops/aws/safe-content-api/deployment.yaml index cd69fd8..1c1472d 100644 --- a/devops/aws/safe-content-api/deployment.yaml +++ b/devops/aws/safe-content-api/deployment.yaml @@ -3,6 +3,7 @@ kind: Deployment metadata: name: safe-content spec: + replicas: 2 selector: matchLabels: io.kompose.service: safe-content