$ kubectl apply -f config/samples/apps_v2_application.yaml
Error from server: error when retrieving current configuration of:
Resource: "apps.tanlay.com/v2, Resource=applications", GroupVersionKind: "apps.tanlay.com/v2, Kind=Application"
Name: "nginx-sample", Namespace: "default"
from server for: "config/samples/apps_v2_application.yaml": conversion webhook for apps.tanlay.com/v1, Kind=Application failed: the server could not find the requested resource
api/v2/application_types.go文件
// 只修改了ApplicationSpec结构体的Deployment字段为Workflow,其他和v1版本一致,
// 只在v1版本增加了持久化 //+kubebuilder:storageversion
type ApplicationSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
Workflow v1.DeploymentTemplate `json:"workflow,omitempty"`
Service v1.ServiceTemplate `json:"service,omitempty"`
}
报错如下:
api/v2/application_types.go文件