-
Notifications
You must be signed in to change notification settings - Fork 29
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
Package Kubenix script #62
Conversation
BTW, this doesn't link the resulting Kubernetes manifest to the derivation output anymore because there is no need. I guess this could break someone's setup, but I believe they shouldn't be using the manifest generated for the Kubenix script. |
Thanks! This does look a lot neater 💯 |
I think this is fine to do given the front page disclaimer about being unstable. I half-implemented a |
Does this look fine? |
Haven’t looked at the changes, but just wanted to make sure that users will still be able to easily access the generated manifest. Not everyone deploys via kubectl apply from their CI\CD pipeline. For example where I work, we generate manifests in the CI\CD pipeline of the source repo and push them to a manifest repo. The manifest changes are then picked up and deployed by argocd running within the cluster. |
The example to generate the manifest on the documentation website is still working fine (i.e. using |
pkgs/kubenix.nix
Outdated
{ | ||
kubeconfig = kubernetes.kubeconfig or ""; | ||
|
||
kubeconfig = "/home/pim/.kube/config"; # kubernetes.kubeconfig or ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to remove personal path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, corrected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could add the result to passthru on the derivation as passthru.manifest?
Seems fair, I've added it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, for what it’s worth (I don’t have merge permissions 😄)
As suggested in #60, I used
writeScriptBin
and some other helpers to package the Kubenix script. I extracted the Bash script itself and put it in its own file which makes it easier to maintain. UsingwrapProgram
, I set the environmental variables that were before set by string substitution.closes #59