Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

support 1.14 kubernetes cluster #16

Closed
draveness opened this issue Apr 28, 2020 · 10 comments
Closed

support 1.14 kubernetes cluster #16

draveness opened this issue Apr 28, 2020 · 10 comments

Comments

@draveness
Copy link

draveness commented Apr 28, 2020

When I apply all the crds with the following commands follow the instruction in the README:

$ kubectl apply -f crds/

customresourcedefinition.apiextensions.k8s.io/applicationconfigurations.core.oam.dev created
customresourcedefinition.apiextensions.k8s.io/containerizedworkloads.core.oam.dev created
customresourcedefinition.apiextensions.k8s.io/manualscalertraits.core.oam.dev created
customresourcedefinition.apiextensions.k8s.io/scopedefinitions.core.oam.dev created
customresourcedefinition.apiextensions.k8s.io/traitdefinitions.core.oam.dev created
customresourcedefinition.apiextensions.k8s.io/workloaddefinitions.core.oam.dev created
error: error validating "crds/core.oam.dev_components.yaml": error validating data: [ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.properties.workload): unknown field "x-kubernetes-embedded-resource" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps, ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.properties.workload): unknown field "x-kubernetes-preserve-unknown-fields" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps]; if you choose to ignore these errors, turn validation off with --validate=false
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-13T11:23:11Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.8-86+2a179bc0e65e24", GitCommit:"2a179bc0e65e2448bf00e6d5c2f4cc6159adf81a", GitTreeState:"clean", BuildDate:"2020-01-06T06:59:25Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
@ryanzhang-oss
Copy link
Collaborator

ryanzhang-oss commented Apr 28, 2020 via email

@draveness
Copy link
Author

Do I need to update the server to 1.15+?

@draveness
Copy link
Author

What is your k8s version? Sent from my T-Mobile 4G LTE Device

________________________________ From: Draven notifications@github.com Sent: Monday, April 27, 2020 8:15:22 PM To: crossplane/oam-kubernetes-runtime oam-kubernetes-runtime@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [crossplane/oam-kubernetes-runtime] Get Started Part in the README is broken? (#16) When I apply all the crds with the following commands follow the instruction in the README: $ kubectl apply -f crds/ customresourcedefinition.apiextensions.k8s.io/applicationconfigurations.core.oam.dev created customresourcedefinition.apiextensions.k8s.io/containerizedworkloads.core.oam.dev created customresourcedefinition.apiextensions.k8s.io/manualscalertraits.core.oam.dev created customresourcedefinition.apiextensions.k8s.io/scopedefinitions.core.oam.dev created customresourcedefinition.apiextensions.k8s.io/traitdefinitions.core.oam.dev created customresourcedefinition.apiextensions.k8s.io/workloaddefinitions.core.oam.dev created error: error validating "crds/core.oam.dev_components.yaml": error validating data: [ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.properties.workload): unknown field "x-kubernetes-embedded-resource" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps, ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.properties.workload): unknown field "x-kubernetes-preserve-unknown-fields" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps]; if you choose to ignore these errors, turn validation off with --validate=false — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub<#16>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AODXOHAYWM3G52REV4WC2QDROZC4VANCNFSM4MSOONEQ.

Thanks for the reply, I just added the kubectl version output.

@ryanzhang-oss
Copy link
Collaborator

Do I need to update the server to 1.15+?

yes, I would recommend 1.17

@draveness
Copy link
Author

Do I need to update the server to 1.15+?

yes, I would recommend 1.17

Thanks but all of our clusters are using 1.14 and won’t update till the end of this year?

@resouer
Copy link
Contributor

resouer commented May 1, 2020

@draveness x-kubernetes-embedded-resource is essential for defining embedded objects in Kubernetes. It's KEP is: https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/20190425-structural-openapi.md, and implementation PRs are: kubernetes/kubernetes#77207, kubernetes/kubernetes#78788

Not sure if you can cherry pick them into your cluster?

In the practice of Alibaba, we keep our web-scale cluster up-to-date with upstream with 2 releases lag, e.g. we currently run 1.16 in Alibaba and we upgrade the cluster every 6 months. Otherwise, you will never be able to leverage community features as K8s only maintain 3 latest releases. That being said, it's common for us to cherry pick upstream PRs to fix CVE or critical issues.

@draveness
Copy link
Author

@draveness x-kubernetes-embedded-resource is essential for defining embedded objects in Kubernetes. It's KEP is: https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/20190425-structural-openapi.md, and implementation PRs are: kubernetes/kubernetes#77207, kubernetes/kubernetes#78788

Not sure if you can cherry pick them into your cluster?

In the practice of Alibaba, we keep our web-scale cluster up-to-date with upstream with 2 releases lag, e.g. we currently run 1.16 in Alibaba and we upgrade the cluster every 6 months. Otherwise, you will never be able to leverage community features as K8s only maintain 3 latest releases. That being said, it's common for us to cherry pick upstream PRs to fix CVE or critical issues.

I think I'll build the abstractions first before cherry pick these commits into our cluster since it would be problematic to do this in the production cluster. And I use the following command as a workaround to install the charts, and currently it could be the trick...

$ helm template ... | kubectl apply --validate=false -f -

BTW: We upgrade the cluster once a year by 4 releases.

@resouer
Copy link
Contributor

resouer commented May 1, 2020

BTW: We upgrade the cluster once a year by 4 releases.

I was shocked for a second to know this ...

@draveness
Copy link
Author

BTW: We upgrade the cluster once a year by 4 releases.

I was shocked for a second to know this ...

+1 🤣

@draveness
Copy link
Author

/close

Since we have a workaround for this before 1.15.

@draveness draveness changed the title Get Started Part in the README is broken? Getting Started Part in the README is broken? May 1, 2020
@draveness draveness changed the title Getting Started Part in the README is broken? support 1.14 kubernetes cluster May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants