From abd94e22a125f89fbb82761a1b94cb32af583b35 Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Mon, 14 Oct 2024 13:55:29 -0700 Subject: [PATCH 1/4] Add model API --- api/model/v1alpha1/model_types.go | 110 + api/model/v1alpha1/zz_generated.deepcopy.go | 102 + .../bases/model.aibrix.ai_modeladapters.yaml | 3 + config/crd/bases/model.aibrix.ai_models.yaml | 3684 +++++++++++++++++ ...hestration.aibrix.ai_rayclusterfleets.yaml | 462 +++ ...ation.aibrix.ai_rayclusterreplicasets.yaml | 462 +++ config/crd/kustomization.yaml | 1 + config/rbac/kustomization.yaml | 2 + config/rbac/model_model_editor_role.yaml | 27 + config/rbac/model_model_viewer_role.yaml | 23 + config/rbac/role.yaml | 28 + docs/tutorial/basemodel/base_model.yaml | 50 + .../model/v1alpha1/model.go | 218 + .../model/v1alpha1/modelspec.go | 60 + .../model/v1alpha1/modelstatus.go | 54 + pkg/client/applyconfiguration/utils.go | 6 + .../typed/model/v1alpha1/fake/fake_model.go | 188 + .../model/v1alpha1/fake/fake_model_client.go | 4 + .../model/v1alpha1/generated_expansion.go | 2 + .../versioned/typed/model/v1alpha1/model.go | 255 ++ .../typed/model/v1alpha1/model_client.go | 5 + .../informers/externalversions/generic.go | 2 + .../model/v1alpha1/interface.go | 7 + .../externalversions/model/v1alpha1/model.go | 89 + .../model/v1alpha1/expansion_generated.go | 8 + pkg/client/listers/model/v1alpha1/model.go | 98 + pkg/controller/controller.go | 2 + pkg/controller/model/model_controller.go | 461 +++ 28 files changed, 6413 insertions(+) create mode 100644 api/model/v1alpha1/model_types.go create mode 100644 config/crd/bases/model.aibrix.ai_models.yaml create mode 100644 config/rbac/model_model_editor_role.yaml create mode 100644 config/rbac/model_model_viewer_role.yaml create mode 100644 docs/tutorial/basemodel/base_model.yaml create mode 100644 pkg/client/applyconfiguration/model/v1alpha1/model.go create mode 100644 pkg/client/applyconfiguration/model/v1alpha1/modelspec.go create mode 100644 pkg/client/applyconfiguration/model/v1alpha1/modelstatus.go create mode 100644 pkg/client/clientset/versioned/typed/model/v1alpha1/fake/fake_model.go create mode 100644 pkg/client/clientset/versioned/typed/model/v1alpha1/model.go create mode 100644 pkg/client/informers/externalversions/model/v1alpha1/model.go create mode 100644 pkg/client/listers/model/v1alpha1/model.go create mode 100644 pkg/controller/model/model_controller.go diff --git a/api/model/v1alpha1/model_types.go b/api/model/v1alpha1/model_types.go new file mode 100644 index 00000000..152eb2b4 --- /dev/null +++ b/api/model/v1alpha1/model_types.go @@ -0,0 +1,110 @@ +/* +Copyright 2024 The Aibrix Team. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +// ModelSpec defines the desired state of Model +type ModelSpec struct { + + // Engine to be used for the server process. + // +kubebuilder:validation:Enum=VLLM + Engine string `json:"engine"` + + // Template describes the pods that will be created. + // +kubebuilder:validation:Required + Template v1.PodTemplateSpec `json:"template"` + + // Replicas is the desired number of replicas of model + // +optional + // +kubebuilder:default=1 + Replicas *int32 `json:"replicas,omitempty"` +} + +// ModelPhase is a string representation of the Model lifecycle phase. +type ModelPhase string + +const ( + // ModelPending means the CR has been created and that's the initial status + ModelPending ModelPhase = "Pending" + // ModelDeploying means the Model is being deployed + ModelDeploying ModelPhase = "Deploying" + // ModelResourceCreated means the model owned resources have been created + ModelResourceCreated ModelPhase = "ResourceCreated" + // ModelRunning means Model has been running on the pod + ModelRunning ModelPhase = "Running" + // ModelFailed means Model has terminated in a failure + ModelFailed ModelPhase = "Failed" + // ModelUnknown means Model clean up some stable resources + ModelUnknown ModelPhase = "Unknown" +) + +// ModelStatus defines the observed state of Model +type ModelStatus struct { + // Phase is a simple, high-level summary of where the Model is in its lifecycle + // Phase maps to latest status.conditions.type + // +optional + Phase ModelPhase `json:"phase,omitempty"` + // Conditions represents the observation of a model 's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty"` +} + +type ModelConditionType string + +const ( + ModelConditionTypeInitialized ModelConditionType = "Initialized" + ModelConditionTypeDeployed ModelConditionType = "Deployed" + ModelConditionTypeResourceCreated ModelConditionType = "ResourceCreated" + ModelConditionReady ModelConditionType = "Ready" +) + +// +genclient +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Model is the Schema for the models API +type Model struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ModelSpec `json:"spec,omitempty"` + Status ModelStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ModelList contains a list of Model +type ModelList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Model `json:"items"` +} + +func init() { + SchemeBuilder.Register(&Model{}, &ModelList{}) +} diff --git a/api/model/v1alpha1/zz_generated.deepcopy.go b/api/model/v1alpha1/zz_generated.deepcopy.go index fc343849..88bca713 100644 --- a/api/model/v1alpha1/zz_generated.deepcopy.go +++ b/api/model/v1alpha1/zz_generated.deepcopy.go @@ -26,6 +26,33 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Model) DeepCopyInto(out *Model) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Model. +func (in *Model) DeepCopy() *Model { + if in == nil { + return nil + } + out := new(Model) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Model) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ModelAdapter) DeepCopyInto(out *ModelAdapter) { *out = *in @@ -148,3 +175,78 @@ func (in *ModelAdapterStatus) DeepCopy() *ModelAdapterStatus { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ModelList) DeepCopyInto(out *ModelList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Model, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelList. +func (in *ModelList) DeepCopy() *ModelList { + if in == nil { + return nil + } + out := new(ModelList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ModelList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ModelSpec) DeepCopyInto(out *ModelSpec) { + *out = *in + in.Template.DeepCopyInto(&out.Template) + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelSpec. +func (in *ModelSpec) DeepCopy() *ModelSpec { + if in == nil { + return nil + } + out := new(ModelSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ModelStatus) DeepCopyInto(out *ModelStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelStatus. +func (in *ModelStatus) DeepCopy() *ModelStatus { + if in == nil { + return nil + } + out := new(ModelStatus) + in.DeepCopyInto(out) + return out +} diff --git a/config/crd/bases/model.aibrix.ai_modeladapters.yaml b/config/crd/bases/model.aibrix.ai_modeladapters.yaml index 29843cb0..7c2a0674 100644 --- a/config/crd/bases/model.aibrix.ai_modeladapters.yaml +++ b/config/crd/bases/model.aibrix.ai_modeladapters.yaml @@ -37,6 +37,7 @@ spec: credentialsSecretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -53,11 +54,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/config/crd/bases/model.aibrix.ai_models.yaml b/config/crd/bases/model.aibrix.ai_models.yaml new file mode 100644 index 00000000..024f1b4e --- /dev/null +++ b/config/crd/bases/model.aibrix.ai_models.yaml @@ -0,0 +1,3684 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: models.model.aibrix.ai +spec: + group: model.aibrix.ai + names: + kind: Model + listKind: ModelList + plural: models + singular: model + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + engine: + enum: + - VLLM + type: string + replicas: + default: 1 + format: int32 + type: integer + template: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + automountServiceAccountToken: + type: boolean + containers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + targetContainerName: + type: string + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + x-kubernetes-list-map-keys: + - ip + x-kubernetes-list-type: map + hostIPC: + type: boolean + hostNetwork: + type: boolean + hostPID: + type: boolean + hostUsers: + type: boolean + hostname: + type: string + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + initContainers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + nodeName: + type: string + nodeSelector: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: atomic + os: + properties: + name: + type: string + required: + - name + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + preemptionPolicy: + type: string + priority: + format: int32 + type: integer + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + x-kubernetes-list-type: atomic + resourceClaims: + items: + properties: + name: + type: string + source: + properties: + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + restartPolicy: + type: string + runtimeClassName: + type: string + schedulerName: + type: string + schedulingGates: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + securityContext: + properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceAccount: + type: string + serviceAccountName: + type: string + setHostnameAsFQDN: + type: boolean + shareProcessNamespace: + type: boolean + subdomain: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + properties: + volumeClaimTemplate: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + wwids: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + x-kubernetes-list-type: atomic + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - containers + type: object + type: object + required: + - engine + - template + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + phase: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crd/bases/orchestration.aibrix.ai_rayclusterfleets.yaml b/config/crd/bases/orchestration.aibrix.ai_rayclusterfleets.yaml index 803dee09..69cfd105 100644 --- a/config/crd/bases/orchestration.aibrix.ai_rayclusterfleets.yaml +++ b/config/crd/bases/orchestration.aibrix.ai_rayclusterfleets.yaml @@ -53,11 +53,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -121,6 +123,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -159,6 +162,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -177,6 +181,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -187,6 +192,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -236,16 +242,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -310,6 +327,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -366,6 +385,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic externalName: type: string externalTrafficPolicy: @@ -390,6 +410,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic ports: items: properties: @@ -437,6 +458,8 @@ spec: type: integer type: object type: object + trafficDistribution: + type: string type: type: string type: object @@ -513,6 +536,7 @@ spec: x-kubernetes-list-type: atomic type: object type: array + x-kubernetes-list-type: atomic type: object type: object type: object @@ -568,11 +592,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -584,11 +610,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -599,6 +627,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -615,11 +644,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -631,14 +662,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -664,11 +698,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -698,11 +734,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -713,6 +751,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -726,6 +765,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -742,11 +782,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -776,11 +818,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -791,12 +835,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -818,11 +864,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -852,11 +900,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -867,6 +917,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -880,6 +931,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -896,11 +948,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -930,11 +984,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -945,12 +1001,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object automountServiceAccountToken: @@ -962,10 +1020,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -980,6 +1040,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -1018,6 +1079,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -1030,12 +1092,16 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -1046,6 +1112,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -1053,6 +1120,7 @@ spec: x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -1067,6 +1135,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -1084,6 +1153,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1125,6 +1195,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -1142,6 +1213,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1184,6 +1256,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -1214,6 +1287,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1288,6 +1362,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -1318,6 +1393,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1408,16 +1484,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -1473,6 +1560,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -1503,6 +1591,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1565,6 +1654,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -1576,6 +1668,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -1585,18 +1679,25 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map dnsConfig: properties: nameservers: items: type: string type: array + x-kubernetes-list-type: atomic options: items: properties: @@ -1606,10 +1707,12 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic searches: items: type: string type: array + x-kubernetes-list-type: atomic type: object dnsPolicy: type: string @@ -1622,10 +1725,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -1640,6 +1745,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -1678,6 +1784,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -1690,12 +1797,16 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -1706,6 +1817,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -1713,6 +1825,7 @@ spec: x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -1727,6 +1840,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -1744,6 +1858,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1785,6 +1900,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -1802,6 +1918,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1844,6 +1961,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -1874,6 +1992,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1948,6 +2067,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -1978,6 +2098,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2068,16 +2189,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -2133,6 +2265,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -2163,6 +2296,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2227,6 +2361,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -2238,6 +2375,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -2247,12 +2386,18 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map hostAliases: items: properties: @@ -2260,10 +2405,16 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic ip: type: string + required: + - ip type: object type: array + x-kubernetes-list-map-keys: + - ip + x-kubernetes-list-type: map hostIPC: type: boolean hostNetwork: @@ -2278,10 +2429,14 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map initContainers: items: properties: @@ -2289,10 +2444,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -2307,6 +2464,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -2345,6 +2503,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -2357,12 +2516,16 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -2373,6 +2536,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -2380,6 +2544,7 @@ spec: x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -2394,6 +2559,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -2411,6 +2577,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2452,6 +2619,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -2469,6 +2637,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2511,6 +2680,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -2541,6 +2711,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2615,6 +2786,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -2645,6 +2817,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2735,16 +2908,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -2800,6 +2984,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -2830,6 +3015,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2892,6 +3078,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -2903,6 +3092,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -2912,12 +3103,18 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map nodeName: type: string nodeSelector: @@ -2956,6 +3153,7 @@ spec: - conditionType type: object type: array + x-kubernetes-list-type: atomic resourceClaims: items: properties: @@ -2995,6 +3193,15 @@ spec: x-kubernetes-list-type: map securityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -3033,6 +3240,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -3045,6 +3253,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -3086,6 +3295,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic topologySpreadConstraints: items: properties: @@ -3102,11 +3312,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3195,6 +3407,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic path: type: string readOnly: @@ -3204,6 +3417,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3221,6 +3435,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3249,7 +3464,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -3264,6 +3481,7 @@ spec: nodePublishSecretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3319,6 +3537,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic type: object emptyDir: properties: @@ -3360,6 +3579,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -3419,11 +3639,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3456,10 +3678,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic wwids: items: type: string type: array + x-kubernetes-list-type: atomic type: object flexVolume: properties: @@ -3476,6 +3700,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3556,11 +3781,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic readOnly: type: boolean secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3637,11 +3864,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3676,7 +3905,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -3722,6 +3953,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic type: object secret: properties: @@ -3740,7 +3972,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -3760,6 +3994,7 @@ spec: type: object type: object type: array + x-kubernetes-list-type: atomic type: object quobyte: properties: @@ -3791,6 +4026,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic pool: type: string readOnly: @@ -3798,6 +4034,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3820,6 +4057,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3858,6 +4096,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic optional: type: boolean secretName: @@ -3872,6 +4111,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3897,6 +4137,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map required: - containers type: object @@ -3991,11 +4234,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -4007,11 +4252,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -4022,6 +4269,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -4038,11 +4286,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -4054,14 +4304,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -4087,11 +4340,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4121,11 +4376,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4136,6 +4393,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -4149,6 +4407,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -4165,11 +4424,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4199,11 +4460,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4214,12 +4477,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -4241,11 +4506,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4275,11 +4542,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4290,6 +4559,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -4303,6 +4573,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -4319,11 +4590,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4353,11 +4626,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4368,12 +4643,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object automountServiceAccountToken: @@ -4385,10 +4662,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -4403,6 +4682,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -4441,6 +4721,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -4453,12 +4734,16 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -4469,6 +4754,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -4476,6 +4762,7 @@ spec: x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -4490,6 +4777,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -4507,6 +4795,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4548,6 +4837,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -4565,6 +4855,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4607,6 +4898,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -4637,6 +4929,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4711,6 +5004,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -4741,6 +5035,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4831,16 +5126,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -4896,6 +5202,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -4926,6 +5233,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4988,6 +5296,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -4999,6 +5310,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -5008,18 +5321,25 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map dnsConfig: properties: nameservers: items: type: string type: array + x-kubernetes-list-type: atomic options: items: properties: @@ -5029,10 +5349,12 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic searches: items: type: string type: array + x-kubernetes-list-type: atomic type: object dnsPolicy: type: string @@ -5045,10 +5367,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -5063,6 +5387,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -5101,6 +5426,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -5113,12 +5439,16 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -5129,6 +5459,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -5136,6 +5467,7 @@ spec: x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -5150,6 +5482,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -5167,6 +5500,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5208,6 +5542,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -5225,6 +5560,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5267,6 +5603,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -5297,6 +5634,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5371,6 +5709,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -5401,6 +5740,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5491,16 +5831,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -5556,6 +5907,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -5586,6 +5938,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5650,6 +6003,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -5661,6 +6017,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -5670,12 +6028,18 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map hostAliases: items: properties: @@ -5683,10 +6047,16 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic ip: type: string + required: + - ip type: object type: array + x-kubernetes-list-map-keys: + - ip + x-kubernetes-list-type: map hostIPC: type: boolean hostNetwork: @@ -5701,10 +6071,14 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map initContainers: items: properties: @@ -5712,10 +6086,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -5730,6 +6106,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -5768,6 +6145,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -5780,12 +6158,16 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -5796,6 +6178,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -5803,6 +6186,7 @@ spec: x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -5817,6 +6201,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -5834,6 +6219,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5875,6 +6261,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -5892,6 +6279,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5934,6 +6322,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -5964,6 +6353,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -6038,6 +6428,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -6068,6 +6459,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -6158,16 +6550,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -6223,6 +6626,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -6253,6 +6657,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -6315,6 +6720,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -6326,6 +6734,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -6335,12 +6745,18 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map nodeName: type: string nodeSelector: @@ -6379,6 +6795,7 @@ spec: - conditionType type: object type: array + x-kubernetes-list-type: atomic resourceClaims: items: properties: @@ -6418,6 +6835,15 @@ spec: x-kubernetes-list-type: map securityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -6456,6 +6882,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -6468,6 +6895,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -6509,6 +6937,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic topologySpreadConstraints: items: properties: @@ -6525,11 +6954,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6618,6 +7049,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic path: type: string readOnly: @@ -6627,6 +7059,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -6644,6 +7077,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -6672,7 +7106,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -6687,6 +7123,7 @@ spec: nodePublishSecretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -6742,6 +7179,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic type: object emptyDir: properties: @@ -6783,6 +7221,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -6842,11 +7281,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6879,10 +7320,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic wwids: items: type: string type: array + x-kubernetes-list-type: atomic type: object flexVolume: properties: @@ -6899,6 +7342,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -6979,11 +7423,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic readOnly: type: boolean secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -7060,11 +7506,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7099,7 +7547,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -7145,6 +7595,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic type: object secret: properties: @@ -7163,7 +7614,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -7183,6 +7636,7 @@ spec: type: object type: object type: array + x-kubernetes-list-type: atomic type: object quobyte: properties: @@ -7214,6 +7668,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic pool: type: string readOnly: @@ -7221,6 +7676,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -7243,6 +7699,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -7281,6 +7738,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic optional: type: boolean secretName: @@ -7295,6 +7753,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -7320,6 +7779,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map required: - containers type: object diff --git a/config/crd/bases/orchestration.aibrix.ai_rayclusterreplicasets.yaml b/config/crd/bases/orchestration.aibrix.ai_rayclusterreplicasets.yaml index b8550307..ed510457 100644 --- a/config/crd/bases/orchestration.aibrix.ai_rayclusterreplicasets.yaml +++ b/config/crd/bases/orchestration.aibrix.ai_rayclusterreplicasets.yaml @@ -45,11 +45,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -95,6 +97,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -133,6 +136,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -151,6 +155,7 @@ spec: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -161,6 +166,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -210,16 +216,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -284,6 +301,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -340,6 +359,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic externalName: type: string externalTrafficPolicy: @@ -364,6 +384,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic ports: items: properties: @@ -411,6 +432,8 @@ spec: type: integer type: object type: object + trafficDistribution: + type: string type: type: string type: object @@ -487,6 +510,7 @@ spec: x-kubernetes-list-type: atomic type: object type: array + x-kubernetes-list-type: atomic type: object type: object type: object @@ -542,11 +566,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -558,11 +584,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -573,6 +601,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -589,11 +618,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -605,14 +636,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -638,11 +672,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -672,11 +708,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -687,6 +725,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -700,6 +739,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -716,11 +756,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -750,11 +792,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -765,12 +809,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -792,11 +838,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -826,11 +874,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -841,6 +891,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -854,6 +905,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -870,11 +922,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -904,11 +958,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -919,12 +975,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object automountServiceAccountToken: @@ -936,10 +994,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -954,6 +1014,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -992,6 +1053,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -1004,12 +1066,16 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -1020,6 +1086,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -1027,6 +1094,7 @@ spec: x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -1041,6 +1109,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -1058,6 +1127,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1099,6 +1169,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -1116,6 +1187,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1158,6 +1230,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -1188,6 +1261,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1262,6 +1336,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -1292,6 +1367,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1382,16 +1458,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -1447,6 +1534,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -1477,6 +1565,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1539,6 +1628,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -1550,6 +1642,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -1559,18 +1653,25 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map dnsConfig: properties: nameservers: items: type: string type: array + x-kubernetes-list-type: atomic options: items: properties: @@ -1580,10 +1681,12 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic searches: items: type: string type: array + x-kubernetes-list-type: atomic type: object dnsPolicy: type: string @@ -1596,10 +1699,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -1614,6 +1719,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -1652,6 +1758,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -1664,12 +1771,16 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -1680,6 +1791,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -1687,6 +1799,7 @@ spec: x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -1701,6 +1814,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -1718,6 +1832,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1759,6 +1874,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -1776,6 +1892,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1818,6 +1935,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -1848,6 +1966,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -1922,6 +2041,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -1952,6 +2072,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2042,16 +2163,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -2107,6 +2239,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -2137,6 +2270,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2201,6 +2335,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -2212,6 +2349,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -2221,12 +2360,18 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map hostAliases: items: properties: @@ -2234,10 +2379,16 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic ip: type: string + required: + - ip type: object type: array + x-kubernetes-list-map-keys: + - ip + x-kubernetes-list-type: map hostIPC: type: boolean hostNetwork: @@ -2252,10 +2403,14 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map initContainers: items: properties: @@ -2263,10 +2418,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -2281,6 +2438,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -2319,6 +2477,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -2331,12 +2490,16 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -2347,6 +2510,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -2354,6 +2518,7 @@ spec: x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -2368,6 +2533,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -2385,6 +2551,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2426,6 +2593,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -2443,6 +2611,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2485,6 +2654,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -2515,6 +2685,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2589,6 +2760,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -2619,6 +2791,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2709,16 +2882,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -2774,6 +2958,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -2804,6 +2989,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -2866,6 +3052,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -2877,6 +3066,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -2886,12 +3077,18 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map nodeName: type: string nodeSelector: @@ -2930,6 +3127,7 @@ spec: - conditionType type: object type: array + x-kubernetes-list-type: atomic resourceClaims: items: properties: @@ -2969,6 +3167,15 @@ spec: x-kubernetes-list-type: map securityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -3007,6 +3214,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -3019,6 +3227,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -3060,6 +3269,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic topologySpreadConstraints: items: properties: @@ -3076,11 +3286,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3169,6 +3381,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic path: type: string readOnly: @@ -3178,6 +3391,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3195,6 +3409,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3223,7 +3438,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -3238,6 +3455,7 @@ spec: nodePublishSecretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3293,6 +3511,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic type: object emptyDir: properties: @@ -3334,6 +3553,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -3393,11 +3613,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3430,10 +3652,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic wwids: items: type: string type: array + x-kubernetes-list-type: atomic type: object flexVolume: properties: @@ -3450,6 +3674,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3530,11 +3755,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic readOnly: type: boolean secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3611,11 +3838,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3650,7 +3879,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -3696,6 +3927,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic type: object secret: properties: @@ -3714,7 +3946,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -3734,6 +3968,7 @@ spec: type: object type: object type: array + x-kubernetes-list-type: atomic type: object quobyte: properties: @@ -3765,6 +4000,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic pool: type: string readOnly: @@ -3772,6 +4008,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3794,6 +4031,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3832,6 +4070,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic optional: type: boolean secretName: @@ -3846,6 +4085,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -3871,6 +4111,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map required: - containers type: object @@ -3965,11 +4208,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -3981,11 +4226,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -3996,6 +4243,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: @@ -4012,11 +4260,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: items: properties: @@ -4028,14 +4278,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -4061,11 +4314,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4095,11 +4350,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4110,6 +4367,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -4123,6 +4381,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -4139,11 +4398,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4173,11 +4434,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4188,12 +4451,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: properties: @@ -4215,11 +4480,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4249,11 +4516,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4264,6 +4533,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: @@ -4277,6 +4547,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: items: properties: @@ -4293,11 +4564,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4327,11 +4600,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4342,12 +4617,14 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: type: string required: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object automountServiceAccountToken: @@ -4359,10 +4636,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -4377,6 +4656,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -4415,6 +4695,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -4427,12 +4708,16 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -4443,6 +4728,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -4450,6 +4736,7 @@ spec: x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -4464,6 +4751,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -4481,6 +4769,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4522,6 +4811,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -4539,6 +4829,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4581,6 +4872,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -4611,6 +4903,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4685,6 +4978,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -4715,6 +5009,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4805,16 +5100,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -4870,6 +5176,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -4900,6 +5207,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -4962,6 +5270,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -4973,6 +5284,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -4982,18 +5295,25 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map dnsConfig: properties: nameservers: items: type: string type: array + x-kubernetes-list-type: atomic options: items: properties: @@ -5003,10 +5323,12 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic searches: items: type: string type: array + x-kubernetes-list-type: atomic type: object dnsPolicy: type: string @@ -5019,10 +5341,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -5037,6 +5361,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -5075,6 +5400,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -5087,12 +5413,16 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -5103,6 +5433,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -5110,6 +5441,7 @@ spec: x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -5124,6 +5456,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -5141,6 +5474,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5182,6 +5516,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -5199,6 +5534,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5241,6 +5577,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -5271,6 +5608,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5345,6 +5683,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -5375,6 +5714,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5465,16 +5805,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -5530,6 +5881,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -5560,6 +5912,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5624,6 +5977,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -5635,6 +5991,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -5644,12 +6002,18 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map hostAliases: items: properties: @@ -5657,10 +6021,16 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic ip: type: string + required: + - ip type: object type: array + x-kubernetes-list-map-keys: + - ip + x-kubernetes-list-type: map hostIPC: type: boolean hostNetwork: @@ -5675,10 +6045,14 @@ spec: items: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map initContainers: items: properties: @@ -5686,10 +6060,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic command: items: type: string type: array + x-kubernetes-list-type: atomic env: items: properties: @@ -5704,6 +6080,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -5742,6 +6119,7 @@ spec: key: type: string name: + default: "" type: string optional: type: boolean @@ -5754,12 +6132,16 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map envFrom: items: properties: configMapRef: properties: name: + default: "" type: string optional: type: boolean @@ -5770,6 +6152,7 @@ spec: secretRef: properties: name: + default: "" type: string optional: type: boolean @@ -5777,6 +6160,7 @@ spec: x-kubernetes-map-type: atomic type: object type: array + x-kubernetes-list-type: atomic image: type: string imagePullPolicy: @@ -5791,6 +6175,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -5808,6 +6193,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5849,6 +6235,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object httpGet: properties: @@ -5866,6 +6253,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -5908,6 +6296,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -5938,6 +6327,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -6012,6 +6402,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -6042,6 +6433,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -6132,16 +6524,27 @@ spec: properties: allowPrivilegeEscalation: type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object capabilities: properties: add: items: type: string type: array + x-kubernetes-list-type: atomic drop: items: type: string type: array + x-kubernetes-list-type: atomic type: object privileged: type: boolean @@ -6197,6 +6600,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object failureThreshold: format: int32 @@ -6227,6 +6631,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic path: type: string port: @@ -6289,6 +6694,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map volumeMounts: items: properties: @@ -6300,6 +6708,8 @@ spec: type: string readOnly: type: boolean + recursiveReadOnly: + type: string subPath: type: string subPathExpr: @@ -6309,12 +6719,18 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map workingDir: type: string required: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map nodeName: type: string nodeSelector: @@ -6353,6 +6769,7 @@ spec: - conditionType type: object type: array + x-kubernetes-list-type: atomic resourceClaims: items: properties: @@ -6392,6 +6809,15 @@ spec: x-kubernetes-list-type: map securityContext: properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object fsGroup: format: int64 type: integer @@ -6430,6 +6856,7 @@ spec: format: int64 type: integer type: array + x-kubernetes-list-type: atomic sysctls: items: properties: @@ -6442,6 +6869,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic windowsOptions: properties: gmsaCredentialSpec: @@ -6483,6 +6911,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic topologySpreadConstraints: items: properties: @@ -6499,11 +6928,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6592,6 +7023,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic path: type: string readOnly: @@ -6601,6 +7033,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -6618,6 +7051,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -6646,7 +7080,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -6661,6 +7097,7 @@ spec: nodePublishSecretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -6716,6 +7153,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic type: object emptyDir: properties: @@ -6757,6 +7195,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: properties: apiGroup: @@ -6816,11 +7255,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6853,10 +7294,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic wwids: items: type: string type: array + x-kubernetes-list-type: atomic type: object flexVolume: properties: @@ -6873,6 +7316,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -6953,11 +7397,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic readOnly: type: boolean secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -7034,11 +7480,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -7073,7 +7521,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -7119,6 +7569,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic type: object secret: properties: @@ -7137,7 +7588,9 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic name: + default: "" type: string optional: type: boolean @@ -7157,6 +7610,7 @@ spec: type: object type: object type: array + x-kubernetes-list-type: atomic type: object quobyte: properties: @@ -7188,6 +7642,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic pool: type: string readOnly: @@ -7195,6 +7650,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -7217,6 +7673,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -7255,6 +7712,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic optional: type: boolean secretName: @@ -7269,6 +7727,7 @@ spec: secretRef: properties: name: + default: "" type: string type: object x-kubernetes-map-type: atomic @@ -7294,6 +7753,9 @@ spec: - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map required: - containers type: object diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index ce711d43..e6c5c43c 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -3,6 +3,7 @@ # It should be run by config/default resources: - bases/autoscaling.aibrix.ai_podautoscalers.yaml +- bases/model.aibrix.ai_models.yaml - bases/model.aibrix.ai_modeladapters.yaml - bases/orchestration.aibrix.ai_rayclusterreplicasets.yaml - bases/orchestration.aibrix.ai_rayclusterfleets.yaml diff --git a/config/rbac/kustomization.yaml b/config/rbac/kustomization.yaml index 6cccca10..2be3f1f7 100644 --- a/config/rbac/kustomization.yaml +++ b/config/rbac/kustomization.yaml @@ -19,6 +19,8 @@ resources: - orchestration_rayclusterfleet_viewer_role.yaml - orchestration_rayclusterreplicaset_editor_role.yaml - orchestration_rayclusterreplicaset_viewer_role.yaml +- model_model_editor_role.yaml +- model_model_viewer_role.yaml - model_modeladapter_editor_role.yaml - model_modeladapter_viewer_role.yaml - autoscaling_podautoscaler_editor_role.yaml diff --git a/config/rbac/model_model_editor_role.yaml b/config/rbac/model_model_editor_role.yaml new file mode 100644 index 00000000..664d3434 --- /dev/null +++ b/config/rbac/model_model_editor_role.yaml @@ -0,0 +1,27 @@ +# permissions for end users to edit models. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: aibrix + app.kubernetes.io/managed-by: kustomize + name: model-model-editor-role +rules: +- apiGroups: + - model.aibrix.ai + resources: + - models + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - model.aibrix.ai + resources: + - models/status + verbs: + - get diff --git a/config/rbac/model_model_viewer_role.yaml b/config/rbac/model_model_viewer_role.yaml new file mode 100644 index 00000000..216bc3eb --- /dev/null +++ b/config/rbac/model_model_viewer_role.yaml @@ -0,0 +1,23 @@ +# permissions for end users to view models. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: aibrix + app.kubernetes.io/managed-by: kustomize + name: model-model-viewer-role` +rules: +- apiGroups: + - model.aibrix.ai + resources: + - models + verbs: + - get + - list + - watch +- apiGroups: + - model.aibrix.ai + resources: + - models/status + verbs: + - get diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 02bed657..0829b12d 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -24,6 +24,14 @@ rules: - patch - update - watch +- apiGroups: + - apps + resources: + - deployments/status + verbs: + - get + - patch + - update - apiGroups: - autoscaling resources: @@ -160,6 +168,26 @@ rules: - get - patch - update +- apiGroups: + - model.aibrix.ai + resources: + - models + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - model.aibrix.ai + resources: + - models/status + verbs: + - get + - patch + - update - apiGroups: - orchestration.aibrix.ai resources: diff --git a/docs/tutorial/basemodel/base_model.yaml b/docs/tutorial/basemodel/base_model.yaml new file mode 100644 index 00000000..f4ad00ac --- /dev/null +++ b/docs/tutorial/basemodel/base_model.yaml @@ -0,0 +1,50 @@ +apiVersion: model.aibrix.ai/v1alpha1 +kind: Model +metadata: + name: llama2-70b + namespace: aibrix-system +spec: + engine: VLLM + replicas: 3 + template: + metadata: + labels: + random-user-label: random + spec: + containers: + - name: llmengine + image: aibrix/vllm-mock:nightly + ports: + - containerPort: 8000 + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP +# --- +# # for test-purpose, if need to create HTTPRoute object manually +# apiVersion: gateway.networking.k8s.io/v1 +# kind: HTTPRoute +# metadata: +# name: lora-1-router +# namespace: aibrix-system +# spec: +# parentRefs: +# - name: aibrix-eg +# rules: +# - matches: +# - headers: +# - type: Exact +# name: model +# value: lora-1 +# backendRefs: +# - name: lora-1 +# port: 8000 \ No newline at end of file diff --git a/pkg/client/applyconfiguration/model/v1alpha1/model.go b/pkg/client/applyconfiguration/model/v1alpha1/model.go new file mode 100644 index 00000000..1849bcc9 --- /dev/null +++ b/pkg/client/applyconfiguration/model/v1alpha1/model.go @@ -0,0 +1,218 @@ +/* +Copyright 2024 The Aibrix Team. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ModelApplyConfiguration represents an declarative configuration of the Model type for use +// with apply. +type ModelApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ModelSpecApplyConfiguration `json:"spec,omitempty"` + Status *ModelStatusApplyConfiguration `json:"status,omitempty"` +} + +// Model constructs an declarative configuration of the Model type for use with +// apply. +func Model(name, namespace string) *ModelApplyConfiguration { + b := &ModelApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("Model") + b.WithAPIVersion("model/v1alpha1") + return b +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ModelApplyConfiguration) WithKind(value string) *ModelApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ModelApplyConfiguration) WithAPIVersion(value string) *ModelApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ModelApplyConfiguration) WithName(value string) *ModelApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ModelApplyConfiguration) WithGenerateName(value string) *ModelApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ModelApplyConfiguration) WithNamespace(value string) *ModelApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ModelApplyConfiguration) WithUID(value types.UID) *ModelApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ModelApplyConfiguration) WithResourceVersion(value string) *ModelApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ModelApplyConfiguration) WithGeneration(value int64) *ModelApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ModelApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ModelApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ModelApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ModelApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ModelApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ModelApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ModelApplyConfiguration) WithLabels(entries map[string]string) *ModelApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ModelApplyConfiguration) WithAnnotations(entries map[string]string) *ModelApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ModelApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ModelApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ModelApplyConfiguration) WithFinalizers(values ...string) *ModelApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ModelApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ModelApplyConfiguration) WithSpec(value *ModelSpecApplyConfiguration) *ModelApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *ModelApplyConfiguration) WithStatus(value *ModelStatusApplyConfiguration) *ModelApplyConfiguration { + b.Status = value + return b +} diff --git a/pkg/client/applyconfiguration/model/v1alpha1/modelspec.go b/pkg/client/applyconfiguration/model/v1alpha1/modelspec.go new file mode 100644 index 00000000..4cf8048c --- /dev/null +++ b/pkg/client/applyconfiguration/model/v1alpha1/modelspec.go @@ -0,0 +1,60 @@ +/* +Copyright 2024 The Aibrix Team. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/api/core/v1" +) + +// ModelSpecApplyConfiguration represents an declarative configuration of the ModelSpec type for use +// with apply. +type ModelSpecApplyConfiguration struct { + Engine *string `json:"engine,omitempty"` + Template *v1.PodTemplateSpec `json:"template,omitempty"` + Replicas *int32 `json:"replicas,omitempty"` +} + +// ModelSpecApplyConfiguration constructs an declarative configuration of the ModelSpec type for use with +// apply. +func ModelSpec() *ModelSpecApplyConfiguration { + return &ModelSpecApplyConfiguration{} +} + +// WithEngine sets the Engine field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Engine field is set to the value of the last call. +func (b *ModelSpecApplyConfiguration) WithEngine(value string) *ModelSpecApplyConfiguration { + b.Engine = &value + return b +} + +// WithTemplate sets the Template field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Template field is set to the value of the last call. +func (b *ModelSpecApplyConfiguration) WithTemplate(value v1.PodTemplateSpec) *ModelSpecApplyConfiguration { + b.Template = &value + return b +} + +// WithReplicas sets the Replicas field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Replicas field is set to the value of the last call. +func (b *ModelSpecApplyConfiguration) WithReplicas(value int32) *ModelSpecApplyConfiguration { + b.Replicas = &value + return b +} diff --git a/pkg/client/applyconfiguration/model/v1alpha1/modelstatus.go b/pkg/client/applyconfiguration/model/v1alpha1/modelstatus.go new file mode 100644 index 00000000..2b26b515 --- /dev/null +++ b/pkg/client/applyconfiguration/model/v1alpha1/modelstatus.go @@ -0,0 +1,54 @@ +/* +Copyright 2024 The Aibrix Team. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/aibrix/aibrix/api/model/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ModelStatusApplyConfiguration represents an declarative configuration of the ModelStatus type for use +// with apply. +type ModelStatusApplyConfiguration struct { + Phase *v1alpha1.ModelPhase `json:"phase,omitempty"` + Conditions []v1.Condition `json:"conditions,omitempty"` +} + +// ModelStatusApplyConfiguration constructs an declarative configuration of the ModelStatus type for use with +// apply. +func ModelStatus() *ModelStatusApplyConfiguration { + return &ModelStatusApplyConfiguration{} +} + +// WithPhase sets the Phase field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Phase field is set to the value of the last call. +func (b *ModelStatusApplyConfiguration) WithPhase(value v1alpha1.ModelPhase) *ModelStatusApplyConfiguration { + b.Phase = &value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *ModelStatusApplyConfiguration) WithConditions(values ...v1.Condition) *ModelStatusApplyConfiguration { + for i := range values { + b.Conditions = append(b.Conditions, values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/utils.go b/pkg/client/applyconfiguration/utils.go index 69071c37..49f24c80 100644 --- a/pkg/client/applyconfiguration/utils.go +++ b/pkg/client/applyconfiguration/utils.go @@ -42,12 +42,18 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &autoscalingv1alpha1.PodAutoscalerStatusApplyConfiguration{} // Group=model, Version=v1alpha1 + case modelv1alpha1.SchemeGroupVersion.WithKind("Model"): + return &applyconfigurationmodelv1alpha1.ModelApplyConfiguration{} case modelv1alpha1.SchemeGroupVersion.WithKind("ModelAdapter"): return &applyconfigurationmodelv1alpha1.ModelAdapterApplyConfiguration{} case modelv1alpha1.SchemeGroupVersion.WithKind("ModelAdapterSpec"): return &applyconfigurationmodelv1alpha1.ModelAdapterSpecApplyConfiguration{} case modelv1alpha1.SchemeGroupVersion.WithKind("ModelAdapterStatus"): return &applyconfigurationmodelv1alpha1.ModelAdapterStatusApplyConfiguration{} + case modelv1alpha1.SchemeGroupVersion.WithKind("ModelSpec"): + return &applyconfigurationmodelv1alpha1.ModelSpecApplyConfiguration{} + case modelv1alpha1.SchemeGroupVersion.WithKind("ModelStatus"): + return &applyconfigurationmodelv1alpha1.ModelStatusApplyConfiguration{} // Group=orchestration, Version=v1alpha1 case orchestrationv1alpha1.SchemeGroupVersion.WithKind("RayClusterFleet"): diff --git a/pkg/client/clientset/versioned/typed/model/v1alpha1/fake/fake_model.go b/pkg/client/clientset/versioned/typed/model/v1alpha1/fake/fake_model.go new file mode 100644 index 00000000..cb5caa3c --- /dev/null +++ b/pkg/client/clientset/versioned/typed/model/v1alpha1/fake/fake_model.go @@ -0,0 +1,188 @@ +/* +Copyright 2024 The Aibrix Team. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "github.com/aibrix/aibrix/api/model/v1alpha1" + modelv1alpha1 "github.com/aibrix/aibrix/pkg/client/applyconfiguration/model/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeModels implements ModelInterface +type FakeModels struct { + Fake *FakeModelV1alpha1 + ns string +} + +var modelsResource = v1alpha1.SchemeGroupVersion.WithResource("models") + +var modelsKind = v1alpha1.SchemeGroupVersion.WithKind("Model") + +// Get takes name of the model, and returns the corresponding model object, and an error if there is any. +func (c *FakeModels) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Model, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(modelsResource, c.ns, name), &v1alpha1.Model{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Model), err +} + +// List takes label and field selectors, and returns the list of Models that match those selectors. +func (c *FakeModels) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ModelList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(modelsResource, modelsKind, c.ns, opts), &v1alpha1.ModelList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ModelList{ListMeta: obj.(*v1alpha1.ModelList).ListMeta} + for _, item := range obj.(*v1alpha1.ModelList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested models. +func (c *FakeModels) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(modelsResource, c.ns, opts)) + +} + +// Create takes the representation of a model and creates it. Returns the server's representation of the model, and an error, if there is any. +func (c *FakeModels) Create(ctx context.Context, model *v1alpha1.Model, opts v1.CreateOptions) (result *v1alpha1.Model, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(modelsResource, c.ns, model), &v1alpha1.Model{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Model), err +} + +// Update takes the representation of a model and updates it. Returns the server's representation of the model, and an error, if there is any. +func (c *FakeModels) Update(ctx context.Context, model *v1alpha1.Model, opts v1.UpdateOptions) (result *v1alpha1.Model, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(modelsResource, c.ns, model), &v1alpha1.Model{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Model), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeModels) UpdateStatus(ctx context.Context, model *v1alpha1.Model, opts v1.UpdateOptions) (*v1alpha1.Model, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(modelsResource, "status", c.ns, model), &v1alpha1.Model{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Model), err +} + +// Delete takes name of the model and deletes it. Returns an error if one occurs. +func (c *FakeModels) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(modelsResource, c.ns, name, opts), &v1alpha1.Model{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeModels) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(modelsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ModelList{}) + return err +} + +// Patch applies the patch and returns the patched model. +func (c *FakeModels) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Model, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(modelsResource, c.ns, name, pt, data, subresources...), &v1alpha1.Model{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Model), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied model. +func (c *FakeModels) Apply(ctx context.Context, model *modelv1alpha1.ModelApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Model, err error) { + if model == nil { + return nil, fmt.Errorf("model provided to Apply must not be nil") + } + data, err := json.Marshal(model) + if err != nil { + return nil, err + } + name := model.Name + if name == nil { + return nil, fmt.Errorf("model.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(modelsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.Model{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Model), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeModels) ApplyStatus(ctx context.Context, model *modelv1alpha1.ModelApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Model, err error) { + if model == nil { + return nil, fmt.Errorf("model provided to Apply must not be nil") + } + data, err := json.Marshal(model) + if err != nil { + return nil, err + } + name := model.Name + if name == nil { + return nil, fmt.Errorf("model.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(modelsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.Model{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Model), err +} diff --git a/pkg/client/clientset/versioned/typed/model/v1alpha1/fake/fake_model_client.go b/pkg/client/clientset/versioned/typed/model/v1alpha1/fake/fake_model_client.go index 5891e94e..7879135b 100644 --- a/pkg/client/clientset/versioned/typed/model/v1alpha1/fake/fake_model_client.go +++ b/pkg/client/clientset/versioned/typed/model/v1alpha1/fake/fake_model_client.go @@ -27,6 +27,10 @@ type FakeModelV1alpha1 struct { *testing.Fake } +func (c *FakeModelV1alpha1) Models(namespace string) v1alpha1.ModelInterface { + return &FakeModels{c, namespace} +} + func (c *FakeModelV1alpha1) ModelAdapters(namespace string) v1alpha1.ModelAdapterInterface { return &FakeModelAdapters{c, namespace} } diff --git a/pkg/client/clientset/versioned/typed/model/v1alpha1/generated_expansion.go b/pkg/client/clientset/versioned/typed/model/v1alpha1/generated_expansion.go index 6c7bd496..7d2bb970 100644 --- a/pkg/client/clientset/versioned/typed/model/v1alpha1/generated_expansion.go +++ b/pkg/client/clientset/versioned/typed/model/v1alpha1/generated_expansion.go @@ -17,4 +17,6 @@ limitations under the License. package v1alpha1 +type ModelExpansion interface{} + type ModelAdapterExpansion interface{} diff --git a/pkg/client/clientset/versioned/typed/model/v1alpha1/model.go b/pkg/client/clientset/versioned/typed/model/v1alpha1/model.go new file mode 100644 index 00000000..6621c3ce --- /dev/null +++ b/pkg/client/clientset/versioned/typed/model/v1alpha1/model.go @@ -0,0 +1,255 @@ +/* +Copyright 2024 The Aibrix Team. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha1 "github.com/aibrix/aibrix/api/model/v1alpha1" + modelv1alpha1 "github.com/aibrix/aibrix/pkg/client/applyconfiguration/model/v1alpha1" + scheme "github.com/aibrix/aibrix/pkg/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ModelsGetter has a method to return a ModelInterface. +// A group's client should implement this interface. +type ModelsGetter interface { + Models(namespace string) ModelInterface +} + +// ModelInterface has methods to work with Model resources. +type ModelInterface interface { + Create(ctx context.Context, model *v1alpha1.Model, opts v1.CreateOptions) (*v1alpha1.Model, error) + Update(ctx context.Context, model *v1alpha1.Model, opts v1.UpdateOptions) (*v1alpha1.Model, error) + UpdateStatus(ctx context.Context, model *v1alpha1.Model, opts v1.UpdateOptions) (*v1alpha1.Model, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.Model, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ModelList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Model, err error) + Apply(ctx context.Context, model *modelv1alpha1.ModelApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Model, err error) + ApplyStatus(ctx context.Context, model *modelv1alpha1.ModelApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Model, err error) + ModelExpansion +} + +// models implements ModelInterface +type models struct { + client rest.Interface + ns string +} + +// newModels returns a Models +func newModels(c *ModelV1alpha1Client, namespace string) *models { + return &models{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the model, and returns the corresponding model object, and an error if there is any. +func (c *models) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Model, err error) { + result = &v1alpha1.Model{} + err = c.client.Get(). + Namespace(c.ns). + Resource("models"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Models that match those selectors. +func (c *models) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ModelList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.ModelList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("models"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested models. +func (c *models) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("models"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a model and creates it. Returns the server's representation of the model, and an error, if there is any. +func (c *models) Create(ctx context.Context, model *v1alpha1.Model, opts v1.CreateOptions) (result *v1alpha1.Model, err error) { + result = &v1alpha1.Model{} + err = c.client.Post(). + Namespace(c.ns). + Resource("models"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(model). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a model and updates it. Returns the server's representation of the model, and an error, if there is any. +func (c *models) Update(ctx context.Context, model *v1alpha1.Model, opts v1.UpdateOptions) (result *v1alpha1.Model, err error) { + result = &v1alpha1.Model{} + err = c.client.Put(). + Namespace(c.ns). + Resource("models"). + Name(model.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(model). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *models) UpdateStatus(ctx context.Context, model *v1alpha1.Model, opts v1.UpdateOptions) (result *v1alpha1.Model, err error) { + result = &v1alpha1.Model{} + err = c.client.Put(). + Namespace(c.ns). + Resource("models"). + Name(model.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(model). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the model and deletes it. Returns an error if one occurs. +func (c *models) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("models"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *models) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("models"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched model. +func (c *models) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Model, err error) { + result = &v1alpha1.Model{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("models"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied model. +func (c *models) Apply(ctx context.Context, model *modelv1alpha1.ModelApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Model, err error) { + if model == nil { + return nil, fmt.Errorf("model provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(model) + if err != nil { + return nil, err + } + name := model.Name + if name == nil { + return nil, fmt.Errorf("model.Name must be provided to Apply") + } + result = &v1alpha1.Model{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("models"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *models) ApplyStatus(ctx context.Context, model *modelv1alpha1.ModelApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Model, err error) { + if model == nil { + return nil, fmt.Errorf("model provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(model) + if err != nil { + return nil, err + } + + name := model.Name + if name == nil { + return nil, fmt.Errorf("model.Name must be provided to Apply") + } + + result = &v1alpha1.Model{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("models"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/client/clientset/versioned/typed/model/v1alpha1/model_client.go b/pkg/client/clientset/versioned/typed/model/v1alpha1/model_client.go index e3fcd4af..f95b7103 100644 --- a/pkg/client/clientset/versioned/typed/model/v1alpha1/model_client.go +++ b/pkg/client/clientset/versioned/typed/model/v1alpha1/model_client.go @@ -27,6 +27,7 @@ import ( type ModelV1alpha1Interface interface { RESTClient() rest.Interface + ModelsGetter ModelAdaptersGetter } @@ -35,6 +36,10 @@ type ModelV1alpha1Client struct { restClient rest.Interface } +func (c *ModelV1alpha1Client) Models(namespace string) ModelInterface { + return newModels(c, namespace) +} + func (c *ModelV1alpha1Client) ModelAdapters(namespace string) ModelAdapterInterface { return newModelAdapters(c, namespace) } diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index a07b2ea9..7fddb0d5 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -58,6 +58,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V1alpha1().PodAutoscalers().Informer()}, nil // Group=model, Version=v1alpha1 + case modelv1alpha1.SchemeGroupVersion.WithResource("models"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Model().V1alpha1().Models().Informer()}, nil case modelv1alpha1.SchemeGroupVersion.WithResource("modeladapters"): return &genericInformer{resource: resource.GroupResource(), informer: f.Model().V1alpha1().ModelAdapters().Informer()}, nil diff --git a/pkg/client/informers/externalversions/model/v1alpha1/interface.go b/pkg/client/informers/externalversions/model/v1alpha1/interface.go index 64590085..07d679ff 100644 --- a/pkg/client/informers/externalversions/model/v1alpha1/interface.go +++ b/pkg/client/informers/externalversions/model/v1alpha1/interface.go @@ -23,6 +23,8 @@ import ( // Interface provides access to all the informers in this group version. type Interface interface { + // Models returns a ModelInformer. + Models() ModelInformer // ModelAdapters returns a ModelAdapterInformer. ModelAdapters() ModelAdapterInformer } @@ -38,6 +40,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } +// Models returns a ModelInformer. +func (v *version) Models() ModelInformer { + return &modelInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + // ModelAdapters returns a ModelAdapterInformer. func (v *version) ModelAdapters() ModelAdapterInformer { return &modelAdapterInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} diff --git a/pkg/client/informers/externalversions/model/v1alpha1/model.go b/pkg/client/informers/externalversions/model/v1alpha1/model.go new file mode 100644 index 00000000..5761bd7d --- /dev/null +++ b/pkg/client/informers/externalversions/model/v1alpha1/model.go @@ -0,0 +1,89 @@ +/* +Copyright 2024 The Aibrix Team. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + modelv1alpha1 "github.com/aibrix/aibrix/api/model/v1alpha1" + versioned "github.com/aibrix/aibrix/pkg/client/clientset/versioned" + internalinterfaces "github.com/aibrix/aibrix/pkg/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/aibrix/aibrix/pkg/client/listers/model/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// ModelInformer provides access to a shared informer and lister for +// Models. +type ModelInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.ModelLister +} + +type modelInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewModelInformer constructs a new informer for Model type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewModelInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredModelInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredModelInformer constructs a new informer for Model type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredModelInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ModelV1alpha1().Models(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ModelV1alpha1().Models(namespace).Watch(context.TODO(), options) + }, + }, + &modelv1alpha1.Model{}, + resyncPeriod, + indexers, + ) +} + +func (f *modelInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredModelInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *modelInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&modelv1alpha1.Model{}, f.defaultInformer) +} + +func (f *modelInformer) Lister() v1alpha1.ModelLister { + return v1alpha1.NewModelLister(f.Informer().GetIndexer()) +} diff --git a/pkg/client/listers/model/v1alpha1/expansion_generated.go b/pkg/client/listers/model/v1alpha1/expansion_generated.go index f4fb0c00..c7798bd9 100644 --- a/pkg/client/listers/model/v1alpha1/expansion_generated.go +++ b/pkg/client/listers/model/v1alpha1/expansion_generated.go @@ -17,6 +17,14 @@ limitations under the License. package v1alpha1 +// ModelListerExpansion allows custom methods to be added to +// ModelLister. +type ModelListerExpansion interface{} + +// ModelNamespaceListerExpansion allows custom methods to be added to +// ModelNamespaceLister. +type ModelNamespaceListerExpansion interface{} + // ModelAdapterListerExpansion allows custom methods to be added to // ModelAdapterLister. type ModelAdapterListerExpansion interface{} diff --git a/pkg/client/listers/model/v1alpha1/model.go b/pkg/client/listers/model/v1alpha1/model.go new file mode 100644 index 00000000..e9dbb952 --- /dev/null +++ b/pkg/client/listers/model/v1alpha1/model.go @@ -0,0 +1,98 @@ +/* +Copyright 2024 The Aibrix Team. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/aibrix/aibrix/api/model/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ModelLister helps list Models. +// All objects returned here must be treated as read-only. +type ModelLister interface { + // List lists all Models in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.Model, err error) + // Models returns an object that can list and get Models. + Models(namespace string) ModelNamespaceLister + ModelListerExpansion +} + +// modelLister implements the ModelLister interface. +type modelLister struct { + indexer cache.Indexer +} + +// NewModelLister returns a new ModelLister. +func NewModelLister(indexer cache.Indexer) ModelLister { + return &modelLister{indexer: indexer} +} + +// List lists all Models in the indexer. +func (s *modelLister) List(selector labels.Selector) (ret []*v1alpha1.Model, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.Model)) + }) + return ret, err +} + +// Models returns an object that can list and get Models. +func (s *modelLister) Models(namespace string) ModelNamespaceLister { + return modelNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ModelNamespaceLister helps list and get Models. +// All objects returned here must be treated as read-only. +type ModelNamespaceLister interface { + // List lists all Models in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.Model, err error) + // Get retrieves the Model from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.Model, error) + ModelNamespaceListerExpansion +} + +// modelNamespaceLister implements the ModelNamespaceLister +// interface. +type modelNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Models in the indexer for a given namespace. +func (s modelNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Model, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.Model)) + }) + return ret, err +} + +// Get retrieves the Model from the indexer for a given namespace and name. +func (s modelNamespaceLister) Get(name string) (*v1alpha1.Model, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("model"), name) + } + return obj.(*v1alpha1.Model), nil +} diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 67c3e5b1..c1a69c09 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -17,6 +17,7 @@ limitations under the License. package controller import ( + "github.com/aibrix/aibrix/pkg/controller/model" "github.com/aibrix/aibrix/pkg/controller/modeladapter" "github.com/aibrix/aibrix/pkg/controller/modelrouter" "github.com/aibrix/aibrix/pkg/controller/podautoscaler" @@ -36,6 +37,7 @@ var controllerAddFuncs []func(manager.Manager) error func init() { controllerAddFuncs = append(controllerAddFuncs, podautoscaler.Add) + controllerAddFuncs = append(controllerAddFuncs, model.Add) controllerAddFuncs = append(controllerAddFuncs, modeladapter.Add) controllerAddFuncs = append(controllerAddFuncs, modelrouter.Add) // TODO: only enable them if KubeRay is installed (check RayCluster CRD exist) diff --git a/pkg/controller/model/model_controller.go b/pkg/controller/model/model_controller.go new file mode 100644 index 00000000..d63bf1c0 --- /dev/null +++ b/pkg/controller/model/model_controller.go @@ -0,0 +1,461 @@ +/* +Copyright 2024 The Aibrix Team. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package model + +import ( + "context" + "fmt" + "time" + + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" + corelisters "k8s.io/client-go/listers/core/v1" + toolscache "k8s.io/client-go/tools/cache" + "k8s.io/client-go/tools/record" + "k8s.io/klog/v2" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/builder" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/manager" + "sigs.k8s.io/controller-runtime/pkg/predicate" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + + modelv1alpha1 "github.com/aibrix/aibrix/api/model/v1alpha1" +) + +const ( + ModelIdentifierKey = "model.aibrix.ai/name" + ModelAdapterFinalizer = "adapter.model.aibrix.ai/finalizer" + ModelAdapterPodTemplateLabelKey = "adapter.model.aibrix.ai/enabled" + ModelAdapterPodTemplateLabelValue = "true" + + // Reasons for model adapter conditions + // Processing: + + // ModelAdapterInitializedReason is added in model adapter when it comes into the reconciliation loop. + ModelAdapterInitializedReason = "ModelAdapterPending" + // FailedServiceCreateReason is added in a model adapter when it cannot create a new service. + FailedServiceCreateReason = "ServiceCreateError" + // FailedEndpointSliceCreateReason is added in a model adapter when it cannot create a new replica set. + FailedEndpointSliceCreateReason = "EndpointSliceCreateError" + // ModelAdapterLoadingErrorReason is added in a model adapter when it cannot be loaded in an engine pod. + ModelAdapterLoadingErrorReason = "ModelAdapterLoadingError" + // ValidationFailedReason is added when model adapter object fails the validation + ValidationFailedReason = "ValidationFailed" + // StableInstanceFoundReason is added if there's stale pod and instance has been deleted successfully. + StableInstanceFoundReason = "StableInstanceFound" + + // Available: + + // ModelAdapterAvailable is added in a ModelAdapter when it has replicas available. + ModelAdapterAvailable = "ModelAdapterAvailable" + // ModelAdapterUnavailable is added in a ModelAdapter when it doesn't have any pod hosting it. + ModelAdapterUnavailable = "ModelAdapterUnavailable" +) + +var ( + controllerKind = modelv1alpha1.GroupVersion.WithKind("Model") + controllerName = "model-controller" + defaultRequeueDuration = 3 * time.Second +) + +// Add creates a new Model Controller and adds it to the Manager with default RBAC. +// The Manager will set fields on the Controller and Start it when the Manager is Started. +func Add(mgr manager.Manager) error { + r, err := newReconciler(mgr) + if err != nil { + return err + } + return add(mgr, r) +} + +// newReconciler returns a new reconcile.Reconciler +func newReconciler(mgr manager.Manager) (reconcile.Reconciler, error) { + cacher := mgr.GetCache() + + podInformer, err := cacher.GetInformer(context.TODO(), &corev1.Pod{}) + if err != nil { + return nil, err + } + + serviceInformer, err := cacher.GetInformer(context.TODO(), &corev1.Service{}) + if err != nil { + return nil, err + } + + // Let's generate the clientset and use ModelAdapterLister here as well. + podLister := corelisters.NewPodLister(podInformer.(toolscache.SharedIndexInformer).GetIndexer()) + serviceLister := corelisters.NewServiceLister(serviceInformer.(toolscache.SharedIndexInformer).GetIndexer()) + + reconciler := &ModelReconciler{ + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + PodLister: podLister, + ServiceLister: serviceLister, + Recorder: mgr.GetEventRecorderFor(controllerName), + } + return reconciler, nil +} + +// add adds a new Controller to mgr with r as the reconcile.Reconciler +func add(mgr manager.Manager, r reconcile.Reconciler) error { + // use the builder fashion. If we need more fine grain control later, we can switch to `controller.New()` + err := ctrl.NewControllerManagedBy(mgr). + Named(controllerName). + For(&modelv1alpha1.Model{}, builder.WithPredicates(predicate.Or( + predicate.GenerationChangedPredicate{}, + predicate.LabelChangedPredicate{}, + predicate.AnnotationChangedPredicate{}, + ))). + Complete(r) + + klog.V(4).InfoS("Finished to add model-adapter-controller") + return err +} + +var _ reconcile.Reconciler = &ModelReconciler{} + +// ModelAdapterReconciler reconciles a ModelAdapter object +type ModelReconciler struct { + client.Client + Scheme *runtime.Scheme + Recorder record.EventRecorder + + // PodLister is able to list/get pods from a shared informer's cache store + PodLister corelisters.PodLister + // ServiceLister is able to list/get services from a shared informer's cache store + ServiceLister corelisters.ServiceLister + // EndpointSliceLister is able to list/get services from a shared informer's cache store +} + +//+kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=core,resources=services/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=apps,resources=deployments/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=core,resources=pods/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=model.aibrix.ai,resources=models,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=model.aibrix.ai,resources=models/status,verbs=get;update;patch + +// Reconcile reads that state of ModelAdapter object and makes changes based on the state read +// and what is in the ModelAdapter.Spec +func (r *ModelReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { + klog.V(4).InfoS("Starting to process Model", "model", req.NamespacedName) + + // Fetch the ModelAdapter instance + model := &modelv1alpha1.Model{} + err := r.Get(ctx, req.NamespacedName, model) + if err != nil { + if apierrors.IsNotFound(err) { + // Object not found, return. + // For service, endpoint objects, clean up the resources using finalizers + klog.InfoS("ModelAdapter resource not found. Ignoring since object mush be deleted", "modelAdapter", req.NamespacedName) + return reconcile.Result{}, nil + } + + // Error reading the object and let's requeue the request + klog.ErrorS(err, "Failed to get Model", "Model", klog.KObj(model)) + return reconcile.Result{}, err + } + + // if modelAdapter.ObjectMeta.DeletionTimestamp.IsZero() { + // // the object is not being deleted, so if it does not have the finalizer, + // // then lets add the finalizer and update the object. + // if !controllerutil.ContainsFinalizer(modelAdapter, ModelAdapterFinalizer) { + // klog.InfoS("Adding finalizer for ModelAdapter", "ModelAdapter", klog.KObj(modelAdapter)) + // if ok := controllerutil.AddFinalizer(modelAdapter, ModelAdapterFinalizer); !ok { + // klog.Error("Failed to add finalizer for ModelAdapter") + // return ctrl.Result{Requeue: true}, nil + // } + // if err := r.Update(ctx, modelAdapter); err != nil { + // klog.Error("Failed to update custom resource to add finalizer") + // return ctrl.Result{}, err + // } + // } + // } else { + // // the object is being deleted + // if controllerutil.ContainsFinalizer(modelAdapter, ModelAdapterFinalizer) { + // // the finalizer is present, so let's unload lora from those inference engines + // // note: the base model pod could be deleted as well, so here we do best effort offloading + // // we do not need to reconcile the object if it encounters the unloading error. + // if err := r.unloadModelAdapter(modelAdapter); err != nil { + // return ctrl.Result{}, err + // } + // if ok := controllerutil.RemoveFinalizer(modelAdapter, ModelAdapterFinalizer); !ok { + // klog.Error("Failed to remove finalizer for ModelAdapter") + // return ctrl.Result{Requeue: true}, nil + // } + // if err := r.Update(ctx, modelAdapter); err != nil { + // klog.Error("Failed to update custom resource to remove finalizer") + // return ctrl.Result{}, err + // } + // } + // // Stop reconciliation as the item is being deleted + // return ctrl.Result{}, nil + // } + + return r.DoReconcile(ctx, req, model) +} + +func (r *ModelReconciler) DoReconcile(ctx context.Context, req ctrl.Request, instance *modelv1alpha1.Model) (ctrl.Result, error) { + // Let's set the initial status when no status is available + if instance.Status.Conditions == nil || len(instance.Status.Conditions) == 0 { + instance.Status.Phase = modelv1alpha1.ModelPending + condition := NewCondition(string(modelv1alpha1.ModelConditionTypeInitialized), metav1.ConditionUnknown, + ModelAdapterInitializedReason, "Starting reconciliation") + if err := r.updateStatus(ctx, instance, condition); err != nil { + return reconcile.Result{}, err + } else { + return reconcile.Result{Requeue: true}, nil + } + } + + oldInstance := instance.DeepCopy() + // Step 0: Validate ModelAdapter configurations + // if err := validateModelAdapter(instance); err != nil { + // klog.Error(err, "Failed to validate the ModelAdapter") + // instance.Status.Phase = modelv1alpha1.ModelAdapterFailed + // condition := NewCondition(string(modelv1alpha1.ModelAdapterPending), metav1.ConditionFalse, + // ValidationFailedReason, "ModelAdapter resource is not valid") + // // TODO: no need to update the status if the status remain the same + // if updateErr := r.updateStatus(ctx, instance, condition); updateErr != nil { + // klog.ErrorS(err, "Failed to update ModelAdapter status", "modelAdapter", klog.KObj(instance)) + // return reconcile.Result{}, updateErr + // } + + // return ctrl.Result{}, err + // } + + // Step 3: Reconcile Service + if ctrlResult, err := r.reconcileService(ctx, instance); err != nil { + instance.Status.Phase = modelv1alpha1.ModelResourceCreated + condition := NewCondition(string(modelv1alpha1.ModelConditionTypeResourceCreated), metav1.ConditionFalse, + FailedServiceCreateReason, "service creation failure") + if err := r.updateStatus(ctx, instance, condition); err != nil { + klog.InfoS("Got error when updating status", req.Name, "error", err, "ModelAdapter", instance) + return ctrl.Result{}, err + } + return ctrlResult, err + } + + // Step 4: Reconcile EndpointSlice + if ctrlResult, err := r.reconcileDeployment(ctx, instance); err != nil { + instance.Status.Phase = modelv1alpha1.ModelResourceCreated + condition := NewCondition(string(modelv1alpha1.ModelConditionTypeResourceCreated), metav1.ConditionFalse, + FailedEndpointSliceCreateReason, "deployment creation failure") + if err := r.updateStatus(ctx, instance, condition); err != nil { + klog.InfoS("Got error when updating status", "error", err, "ModelAdapter", instance) + return ctrl.Result{}, err + } + return ctrlResult, err + } + + // Check if we need to update the status. + if r.inconsistentModelStatus(oldInstance.Status, instance.Status) { + condition := NewCondition(string(modelv1alpha1.ModelAdapterConditionReady), metav1.ConditionTrue, + ModelAdapterAvailable, fmt.Sprintf("ModelAdapter %s is ready", klog.KObj(instance))) + if err := r.updateStatus(ctx, instance, condition); err != nil { + return reconcile.Result{}, fmt.Errorf("update modelAdapter status error: %v", err) + } + } + + return ctrl.Result{}, nil +} + +func (r *ModelReconciler) reconcileService(ctx context.Context, instance *modelv1alpha1.Model) (ctrl.Result, error) { + // Retrieve the Service from the Kubernetes cluster with the name and namespace. + found := &corev1.Service{} + err := r.Get(ctx, types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}, found) + if err != nil && apierrors.IsNotFound(err) { + // Service does not exist, create a new one + svc := buildModelService(instance) + // Set the owner reference + if err := ctrl.SetControllerReference(instance, svc, r.Scheme); err != nil { + klog.Error(err, "Failed to set controller reference to modelAdapter") + return ctrl.Result{}, err + } + + // create service + klog.InfoS("Creating a new service", "service", klog.KObj(svc)) + if err = r.Create(ctx, svc); err != nil { + klog.ErrorS(err, "Failed to create new service resource for ModelAdapter", "service", klog.KObj(svc)) + condition := NewCondition(string(modelv1alpha1.ModelAdapterConditionTypeResourceCreated), metav1.ConditionFalse, + FailedServiceCreateReason, fmt.Sprintf("Failed to create Service for the modeladapter (%s): (%s)", klog.KObj(instance), err)) + if err := r.updateStatus(ctx, instance, condition); err != nil { + return ctrl.Result{}, err + } + return ctrl.Result{}, err + } + } else if err != nil { + klog.ErrorS(err, "Failed to get Service") + return ctrl.Result{}, err + } + // TODO: add `else` logic let's compare the service major fields and update to the target state. + + // TODO: Now, we are using the name comparison which is not enough, + // compare the object difference in future. + return ctrl.Result{}, nil +} + +func buildModelService(instance *modelv1alpha1.Model) *corev1.Service { + labels := map[string]string{ + "model.aibrix.ai/name": instance.Name, + } + + ports := []corev1.ServicePort{ + { + Name: "http", + // it should use the base model service port. + // make sure this can be dynamically configured later. + Port: 8000, + TargetPort: intstr.IntOrString{ + Type: intstr.Int, + IntVal: 8000, + }, + Protocol: corev1.ProtocolTCP, + }, + } + + return &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: instance.Name, + Namespace: instance.Namespace, + Labels: labels, + Annotations: make(map[string]string), + OwnerReferences: []metav1.OwnerReference{ + *metav1.NewControllerRef(instance, controllerKind), + }, + }, + Spec: corev1.ServiceSpec{ + Selector: labels, + ClusterIP: corev1.ClusterIPNone, + PublishNotReadyAddresses: true, + Ports: ports, + }, + } +} + +func (r *ModelReconciler) reconcileDeployment(ctx context.Context, instance *modelv1alpha1.Model) (ctrl.Result, error) { + // Retrieve the Service from the Kubernetes cluster with the name and namespace. + found := &appsv1.Deployment{} + err := r.Get(ctx, types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}, found) + if err != nil && apierrors.IsNotFound(err) { + // Deployment does not exist, create a new one + deployment := buildModelDeployment(instance) + // Set the owner reference + if err := ctrl.SetControllerReference(instance, deployment, r.Scheme); err != nil { + klog.Error(err, "Failed to set controller reference to model") + return ctrl.Result{}, err + } + + // create deployment + klog.InfoS("Creating a new deployment", "deployment", klog.KObj(deployment)) + if err = r.Create(ctx, deployment); err != nil { + klog.ErrorS(err, "Failed to create new deployment resource for Model", "deployment", klog.KObj(deployment)) + condition := NewCondition(string(modelv1alpha1.ModelConditionTypeResourceCreated), metav1.ConditionFalse, + FailedServiceCreateReason, fmt.Sprintf("Failed to create Deployment for the model (%s): (%s)", klog.KObj(instance), err)) + if err := r.updateStatus(ctx, instance, condition); err != nil { + return ctrl.Result{}, err + } + return ctrl.Result{}, err + } + } else if err != nil { + klog.ErrorS(err, "Failed to get deployment") + return ctrl.Result{}, err + } + // TODO: add `else` logic let's compare the service major fields and update to the target state. + + // TODO: Now, we are using the name comparison which is not enough, + // compare the object difference in future. + return ctrl.Result{}, nil +} + +func buildModelDeployment(instance *modelv1alpha1.Model) *appsv1.Deployment { + podSelectorLabels := map[string]string{ + "model.aibrix.ai/name": instance.Name, + } + + deploymentLabels := map[string]string{ + "model.aibrix.ai/name": instance.Name, + "model.aibrix.ai/port": "8000", + "adapter.model.aibrix.ai/enabled": "true", + } + + podTemplate := instance.Spec.Template + podTemplateLabels := podTemplate.Labels + if len(podTemplateLabels) == 0 { + podTemplateLabels = map[string]string{} + } + for k, v := range deploymentLabels { + podTemplateLabels[k] = v + } + podTemplate.Labels = podTemplateLabels + + return &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: instance.Name, + Namespace: instance.Namespace, + Labels: deploymentLabels, + Annotations: make(map[string]string), + OwnerReferences: []metav1.OwnerReference{ + *metav1.NewControllerRef(instance, controllerKind), + }, + }, + Spec: appsv1.DeploymentSpec{ + Replicas: instance.Spec.Replicas, + Selector: &metav1.LabelSelector{ + MatchLabels: podSelectorLabels, + }, + Template: instance.Spec.Template, + Strategy: appsv1.DeploymentStrategy{ + Type: appsv1.RollingUpdateDeploymentStrategyType, + }, + }, + } +} + +// NewCondition creates a new condition. +func NewCondition(condType string, status metav1.ConditionStatus, reason, msg string) metav1.Condition { + return metav1.Condition{ + Type: condType, + Status: status, + LastTransitionTime: metav1.Now(), + Reason: reason, + Message: msg, + } +} + +func (r *ModelReconciler) updateStatus(ctx context.Context, instance *modelv1alpha1.Model, condition metav1.Condition) error { + klog.InfoS("model adapter reconcile", "Update CR status", instance.Name, "status", instance.Status) + meta.SetStatusCondition(&instance.Status.Conditions, condition) + return r.Status().Update(ctx, instance) +} + +func (r *ModelReconciler) inconsistentModelStatus(oldStatus, newStatus modelv1alpha1.ModelStatus) bool { + // Implement your logic to check if the status is inconsistent + if oldStatus.Phase != newStatus.Phase { + return true + } + + return false +} From 8a45ab53375aa2e9d55ed129bd06d3264d2a26cb Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Wed, 16 Oct 2024 13:43:19 -0700 Subject: [PATCH 2/4] cleanup --- docs/development/app/README.md | 4 +- docs/tutorial/basemodel/base_model.yaml | 21 +-- pkg/controller/model/model_controller.go | 170 +++++------------------ 3 files changed, 38 insertions(+), 157 deletions(-) diff --git a/docs/development/app/README.md b/docs/development/app/README.md index b8f9906c..9816a41d 100644 --- a/docs/development/app/README.md +++ b/docs/development/app/README.md @@ -11,7 +11,7 @@ kind load docker-image aibrix/vllm-mock:nightly 2. Deploy mocked model image ```shell -kubectl apply -f docs/development/app/deployment.yaml +kubectl apply -f docs/tutorial/basemodel/base_model.yaml kubectl -n aibrix-system port-forward svc/llama2-70b 8000:8000 & ``` @@ -29,7 +29,7 @@ curl http://localhost:8000/v1/chat/completions \ ``` ```shell -kubectl delete -f docs/development/app/deployment.yaml +kubectl delete -f docs/tutorial/basemodel/base_model.yaml ``` diff --git a/docs/tutorial/basemodel/base_model.yaml b/docs/tutorial/basemodel/base_model.yaml index f4ad00ac..e60c0e35 100644 --- a/docs/tutorial/basemodel/base_model.yaml +++ b/docs/tutorial/basemodel/base_model.yaml @@ -28,23 +28,4 @@ spec: - name: MY_POD_IP valueFrom: fieldRef: - fieldPath: status.podIP -# --- -# # for test-purpose, if need to create HTTPRoute object manually -# apiVersion: gateway.networking.k8s.io/v1 -# kind: HTTPRoute -# metadata: -# name: lora-1-router -# namespace: aibrix-system -# spec: -# parentRefs: -# - name: aibrix-eg -# rules: -# - matches: -# - headers: -# - type: Exact -# name: model -# value: lora-1 -# backendRefs: -# - name: lora-1 -# port: 8000 \ No newline at end of file + fieldPath: status.podIP \ No newline at end of file diff --git a/pkg/controller/model/model_controller.go b/pkg/controller/model/model_controller.go index d63bf1c0..87eb8b0c 100644 --- a/pkg/controller/model/model_controller.go +++ b/pkg/controller/model/model_controller.go @@ -29,8 +29,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" - corelisters "k8s.io/client-go/listers/core/v1" - toolscache "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/klog/v2" ctrl "sigs.k8s.io/controller-runtime" @@ -44,33 +42,13 @@ import ( ) const ( - ModelIdentifierKey = "model.aibrix.ai/name" - ModelAdapterFinalizer = "adapter.model.aibrix.ai/finalizer" - ModelAdapterPodTemplateLabelKey = "adapter.model.aibrix.ai/enabled" - ModelAdapterPodTemplateLabelValue = "true" - - // Reasons for model adapter conditions - // Processing: - - // ModelAdapterInitializedReason is added in model adapter when it comes into the reconciliation loop. - ModelAdapterInitializedReason = "ModelAdapterPending" - // FailedServiceCreateReason is added in a model adapter when it cannot create a new service. - FailedServiceCreateReason = "ServiceCreateError" - // FailedEndpointSliceCreateReason is added in a model adapter when it cannot create a new replica set. - FailedEndpointSliceCreateReason = "EndpointSliceCreateError" - // ModelAdapterLoadingErrorReason is added in a model adapter when it cannot be loaded in an engine pod. - ModelAdapterLoadingErrorReason = "ModelAdapterLoadingError" - // ValidationFailedReason is added when model adapter object fails the validation - ValidationFailedReason = "ValidationFailed" - // StableInstanceFoundReason is added if there's stale pod and instance has been deleted successfully. - StableInstanceFoundReason = "StableInstanceFound" - - // Available: - - // ModelAdapterAvailable is added in a ModelAdapter when it has replicas available. - ModelAdapterAvailable = "ModelAdapterAvailable" - // ModelAdapterUnavailable is added in a ModelAdapter when it doesn't have any pod hosting it. - ModelAdapterUnavailable = "ModelAdapterUnavailable" + ModelIdentifierKey = "model.aibrix.ai/name" + + ModelInitializedReason = "ModelPending" + FailedServiceCreateReason = "ServiceCreateError" + FailedDeploymentCreateReason = "DeploymentCreateError" + + ModelAvailable = "ModelAvailable" ) var ( @@ -91,28 +69,10 @@ func Add(mgr manager.Manager) error { // newReconciler returns a new reconcile.Reconciler func newReconciler(mgr manager.Manager) (reconcile.Reconciler, error) { - cacher := mgr.GetCache() - - podInformer, err := cacher.GetInformer(context.TODO(), &corev1.Pod{}) - if err != nil { - return nil, err - } - - serviceInformer, err := cacher.GetInformer(context.TODO(), &corev1.Service{}) - if err != nil { - return nil, err - } - - // Let's generate the clientset and use ModelAdapterLister here as well. - podLister := corelisters.NewPodLister(podInformer.(toolscache.SharedIndexInformer).GetIndexer()) - serviceLister := corelisters.NewServiceLister(serviceInformer.(toolscache.SharedIndexInformer).GetIndexer()) - reconciler := &ModelReconciler{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - PodLister: podLister, - ServiceLister: serviceLister, - Recorder: mgr.GetEventRecorderFor(controllerName), + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + Recorder: mgr.GetEventRecorderFor(controllerName), } return reconciler, nil } @@ -129,23 +89,17 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { ))). Complete(r) - klog.V(4).InfoS("Finished to add model-adapter-controller") + klog.V(4).InfoS("Finished to add model-controller") return err } var _ reconcile.Reconciler = &ModelReconciler{} -// ModelAdapterReconciler reconciles a ModelAdapter object +// ModelReconciler reconciles a Model object type ModelReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder - - // PodLister is able to list/get pods from a shared informer's cache store - PodLister corelisters.PodLister - // ServiceLister is able to list/get services from a shared informer's cache store - ServiceLister corelisters.ServiceLister - // EndpointSliceLister is able to list/get services from a shared informer's cache store } //+kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;update;patch;delete @@ -157,19 +111,19 @@ type ModelReconciler struct { //+kubebuilder:rbac:groups=model.aibrix.ai,resources=models,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=model.aibrix.ai,resources=models/status,verbs=get;update;patch -// Reconcile reads that state of ModelAdapter object and makes changes based on the state read -// and what is in the ModelAdapter.Spec +// Reconcile reads that state of Model object and makes changes based on the state read +// and what is in the Model.Spec func (r *ModelReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { klog.V(4).InfoS("Starting to process Model", "model", req.NamespacedName) - // Fetch the ModelAdapter instance + // Fetch the Model instance model := &modelv1alpha1.Model{} err := r.Get(ctx, req.NamespacedName, model) if err != nil { if apierrors.IsNotFound(err) { // Object not found, return. // For service, endpoint objects, clean up the resources using finalizers - klog.InfoS("ModelAdapter resource not found. Ignoring since object mush be deleted", "modelAdapter", req.NamespacedName) + klog.InfoS("Model resource not found. Ignoring since object mush be deleted", "model", req.NamespacedName) return reconcile.Result{}, nil } @@ -178,42 +132,6 @@ func (r *ModelReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl return reconcile.Result{}, err } - // if modelAdapter.ObjectMeta.DeletionTimestamp.IsZero() { - // // the object is not being deleted, so if it does not have the finalizer, - // // then lets add the finalizer and update the object. - // if !controllerutil.ContainsFinalizer(modelAdapter, ModelAdapterFinalizer) { - // klog.InfoS("Adding finalizer for ModelAdapter", "ModelAdapter", klog.KObj(modelAdapter)) - // if ok := controllerutil.AddFinalizer(modelAdapter, ModelAdapterFinalizer); !ok { - // klog.Error("Failed to add finalizer for ModelAdapter") - // return ctrl.Result{Requeue: true}, nil - // } - // if err := r.Update(ctx, modelAdapter); err != nil { - // klog.Error("Failed to update custom resource to add finalizer") - // return ctrl.Result{}, err - // } - // } - // } else { - // // the object is being deleted - // if controllerutil.ContainsFinalizer(modelAdapter, ModelAdapterFinalizer) { - // // the finalizer is present, so let's unload lora from those inference engines - // // note: the base model pod could be deleted as well, so here we do best effort offloading - // // we do not need to reconcile the object if it encounters the unloading error. - // if err := r.unloadModelAdapter(modelAdapter); err != nil { - // return ctrl.Result{}, err - // } - // if ok := controllerutil.RemoveFinalizer(modelAdapter, ModelAdapterFinalizer); !ok { - // klog.Error("Failed to remove finalizer for ModelAdapter") - // return ctrl.Result{Requeue: true}, nil - // } - // if err := r.Update(ctx, modelAdapter); err != nil { - // klog.Error("Failed to update custom resource to remove finalizer") - // return ctrl.Result{}, err - // } - // } - // // Stop reconciliation as the item is being deleted - // return ctrl.Result{}, nil - // } - return r.DoReconcile(ctx, req, model) } @@ -222,7 +140,7 @@ func (r *ModelReconciler) DoReconcile(ctx context.Context, req ctrl.Request, ins if instance.Status.Conditions == nil || len(instance.Status.Conditions) == 0 { instance.Status.Phase = modelv1alpha1.ModelPending condition := NewCondition(string(modelv1alpha1.ModelConditionTypeInitialized), metav1.ConditionUnknown, - ModelAdapterInitializedReason, "Starting reconciliation") + ModelInitializedReason, "Starting reconciliation") if err := r.updateStatus(ctx, instance, condition); err != nil { return reconcile.Result{}, err } else { @@ -231,40 +149,26 @@ func (r *ModelReconciler) DoReconcile(ctx context.Context, req ctrl.Request, ins } oldInstance := instance.DeepCopy() - // Step 0: Validate ModelAdapter configurations - // if err := validateModelAdapter(instance); err != nil { - // klog.Error(err, "Failed to validate the ModelAdapter") - // instance.Status.Phase = modelv1alpha1.ModelAdapterFailed - // condition := NewCondition(string(modelv1alpha1.ModelAdapterPending), metav1.ConditionFalse, - // ValidationFailedReason, "ModelAdapter resource is not valid") - // // TODO: no need to update the status if the status remain the same - // if updateErr := r.updateStatus(ctx, instance, condition); updateErr != nil { - // klog.ErrorS(err, "Failed to update ModelAdapter status", "modelAdapter", klog.KObj(instance)) - // return reconcile.Result{}, updateErr - // } - - // return ctrl.Result{}, err - // } - - // Step 3: Reconcile Service + + // Step 1: Reconcile Service if ctrlResult, err := r.reconcileService(ctx, instance); err != nil { instance.Status.Phase = modelv1alpha1.ModelResourceCreated condition := NewCondition(string(modelv1alpha1.ModelConditionTypeResourceCreated), metav1.ConditionFalse, FailedServiceCreateReason, "service creation failure") if err := r.updateStatus(ctx, instance, condition); err != nil { - klog.InfoS("Got error when updating status", req.Name, "error", err, "ModelAdapter", instance) + klog.InfoS("Got error when updating status", req.Name, "error", err, "Model", instance) return ctrl.Result{}, err } return ctrlResult, err } - // Step 4: Reconcile EndpointSlice + // Step 2: Reconcile Deployment if ctrlResult, err := r.reconcileDeployment(ctx, instance); err != nil { instance.Status.Phase = modelv1alpha1.ModelResourceCreated condition := NewCondition(string(modelv1alpha1.ModelConditionTypeResourceCreated), metav1.ConditionFalse, - FailedEndpointSliceCreateReason, "deployment creation failure") + FailedDeploymentCreateReason, "deployment creation failure") if err := r.updateStatus(ctx, instance, condition); err != nil { - klog.InfoS("Got error when updating status", "error", err, "ModelAdapter", instance) + klog.InfoS("Got error when updating status", "error", err, "Model", instance) return ctrl.Result{}, err } return ctrlResult, err @@ -272,10 +176,10 @@ func (r *ModelReconciler) DoReconcile(ctx context.Context, req ctrl.Request, ins // Check if we need to update the status. if r.inconsistentModelStatus(oldInstance.Status, instance.Status) { - condition := NewCondition(string(modelv1alpha1.ModelAdapterConditionReady), metav1.ConditionTrue, - ModelAdapterAvailable, fmt.Sprintf("ModelAdapter %s is ready", klog.KObj(instance))) + condition := NewCondition(string(modelv1alpha1.ModelConditionReady), metav1.ConditionTrue, + ModelAvailable, fmt.Sprintf("Model %s is ready", klog.KObj(instance))) if err := r.updateStatus(ctx, instance, condition); err != nil { - return reconcile.Result{}, fmt.Errorf("update modelAdapter status error: %v", err) + return reconcile.Result{}, fmt.Errorf("update model status error: %v", err) } } @@ -291,16 +195,16 @@ func (r *ModelReconciler) reconcileService(ctx context.Context, instance *modelv svc := buildModelService(instance) // Set the owner reference if err := ctrl.SetControllerReference(instance, svc, r.Scheme); err != nil { - klog.Error(err, "Failed to set controller reference to modelAdapter") + klog.Error(err, "Failed to set controller reference to model") return ctrl.Result{}, err } // create service klog.InfoS("Creating a new service", "service", klog.KObj(svc)) if err = r.Create(ctx, svc); err != nil { - klog.ErrorS(err, "Failed to create new service resource for ModelAdapter", "service", klog.KObj(svc)) - condition := NewCondition(string(modelv1alpha1.ModelAdapterConditionTypeResourceCreated), metav1.ConditionFalse, - FailedServiceCreateReason, fmt.Sprintf("Failed to create Service for the modeladapter (%s): (%s)", klog.KObj(instance), err)) + klog.ErrorS(err, "Failed to create new service resource for Model", "service", klog.KObj(svc)) + condition := NewCondition(string(modelv1alpha1.ModelConditionTypeResourceCreated), metav1.ConditionFalse, + FailedServiceCreateReason, fmt.Sprintf("Failed to create Service for the model (%s): (%s)", klog.KObj(instance), err)) if err := r.updateStatus(ctx, instance, condition); err != nil { return ctrl.Result{}, err } @@ -396,9 +300,9 @@ func buildModelDeployment(instance *modelv1alpha1.Model) *appsv1.Deployment { } deploymentLabels := map[string]string{ - "model.aibrix.ai/name": instance.Name, - "model.aibrix.ai/port": "8000", - "adapter.model.aibrix.ai/enabled": "true", + "model.aibrix.ai/name": instance.Name, + "model.aibrix.ai/port": "8000", + ".model.aibrix.ai/enabled": "true", } podTemplate := instance.Spec.Template @@ -446,16 +350,12 @@ func NewCondition(condType string, status metav1.ConditionStatus, reason, msg st } func (r *ModelReconciler) updateStatus(ctx context.Context, instance *modelv1alpha1.Model, condition metav1.Condition) error { - klog.InfoS("model adapter reconcile", "Update CR status", instance.Name, "status", instance.Status) + klog.InfoS("model reconcile", "Update CR status", instance.Name, "status", instance.Status) meta.SetStatusCondition(&instance.Status.Conditions, condition) return r.Status().Update(ctx, instance) } func (r *ModelReconciler) inconsistentModelStatus(oldStatus, newStatus modelv1alpha1.ModelStatus) bool { // Implement your logic to check if the status is inconsistent - if oldStatus.Phase != newStatus.Phase { - return true - } - - return false + return oldStatus.Phase != newStatus.Phase } From a561c61417289013aef66ac993188438c3bb69fc Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Wed, 16 Oct 2024 14:30:14 -0700 Subject: [PATCH 3/4] nit fix in init container command for redis check --- config/gateway/gateway-plugin.yaml | 2 +- config/gateway/users.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/gateway/gateway-plugin.yaml b/config/gateway/gateway-plugin.yaml index 996e7bd1..03ac5116 100644 --- a/config/gateway/gateway-plugin.yaml +++ b/config/gateway/gateway-plugin.yaml @@ -29,7 +29,7 @@ spec: initContainers: - name: init-c image: busybox - command: ['sh', '-c', "until echo \"ping\" | nc aibrix-redis-master 6379 | grep -c PONG; do echo waiting for service aibrix-redis-master; sleep 2; done"] + command: ['sh', '-c', 'until echo "ping" | nc aibrix-redis-master 6379 | grep -c PONG; do echo waiting for service aibrix-redis-master; sleep 2; done'] containers: - name: gateway-plugin image: plugins:latest diff --git a/config/gateway/users.yaml b/config/gateway/users.yaml index a6e979d4..d64f80b9 100644 --- a/config/gateway/users.yaml +++ b/config/gateway/users.yaml @@ -29,7 +29,7 @@ spec: initContainers: - name: init-c image: busybox:stable - command: ['sh', '-c', "until echo \"ping\" | nc aibrix-redis-master 6379 | grep -c PONG; do echo waiting for service aibrix-redis-master; sleep 2; done"] + command: ['sh', '-c', 'until echo "ping" | nc aibrix-redis-master 6379 | grep -c PONG; do echo waiting for service aibrix-redis-master; sleep 2; done'] containers: - name: gateway-users image: users:latest From 16267a9c2b657298ff2f61879004a30315672ad3 Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Wed, 16 Oct 2024 15:23:33 -0700 Subject: [PATCH 4/4] add timeout for nc command for redis check --- config/gateway/gateway-plugin.yaml | 2 +- config/gateway/users.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/gateway/gateway-plugin.yaml b/config/gateway/gateway-plugin.yaml index 03ac5116..07c1afe6 100644 --- a/config/gateway/gateway-plugin.yaml +++ b/config/gateway/gateway-plugin.yaml @@ -29,7 +29,7 @@ spec: initContainers: - name: init-c image: busybox - command: ['sh', '-c', 'until echo "ping" | nc aibrix-redis-master 6379 | grep -c PONG; do echo waiting for service aibrix-redis-master; sleep 2; done'] + command: ['sh', '-c', 'until echo "ping" | nc aibrix-redis-master 6379 -w 1 | grep -c PONG; do echo waiting for service aibrix-redis-master; sleep 2; done'] containers: - name: gateway-plugin image: plugins:latest diff --git a/config/gateway/users.yaml b/config/gateway/users.yaml index d64f80b9..bff92a74 100644 --- a/config/gateway/users.yaml +++ b/config/gateway/users.yaml @@ -29,7 +29,7 @@ spec: initContainers: - name: init-c image: busybox:stable - command: ['sh', '-c', 'until echo "ping" | nc aibrix-redis-master 6379 | grep -c PONG; do echo waiting for service aibrix-redis-master; sleep 2; done'] + command: ['sh', '-c', 'until echo "ping" | nc aibrix-redis-master 6379 -w 1 | grep -c PONG; do echo waiting for service aibrix-redis-master; sleep 2; done'] containers: - name: gateway-users image: users:latest