Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
metadata: { namespace: appsNamespaceName },
subjects: [{
kind: "User",
name: `${devsAccountId}@${project}.iam.gserviceaccount.com`,
}],
roleRef: {
apiGroup: "rbac.authorization.k8s.io",
kind: "Role",
name: devsGroupRole.metadata.name,
},
}, { provider }
)
})
// Create the standard StorageClass.
const sc = new k8s.storage.v1.StorageClass("standard",
{
provisioner: "kubernetes.io/gce-pd",
parameters: {
"type": "pd-standard",
"replication-type": "none"
},
},
{ provider: provider }
);
// Create a Persistent Volume Claim on the StorageClass.
const myPvc = new k8s.core.v1.PersistentVolumeClaim("mypvc", {
spec: {
accessModes: ["ReadWriteOnce"],
storageClassName: sc.metadata.name,
resources: {requests: {storage: "1Gi"}}
{
metadata: { namespace: roleNs },
subjects: [{
kind: "Group",
name: config.adGroupDevs,
}],
roleRef: {
apiGroup: "rbac.authorization.k8s.io",
kind: "Role",
name: devsGroupRole.metadata.name,
},
}, { provider });
});
// Create the premium StorageClass.
const sc = new k8s.storage.v1.StorageClass("premium",
{
provisioner: "kubernetes.io/azure-disk",
parameters: {
"storageaccounttype": "Premium_LRS",
"kind": "Managed"
},
}, { provider: provider });
// Create a Persistent Volume Claim on the StorageClass.
const myPvc = new k8s.core.v1.PersistentVolumeClaim("mypvc", {
spec: {
accessModes: ["ReadWriteOnce"],
storageClassName: sc.metadata.name,
resources: {requests: {storage: "1Gi"}}
}
}, { provider: provider });
"type": storageClass.type,
};
if (storageClass.zones) {
parameters["zones"] = pulumi.output(storageClass.zones).apply(v => v.join(", "));
}
if (storageClass.iopsPerGb) {
parameters["iopsPerGb"] = pulumi.output(storageClass.iopsPerGb).apply(v => `${v}`);
}
if (storageClass.encrypted) {
parameters["encrypted"] = pulumi.output(storageClass.encrypted).apply(v => `${v}`);
}
if (storageClass.kmsKeyId) {
parameters["kmsKeyId"] = storageClass.kmsKeyId;
}
return new k8s.storage.v1.StorageClass(name, {
metadata: metadata,
provisioner: "kubernetes.io/aws-ebs",
parameters: parameters,
allowVolumeExpansion: storageClass.allowVolumeExpansion,
mountOptions: storageClass.mountOptions,
reclaimPolicy: storageClass.reclaimPolicy,
volumeBindingMode: storageClass.volumeBindingMode,
}, opts);
}