zncdatadev / hive-operator

Operator for Apache Hive
Apache License 2.0
5 stars 5 forks source link

[Draft]: Support go 1.30 and update golang1.22.x #69

Open whg517 opened 2 months ago

whg517 commented 2 months ago

Now that kubernetes 1.30 has been released, while bringing a lot of new features, it also requires golang's environment to be 1.22. Start supporting k8s 1.30 now.

Due to the need to upgrade to golang 1.22 upon the introduction of k8s dependencies, the development environment will be upgraded to 1.22 and the related projects will be upgraded simultaneously.

In support of k8s through e2e check tests, the current e2e test coverage to k8s versions 1.26 and 1.27.

whg517 commented 2 months ago

when execute make install in k8s 1.30, CRD can not install to cluster.

@whg517 ➜ /workspaces/hive-operator (feat/upgrade-go1.22) $ make install
test -s /workspaces/hive-operator/bin/controller-gen && /workspaces/hive-operator/bin/controller-gen --version | grep -q v0.15.0 || \
GOBIN=/workspaces/hive-operator/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.15.0
/workspaces/hive-operator/bin/controller-gen rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook paths="./..." output:crd:artifacts:config=config/crd/bases
test -s /workspaces/hive-operator/bin/kustomize || { curl -Ss "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash -s -- 5.4.1 /workspaces/hive-operator/bin; }
# add --server-side=true to fix "is invalid: metadata.annotations: Too long: must have at most 262144 bytes"
# ref: https://stackoverflow.com/a/70083579
/workspaces/hive-operator/bin/kustomize build config/crd | kubectl apply --server-side=true -f -
The CustomResourceDefinition "hivemetastores.zncdata.dev" is invalid: 
* spec.validation.openAPIV3Schema.properties[spec].properties[metastore].properties[podOverride].properties[spec].properties[hostAliases].items.properties[ip].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
* spec.validation.openAPIV3Schema.properties[spec].properties[metastore].properties[podOverride].properties[spec].properties[imagePullSecrets].items.properties[name].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
* spec.validation.openAPIV3Schema.properties[spec].properties[metastore].properties[roleGroups].additionalProperties.properties[podOverride].properties[spec].properties[imagePullSecrets].items.properties[name].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
* spec.validation.openAPIV3Schema.properties[spec].properties[metastore].properties[roleGroups].additionalProperties.properties[podOverride].properties[spec].properties[hostAliases].items.properties[ip].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
make: *** [Makefile:164: install] Error 1

The relevant problems have been feedbacks in the k8s community, and no effective solutions have been found. After the community has resolved the issue, the discussion can continue.

1.30 adds tags that break imagePullSecrets #124540

whg517 commented 2 months ago

when execute make install in k8s 1.30, CRD can not install to cluster.

@whg517 ➜ /workspaces/hive-operator (feat/upgrade-go1.22) $ make install
test -s /workspaces/hive-operator/bin/controller-gen && /workspaces/hive-operator/bin/controller-gen --version | grep -q v0.15.0 || \
GOBIN=/workspaces/hive-operator/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.15.0
/workspaces/hive-operator/bin/controller-gen rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook paths="./..." output:crd:artifacts:config=config/crd/bases
test -s /workspaces/hive-operator/bin/kustomize || { curl -Ss "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash -s -- 5.4.1 /workspaces/hive-operator/bin; }
# add --server-side=true to fix "is invalid: metadata.annotations: Too long: must have at most 262144 bytes"
# ref: https://stackoverflow.com/a/70083579
/workspaces/hive-operator/bin/kustomize build config/crd | kubectl apply --server-side=true -f -
The CustomResourceDefinition "hivemetastores.zncdata.dev" is invalid: 
* spec.validation.openAPIV3Schema.properties[spec].properties[metastore].properties[podOverride].properties[spec].properties[hostAliases].items.properties[ip].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
* spec.validation.openAPIV3Schema.properties[spec].properties[metastore].properties[podOverride].properties[spec].properties[imagePullSecrets].items.properties[name].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
* spec.validation.openAPIV3Schema.properties[spec].properties[metastore].properties[roleGroups].additionalProperties.properties[podOverride].properties[spec].properties[imagePullSecrets].items.properties[name].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
* spec.validation.openAPIV3Schema.properties[spec].properties[metastore].properties[roleGroups].additionalProperties.properties[podOverride].properties[spec].properties[hostAliases].items.properties[ip].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
make: *** [Makefile:164: install] Error 1

The relevant problems have been feedbacks in the k8s community, and no effective solutions have been found. After the community has resolved the issue, the discussion can continue.

1.30 adds tags that break imagePullSecrets #124540

This is issue is fix, we will test again when k8s core package next version.