Skip to content

Conversation

rizul2108
Copy link
Member

No description provided.

- name: create-data-dirs
image: busybox
command: ["sh", "-c", "mkdir /mnt/gogs /mnt/mysql /mnt/mongo /mnt/kashira /mnt/kissaki && sleep infinity"]
command: ["sh", "-c", "rm -rf /mnt/gogs /mnt/mysql /mnt/mongo /mnt/kashira /mnt/kissaki && mkdir /mnt/gogs /mnt/mysql /mnt/mongo /mnt/kashira /mnt/kissaki && sleep infinity"]
Copy link
Member

Choose a reason for hiding this comment

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

why do you need to delete dirs in container? Is it cause it picking it up from volumes, but that won't be required while setup as new volume would be created ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I discussed it with paradox he said that sometimes it get stuck in loop of a function because of pre-existing directories
so he asked to add this code for first deleting the directories.

Copy link
Member

Choose a reason for hiding this comment

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

@Paradox Right change ?

Copy link
Member Author

Choose a reason for hiding this comment

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

cmd/infraset.go Outdated

for _, m := range clusterConfig.TemplatedManifests {

manifest := &bytes.Buffer{}
Copy link
Member

Choose a reason for hiding this comment

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

try writing most of functions not directly in cmd func, use it to call the required details. so we can reuse them. Like here for applying , use the deployment.deploycluster if its compatible.
See imgpkg code for inspiration.

Copy link
Member Author

Choose a reason for hiding this comment

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

okay will check it once again

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.

4 participants