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

feat: s/ksonnet-lib/k8s-alpha #563

Merged
merged 8 commits into from
Jun 1, 2021
Merged

feat: s/ksonnet-lib/k8s-alpha #563

merged 8 commits into from
Jun 1, 2021

Conversation

Duologic
Copy link
Member

@Duologic Duologic commented May 20, 2021

I would like to propose making k8s-alpha the default library we refer to
instead of the long ago abandoned ksonnet-lib.

Grafana Labs has been using k8s-alpha since its inception by @sh0rez over a year ago this month. The
ksonnet-util has since been refactored and provides
an adequate compatibility layer to make the transition seamless.

This PR updates the tk init command to initiate a Tanka directory structure using the k8s-alpha library and replaces
most if not all ksonnet-lib references with k8s-alpha in the docs. I also sneaked in a few Jsonnet best practices,
not stacking Jsonnet libraries on the root.

@Duologic Duologic requested a review from sh0rez May 20, 2021 20:50
@Duologic
Copy link
Member Author

force push for rewording a commit message.

},
},
},
},
Copy link
Member Author

Choose a reason for hiding this comment

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

Formatting due to jsonnet-fmt run by my IDE.

Copy link
Contributor

@malcolmholmes malcolmholmes left a comment

Choose a reason for hiding this comment

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

This is amazing, long overdue!

cmd/tk/init.go Show resolved Hide resolved
docs/docs/tutorial/k-lib.mdx Outdated Show resolved Hide resolved
docs/docs/tutorial/k-lib.mdx Outdated Show resolved Hide resolved
Co-authored-by: malcolmholmes <42545407+malcolmholmes@users.noreply.github.com>
cmd/tk/init.go Outdated Show resolved Hide resolved
@@ -22,8 +25,7 @@ func initCmd() *cli.Command {
}

force := cmd.Flags().BoolP("force", "f", false, "ignore the working directory not being empty")
installK8sLibFlag := cmd.Flags().Bool("k8s", true, "set to false to skip installation of k8s-alpha")
installK8sVersion := cmd.Flags().String("k8sversion", "1.20", "choose the version of k8s-alpha")
installK8s := cmd.Flags().String("k8s", defaultK8sVersion, "choose the version of k8s-alpha, set to false to skip")
Copy link
Contributor

Choose a reason for hiding this comment

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

no shorthand version?

Copy link
Member Author

Choose a reason for hiding this comment

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

Would that be better? This approach keeps compatibility with --k8s=<bool> flag.

Copy link
Member

@sh0rez sh0rez left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants