Created
March 16, 2022 21:54
-
-
Save roderik/4d6a223f05623280d87b2ce16c870d2f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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