0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

OpenShift 4.7 で Using non-groupfied API resources is deprecated and will be removed in a future release

Posted at

現象

既存のyamlをOpenShift4.7で利用したところ、

Using non-groupfied API resources is deprecated and will be removed in a future release, update apiVersion to "xxx/v1" for your resource

というWarning。リソースは問題なく作成されますが。
以下はImageStreamの例ですが、BuildConfig、DeploymentConfigも同様に。

$ oc create -f lab02-is.yaml
W0524 02:13:07.418890     744 shim_kubectl.go:55] Using non-groupfied API resources is deprecated and will be removed in a future release, update apiVersion to "image.openshift.io/v1" for your resource
imagestream.image.openshift.io/ocsample-lab02-is created
$ 

OCP 4.7 Deprecated features

リリースノートにありました
https://docs.openshift.com/container-platform/4.7/release_notes/ocp-4-7-release-notes.html#ocp-4-7-apiversion-v1

Currently, oc fixes apiVersion in YAML or JSON resource files OpenShift Container Platform resources from v1 to the correct value for the object. For example, v1 is corrected to apps.openshift.io/v1 for DeploymentConfig objects. This behavior is deprecated and is planned for removal in a future release, and every resource that includes *.openshift.io must match the apiVersion value found in the API index.

#修正
各yamlで以下のように修正することで、Warningなくなりました

修正前 修正後
ImageStream apiVersion: v1 apiVersion: image.openshift.io/v1
BuildConfig apiVersion: v1 apiVersion: build.openshift.io/v1
DeploymentConfig apiVersion: v1 apiVersion: apps.openshift.io/v1

現状ocコマンドがapiVersion: v1apiVersion: image.openshift.io/v1などに適宜変換してくれますが、将来的に変換機能はなくなりますよ、ということで、前述 API index にある「API group」の値を指定してやりましょう、ということでした。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?