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

Add target path to the bootstrap cmd #39

Merged
merged 1 commit into from
Jun 12, 2020
Merged

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Jun 12, 2020

This PR adds an optional flag to the bootstrap command that allows specifying a repository path where the manifests will be placed. When a path is specified, the cluster sync is configured for the target path. Using a path per cluster, a repository can be used to define the desired state of a fleet of clusters.

@@ -417,7 +423,7 @@ func generateGitHubKustomization(url, name, namespace, tmpDir string, interval t
Interval: metav1.Duration{
Duration: 10 * time.Minute,
},
Path: "./",
Path: "./" + targetPath,
Copy link
Member

Choose a reason for hiding this comment

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

filepath.Join()?

Copy link
Member Author

Choose a reason for hiding this comment

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

Doesn't work, as join removes ./ and that breaks the CRD validation.

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 added a trim to guard against double ./.

@stefanprodan stefanprodan merged commit 2a61bef into master Jun 12, 2020
@stefanprodan stefanprodan deleted the bootstrap-path branch June 12, 2020 13:11
ybelleguic pushed a commit to ybelleguic/flux2 that referenced this pull request Jan 9, 2023
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.

None yet

2 participants