Created
January 23, 2023 17:25
-
-
Save seeker815/28a32276d60b057eca099848babee8c8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const neo4jNS = new k8s.core.v1.Namespace(`neo4j-${projectEnv}`, {metadata: { name: `neo4j-${projectEnv}` }}, { provider: clusterProvider }); | |
const core1 = new k8s.helm.v3.Release("core-1", { | |
chart: "neo4j-cluster-core", | |
repositoryOpts: { | |
repo: neo4jHelmRepository, | |
}, | |
version: "4.4.15", | |
namespace: neo4jNS.metadata.name, | |
name: "core-1", | |
values: { | |
neo4j: { | |
name: `neo4j-cluster-${projectEnv}`, | |
acceptLicenseAgreement: "yes", | |
resources: { | |
requests: { | |
memory: "12Gi", | |
}, | |
limits: { | |
cpu: "2000m", | |
memory: "14Gi" | |
}, | |
}, | |
}, | |
volumes: { | |
data: { | |
mode: "dynamic", | |
dynamic: { | |
/* In GKE; | |
premium-rwo provisions SSD disks (recommended) | |
standard-rwo provisions balanced SSD-backed disks | |
standard provisions HDD disks | |
*/ | |
storageClassName: "standard-rwo", | |
} | |
}, | |
plugins: { | |
mode: "share", | |
share: { | |
name: "data" | |
} | |
} | |
}, | |
// nodeSelector: [{ | |
// //["cloud.google.com/gke-nodepool"]: "primarynodes-f059c87", | |
// }], | |
config: { | |
"dbms.directories.plugins": "/plugins", | |
"dbms.security.procedures.unrestricted": "apoc.*", | |
"dbms.memory.heap.initial_size": "4900m", | |
"dbms.memory.heap.max_size": "4900m", | |
"dbms.memory.pagecache.size": "5600m", | |
"dbms.directories.logs": "/logs", | |
"dbms.directories.licenses": "/licenses", | |
"dbms.directories.import": "/import", | |
"dbms.default_listen_address": "0.0.0.0", | |
}, | |
apoc_config: { | |
"apoc.trigger.enabled": "true", | |
"apoc.trigger.refresh": "60000", | |
}, | |
podSpec: { | |
"tolerations": { | |
effect: "PreferNoSchedule", | |
key: "dedicated", | |
operator: "Equal", | |
value: "neo", | |
}, | |
}, | |
}, | |
skipAwait: true, | |
},{provider: clusterProvider, dependsOn: [primaryNodePool, neo4jNS]}); |
This file contains hidden or 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
const primaryNodePool = new gcp.container.NodePool("primarynodes", { | |
location: clusterLocation, | |
cluster: primary.name, | |
nodeCount: primaryNodeCount, | |
nodeConfig: { | |
machineType: nodeMachineType, | |
serviceAccount: objectViewer.email, | |
oauthScopes: [ | |
"https://www.googleapis.com/auth/cloud-platform", | |
"https://www.googleapis.com/auth/compute", | |
"https://www.googleapis.com/auth/devstorage.read_only", | |
"https://www.googleapis.com/auth/logging.write", | |
"https://www.googleapis.com/auth/monitoring" | |
], | |
diskSizeGb: 30, | |
taints: [{ | |
key: "dedicated", | |
value: "neo", | |
effect: "PREFER_NO_SCHEDULE", | |
}], | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment