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

Refactor kustomize experiment #4839

Closed
wants to merge 4 commits into from

Conversation

gansheer
Copy link
Contributor

This is an experiment to refactor and simplify kustomize installations.

I am creating this PR to check what is the impact of the removals of code.

Don't hesitate to give your feedback but keep in mind this is very much a work in progress 😸 .

Release Note

NONE

@gansheer
Copy link
Contributor Author

gansheer commented Oct 20, 2023

@squakez @oscerd could one of you trigger the e2e tests please 🙏

Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

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

Good work. A few comments you may want to consider, but, in general I think it's the correct path.

kubectl kustomize <path/to/localrepo/install/overlays/openshift | kubectl create -f -
```

To ensure the `IntegrationPlatform` custom resource is created add in the `kustomization.yaml`:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it the only option we need to declare? in such case, I think it would be best to make a default value ootb.

* Set the build strategy
* Set the build order strategy
* Set how long the build process can last
* Set how long the catalogtool image build can last
Copy link
Contributor

Choose a reason for hiding this comment

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

It's deprecated, so, we can remove it.


First create a new kustomization from the wanted version (kubernetes or openshift) in the repository:
```sh
kustomize create --resources https://github.com/apache/camel-k.git/install/overlays/kubernetes\?ref\=exp/kustomize_structure
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO, this one should be a separate chapter for user customization. We should not require anything but kubectl for a immediate user experiente. We miss a quickstart where the user run something like: # Build from github kubectl kustomize https://github.com/kubernetes-sigs/kustomize.git/examples/helloWorld?ref=v1.0.6 | kubectl create -f where, if it's the case the use can choose between Kubernetes and Openshift, withouth knowing anything about overlays. What I mean is that we provide 2 procedures:

  • Kubernetes installation: kubectl kustomize https://github.com/apache/camel-k.git/install/overlays/kubernetes | kubectl create -f
  • Openshift installation: kubectl kustomize https://github.com/apache/camel-k.git/install/overlays/openshift | kubectl create -f

kubectl kustomize https://github.com/apache/camel-k/kustomize/overlays/kubernetes | kubectl create -f -
```

NOTE: to use a different branch add the parameter "ref" to the github repository URL.
Copy link
Contributor

Choose a reason for hiding this comment

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

put an example like https://github.com/apache/camel-k/kustomize/overlays/kubernetes?ref=main


To run from remote github repository:
```sh
kubectl kustomize https://github.com/apache/camel-k/kustomize/overlays/kubernetes | kubectl create -f -
Copy link
Contributor

Choose a reason for hiding this comment

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

With all examples, we should specify the ref in order to point to the latest released version. We need to update the release script in order to update the documentation when we release (could be a follow up issue though).


### Minikube

You can easilly configure minikube with the registry addon.
Copy link
Contributor

Choose a reason for hiding this comment

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

We miss the instruction to enable the addon on the minikube.

First get the internal registry service IP from minikube :

```sh
export KAMEL_REGISTRY_ADDRESS="$(kubectl get service --selector "kubernetes.io/minikube-addons"="registry" --namespace kube-system -o=jsonpath='{.items[0].spec.clusterIP}')"
Copy link
Contributor

Choose a reason for hiding this comment

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

For minikube we may not required this any longer. There was some development in the past to enable KEP-1755: #2696 which is, being able to detect any local registry. It would be nice to try without it and, if it works, remove the registry setting part.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I will check this. This explains the "placeholder" namespace value I saw in the files.

Copy link
Contributor

github-actions bot commented Feb 8, 2024

This PR has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants