eiffel-community / eiffel-easy2use

A sandbox to be used to try out the Eiffel protocol and related services
Apache License 2.0
10 stars 19 forks source link

Update k8s api group versions in helm charts #76

Closed sankar-palanivel closed 1 year ago

sankar-palanivel commented 2 years ago

Applicable Issues

72

Description of the Change

The Eiffel easy2use installation on local minikube cluster is failing because of unsupported API group versions defined in the helm charts used in this deployment.

This PR updates,

  • Ingress and IngressClass resources have graduated to networking.k8s.io/v1.
  • spec.backend -> spec.defaultBackend
  • serviceName -> service.name
  • servicePort -> service.port.name (for string values)
  • servicePort -> service.port.number (for numeric values)
  • pathType no longer has a default value in v1, it must be specified
  • path is no longer required to be a valid regular expression

Alternate Designs

N/A

Benefits

This will allow users to deploy the Eiffel easy2use sandbox setup on local minikube k8s clsuter

Possible Drawbacks

N/A

Sign-off

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

Signed-off-by: Sankar Palanivel sankar.palanivel@est.tech

sankar-palanivel commented 2 years ago

Maybe I have misunderstood something but shouldn't we step the version number in the file name if we change these files?

I didn't update the version number in these helm chart file namess, as I didn't change the version of Eiffel, Jenkins, MongoDB & RabbitMQ packages used in these charts.

m-linner-ericsson commented 2 years ago

I didn't update the version number in these helm chart file namess, as I didn't change the version of Eiffel, Jenkins, MongoDB & RabbitMQ packages used in these charts.

  • Updated the k8s API version used for the kind: Deployment from extensions/v1beta1 to apps/v1 in jenkins-0.18.0.tgz
  • Updated the k8s API version used for the kind: Ingress from extensions/v1beta1 to networking.k8s.io/v1 and some of its parameter related to the API version change in eiffel-2.0.0.tgz
  • Updated the k8s API version used for the kind: PodDisruptionBudget from policy/v1beta1 to policy/v1 in mongodb-9.3.1.tgz
  • Updated the k8s API version used for the kind: PodDisruptionBudget from policy/v1beta1 to policy/v1 in rabbitmq-7.7.1.tgz

I would still think we should step the versions as we have changed the helm charts. Maybe just step the minor version?

pef-ericsson commented 1 year ago

Test Eiffel easy2use bundles deploying them on a cluster

Executing command

cmd = ./easy2use -t Kubernetes -d <_domain_> -n <_namespace_> -e </path/to/easy2use/bundles> start Eiffel -y

Current master branch code

The cmd returns the error 'Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Ingress" in version "networking.k8s.io/v1beta1"' when it comes to install the eiffel-rabbitmq-<_namespace_>.

PR changes code

The cmd does not return any error. All pods run normally.

Test environment

Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.8", GitCommit:"4a3b558c52eb6995b3c5c1db5e54111bd0645a64", GitTreeState:"clean", BuildDate:"2021-12-15T14:52:11Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.17", GitCommit:"a7736eaf34d823d7652415337ac0ad06db9167fc", GitTreeState:"clean", BuildDate:"2022-12-08T11:42:04Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}