Skip to content

Conversation

jdockerty
Copy link
Member

@jdockerty jdockerty commented Aug 4, 2023

Related to #219, I thought this was quite interesting so I spent a little bit of time with it.

This is a very rough implementation of adding kustomize+https://<url> support to kubecfg. It should also be likely marked as requiring --alpha, which I can look into later on. No doubt there is a lot to do to get this working properly.

I.e. at a high-level this simply runs kustomize build <url> and relies entirely on their libraries. Perhaps in the future we want to also support kustomize locally with kustomize://path/to/kustomization or similar. For now, this works over a network.


Example

// testdata/kustomize/test.jsonnet
{
  metacontrollerUpstream: import 'kustomize+https://github.com/metacontroller/metacontroller/manifests/production',
}
go run main.go show testdata/kustomize/test.jsonnet | kubectl apply -f -
namespace/metacontroller created
serviceaccount/metacontroller created
clusterrole.rbac.authorization.k8s.io/metacontroller created
clusterrolebinding.rbac.authorization.k8s.io/metacontroller created
clusterrole.rbac.authorization.k8s.io/aggregate-metacontroller-view created
clusterrole.rbac.authorization.k8s.io/aggregate-metacontroller-edit created
customresourcedefinition.apiextensions.k8s.io/compositecontrollers.metacontroller.k8s.io created
customresourcedefinition.apiextensions.k8s.io/controllerrevisions.metacontroller.k8s.io created
customresourcedefinition.apiextensions.k8s.io/decoratorcontrollers.metacontroller.k8s.io created
statefulset.apps/metacontroller created

@jdockerty jdockerty self-assigned this Aug 4, 2023
@jdockerty jdockerty changed the title feat: kustomize+https support feat: kustomize+https initial support Aug 4, 2023
@jdockerty jdockerty changed the title feat: kustomize+https initial support feat: initial support for kustomize+https Aug 4, 2023
@jdockerty jdockerty changed the title feat: initial support for kustomize+https feat: initial support for kustomize+https import scheme Aug 4, 2023
@jdockerty jdockerty requested a review from mkmik August 4, 2023 15:24
@mkmik mkmik merged commit 573f3cc into main Aug 7, 2023
@mkmik mkmik deleted the feat/kustomize branch August 7, 2023 15:53
@jdockerty
Copy link
Member Author

cc: @primeroz As I know you were interested in this too 😊

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