Skip to content

Instantly share code, notes, and snippets.

@roderik
Created March 16, 2022 21:54
Show Gist options
  • Save roderik/4d6a223f05623280d87b2ce16c870d2f to your computer and use it in GitHub Desktop.
Save roderik/4d6a223f05623280d87b2ce16c870d2f to your computer and use it in GitHub Desktop.
export class BesuDisk extends ComponentResource {
public pvc: PersistentVolumeClaim;
constructor(
name: string,
namespace: Namespace,
subject: BesuBlockchainNode,
blockchainNetwork: BesuIbftv2BlockchainNetwork,
config: IConfiguration,
resources: IClusterServiceResourceDefinition,
opts: ComponentResourceOptions = {}
) {
super('bpaas:enterprisenet:besu:disk', name, {}, { ...opts });
this.pvc = new PersistentVolumeClaim(
name,
{
metadata: {
labels: compileCommonLabels(subject, BlockchainNode.name, blockchainNetwork.id),
namespace: namespace.metadata.name,
annotations: { 'pulumi.com/skipAwait': 'true' },
},
spec: {
accessModes: ['ReadWriteOnce'],
resources: { requests: { storage: `${resources.limits.storage}Gi` } },
storageClassName: 'performance-regular',
},
},
{ parent: this, provider: opts.provider }
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment