5.4.4.4. 必須フィールドの追加
次のカスタムリソース定義 (CRD) の例では、pollInterval プロパティーが必須フィールドに変更されています。
例5.26 CRD に必須フィールドを追加する例
versions:
- name: v1alpha2
schema:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
type: object
status:
type: object
pollInterval:
type: string
type: object
required:
- pollInterval
例5.27 エラー出力の例
validating upgrade for CRD "test.example.com" failed: CustomResourceDefinition test.example.com failed upgrade safety validation. "ChangeValidator" validation failed: version "v1alpha1", field "^": new required fields added: [pollInterval]