From e8e5567c6050164e286347ed2bd876c005f3ff05 Mon Sep 17 00:00:00 2001 From: lauk001 Date: Mon, 20 Nov 2023 09:01:30 +0800 Subject: [PATCH] Add crd user-defined resource configurations --- .../housekeeper/housekeeper.io_updates.yaml | 62 +++++++++++++++++++ .../config/crd/housekeeper.io_updates.yaml | 2 +- 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/data/data/housekeeper/housekeeper.io_updates.yaml b/data/data/housekeeper/housekeeper.io_updates.yaml index e69de29..5caf412 100644 --- a/data/data/housekeeper/housekeeper.io_updates.yaml +++ b/data/data/housekeeper/housekeeper.io_updates.yaml @@ -0,0 +1,62 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: updates.housekeeper.io +spec: + group: housekeeper.io + names: + kind: Update + listKind: UpdateList + plural: updates + singular: update + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Update is the Schema for the updates API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: UpdateSpec defines the desired state of Update + properties: + kubeVersion: + description: 'The version used to upgrade k8s' + type: string + osImageURL: + description: 'The image url used to upgrade OS' + type: string + evictPodForce: + description: 'If true, force evict the pod' + type: boolean + maxUnavailable: + description: 'Number of nodes that are being upgraded at the same time' + type: integer + required: + - kubeVersion + - osImageURL + - evictPodForce + - maxUnavailable + type: object + status: + description: UpdateStatus defines the observed state of Update + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/docs/user_guide/housekeeper/config/crd/housekeeper.io_updates.yaml b/docs/user_guide/housekeeper/config/crd/housekeeper.io_updates.yaml index d8aed5b..e5d7bf8 100644 --- a/docs/user_guide/housekeeper/config/crd/housekeeper.io_updates.yaml +++ b/docs/user_guide/housekeeper/config/crd/housekeeper.io_updates.yaml @@ -45,7 +45,7 @@ spec: description: 'If true, force evict the pod' type: boolean maxUnavailable: - description: 'If true, force evict the pod' + description: 'Number of nodes that are being upgraded at the same time' type: integer required: - kubeVersion -- Gitee