Skip to content

Commit

Permalink
fix: don't mount gcs in adhoc
Browse files Browse the repository at this point in the history
  • Loading branch information
omBratteng committed Dec 13, 2024
1 parent 9a1dca6 commit b0359c1
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/debezium.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,20 +218,9 @@ export function deployDebeziumKubernetesResources(
secretName: debeziumProps.metadata.name,
},
},
{
name: 'data',
csi: {
driver: 'gcsfuse.csi.storage.gke.io',
volumeAttributes: {
bucketName: `${name}-debezium-storage`,
mountOptions: 'implicit-dirs,uid=185,gid=0',
},
},
},
];
const volumeMounts: k8s.types.input.core.v1.VolumeMount[] = [
{ name: 'props', mountPath: '/debezium/conf' },
{ name: 'data', mountPath: '/debezium/data' },
];

// If service account is provided
Expand Down Expand Up @@ -270,6 +259,20 @@ export function deployDebeziumKubernetesResources(
};
}

if (!isAdhocEnv) {
volumes.push({
name: 'data',
csi: {
driver: 'gcsfuse.csi.storage.gke.io',
volumeAttributes: {
bucketName: `${name}-debezium-storage`,
mountOptions: 'implicit-dirs,uid=185,gid=0',
},
},
});
volumeMounts.push({ name: 'data', mountPath: '/debezium/data' });
}

const { tolerations } = getSpotSettings({ enabled: true }, isAdhocEnv);

new k8s.apps.v1.Deployment(
Expand Down

0 comments on commit b0359c1

Please sign in to comment.