Skip to content

Instantly share code, notes, and snippets.

@roderik
Created March 22, 2022 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roderik/0b949356750dac9426ff86985996bf20 to your computer and use it in GitHub Desktop.
Save roderik/0b949356750dac9426ff86985996bf20 to your computer and use it in GitHub Desktop.
this.cluster = new Cluster(
name,
{
name,
location: region,
releaseChannel: {
channel: 'REGULAR',
},
clusterAutoscaling: {
enabled: false,
autoscalingProfile: 'OPTIMIZE_UTILIZATION',
},
verticalPodAutoscaling: {
enabled: true,
},
addonsConfig: {
gcePersistentDiskCsiDriverConfig: {
enabled: true,
},
dnsCacheConfig: {
enabled: true,
},
},
maintenancePolicy: {
recurringWindow: {
startTime: '2021-08-31T22:00:00Z',
endTime: '2021-09-01T02:00:00Z',
recurrence: 'FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR,SA,SU',
},
},
nodePools: [
{
name: `${name}-np`,
nodeConfig: {
machineType: 'e2-standard-8',
diskType: 'pd-ssd',
diskSizeGb: 20,
shieldedInstanceConfig: {
enableIntegrityMonitoring: true,
},
oauthScopes: [
'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',
],
},
autoscaling: {
minNodeCount: 1,
maxNodeCount: 20,
},
initialNodeCount: 1,
management: {
autoUpgrade: true,
autoRepair: true,
},
upgradeSettings: {
maxSurge: 1,
maxUnavailable: 0,
},
},
],
},
{
parent: this,
protect: false,
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment