Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement(k8s): cluster cleanup command now also cleans build sync dir #962

Merged
merged 1 commit into from
Jul 15, 2019

Conversation

edvald
Copy link
Collaborator

@edvald edvald commented Jul 12, 2019

What this PR does / why we need it:

Previously, workspace directories that we synced to the cluster for in-cluster building would just pile up. Now they are cleaned up when you run garden plugins kubernetes cleanup-cluster-registry

Copy link
Collaborator

@eysi09 eysi09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor comments, otherwise looks good.


// Filter to directories last accessed more than workspaceSyncDirTtl ago
const minTimestamp = new Date().getTime() / 1000 - workspaceSyncDirTtl
console.log(minTimestamp)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove console.log

log.setSuccess()
}

async function getBuildSyncPodName(provider: KubernetesProvider, log: LogEntry) {
Copy link
Collaborator

@eysi09 eysi09 Jul 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment saying that this returns the name of the first build-sync pod found and that there are usually some replicas.

@edvald edvald force-pushed the build-sync-cleanup branch from 2c67ff1 to 69f4198 Compare July 15, 2019 17:10
@edvald
Copy link
Collaborator Author

edvald commented Jul 15, 2019

Comments addressed

@edvald edvald requested a review from eysi09 July 15, 2019 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants