diff --git a/Makefile b/Makefile index 5c478b96..71f0730f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Image URL to use all building/pushing image targets -VERSION ?= v0.8.1 +VERSION ?= v0.8.2 IMG ?= docker.io/substratusai/controller-manager:${VERSION} IMG_SCI_KIND ?= docker.io/substratusai/sci-kind:${VERSION} IMG_SCI_GCP ?= docker.io/substratusai/sci-gcp:${VERSION} diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index bfdbce3a..bfcb4760 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -5,4 +5,4 @@ kind: Kustomization images: - name: controller newName: docker.io/substratusai/controller-manager - newTag: v0.8.1 + newTag: v0.8.2 diff --git a/config/sci-gcp/kustomization.yaml b/config/sci-gcp/kustomization.yaml index 833660cc..74c2ea8e 100644 --- a/config/sci-gcp/kustomization.yaml +++ b/config/sci-gcp/kustomization.yaml @@ -5,4 +5,4 @@ kind: Kustomization images: - name: sci newName: docker.io/substratusai/sci-gcp - newTag: v0.8.1 + newTag: v0.8.2 diff --git a/config/sci-kind/kustomization.yaml b/config/sci-kind/kustomization.yaml index 54d636eb..f60bcaa1 100644 --- a/config/sci-kind/kustomization.yaml +++ b/config/sci-kind/kustomization.yaml @@ -8,4 +8,4 @@ kind: Kustomization images: - name: sci newName: docker.io/substratusai/sci-kind - newTag: v0.8.1 + newTag: v0.8.2 diff --git a/docs/releases.md b/docs/releases.md index 90855f45..a0ef5544 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -10,7 +10,7 @@ Generating releases is done by doing the following: 2. Generate the new install manifest that points to the new image ```sh - make install/kubernetes/system.yaml + make prepare-release ``` 3. Submit a PR diff --git a/install/gcp/manifests.yaml b/install/gcp/manifests.yaml new file mode 100644 index 00000000..416e1346 --- /dev/null +++ b/install/gcp/manifests.yaml @@ -0,0 +1,1640 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + app.kubernetes.io/component: manager + app.kubernetes.io/created-by: substratus + app.kubernetes.io/instance: system + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: namespace + app.kubernetes.io/part-of: substratus + control-plane: controller-manager + name: substratus +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.11.3 + creationTimestamp: null + name: datasets.substratus.ai +spec: + group: substratus.ai + names: + categories: + - ai + kind: Dataset + listKind: DatasetList + plural: datasets + shortNames: + - data + singular: dataset + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.ready + name: Ready + type: boolean + name: v1 + schema: + openAPIV3Schema: + description: "The Dataset API is used to describe data that can be referenced + for training Models. \n - Datasets pull in remote data sources using containerized + data loaders. \n - Users can specify their own ETL logic by referencing + a repository from a Dataset. \n - Users can leverage pre-built data loader + integrations with various sources. \n - Training typically requires a large + dataset. The Dataset API pulls a dataset once and stores it in a bucket, + which is mounted directly into training Jobs. \n - The Dataset API allows + users to query ready-to-use datasets (`kubectl get datasets`). \n - The + Dataset API allows Kubernetes RBAC to be applied as a mechanism for controlling + access to data." + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec is the desired state of the Dataset. + properties: + build: + description: Build specifies how to build an image. + properties: + git: + description: Git is a reference to a git repository that will + be built within the cluster. Built image will be set in the + .spec.image field. + properties: + branch: + description: Branch is the git branch to use. Choose either + branch or tag. This branch will be pulled only at build + time and not monitored for changes. + type: string + path: + description: Path within the git repository referenced by + url. + type: string + tag: + description: Tag is the git tag to use. Choose either tag + or branch. This tag will be pulled only at build time and + not monitored for changes. + type: string + url: + description: 'URL to the git repository to build. Example: + https://github.com/my-username/my-repo' + type: string + required: + - url + type: object + x-kubernetes-map-type: atomic + upload: + description: Upload can be set to request to start an upload flow + where the client is responsible for uploading a local directory + that is to be built in the cluster. + properties: + md5Checksum: + description: MD5Checksum is the md5 checksum of the tar'd + repo root requested to be uploaded and built. + maxLength: 32 + minLength: 32 + pattern: ^[a-fA-F0-9]{32}$ + type: string + requestID: + description: RequestID is the ID of the request to build the + image. Changing this ID to a new value can be used to get + a new signed URL (useful when a URL has expired). + type: string + required: + - md5Checksum + - requestID + type: object + x-kubernetes-map-type: atomic + type: object + x-kubernetes-map-type: atomic + command: + description: Command to run in the container. + items: + type: string + type: array + image: + description: Image that contains dataset loading code and dependencies. + type: string + params: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: Params will be passed into the loading process as environment + variables. + type: object + resources: + description: Resources are the compute resources required by the container. + properties: + cpu: + default: 2 + description: CPU resources. + format: int64 + type: integer + disk: + default: 10 + description: Disk size in Gigabytes. + format: int64 + type: integer + gpu: + description: GPU resources. + properties: + count: + description: Count is the number of GPUs. + format: int64 + type: integer + type: + description: Type of GPU. + type: string + type: object + memory: + default: 10 + description: Memory is the amount of RAM in Gigabytes. + format: int64 + type: integer + type: object + type: object + status: + description: Status is the observed state of the Dataset. + properties: + artifacts: + description: Artifacts status. + properties: + url: + type: string + type: object + buildUpload: + description: BuildUpload contains the status of the build context + upload. + properties: + expiration: + description: Expiration is the time at which the signed URL expires. + format: date-time + type: string + requestID: + description: RequestID is the request id that corresponds to this + status. Clients should check that this matches the request id + that they set in the upload spec before uploading. + type: string + signedURL: + description: SignedURL is a short lived HTTPS URL. The client + is expected to send a PUT request to this URL containing a tar'd + docker build context. Content-Type of "application/octet-stream" + should be used. + type: string + storedMD5Checksum: + description: StoredMD5Checksum is the md5 checksum of the file + that the controller observed in storage. + type: string + type: object + conditions: + description: Conditions is the list of conditions that describe the + current state of the Dataset. + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + 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 + ready: + default: false + description: Ready indicates that the Dataset is ready to use. See + Conditions for more details. + type: boolean + required: + - ready + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.11.3 + creationTimestamp: null + name: models.substratus.ai +spec: + group: substratus.ai + names: + categories: + - ai + kind: Model + listKind: ModelList + plural: models + singular: model + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.ready + name: Ready + type: boolean + name: v1 + schema: + openAPIV3Schema: + description: "The Model API is used to build and train machine learning models. + \n - Base models can be built from a Git repository. \n - Models can be + trained by combining a base Model with a Dataset. \n - Model artifacts are + persisted in cloud buckets." + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec is the desired state of the Model. + properties: + baseModel: + description: BaseModel should be set in order to mount another model + to be used for transfer learning. + properties: + name: + description: Name of Kubernetes object. + type: string + required: + - name + type: object + build: + description: Build specifies how to build an image. + properties: + git: + description: Git is a reference to a git repository that will + be built within the cluster. Built image will be set in the + .spec.image field. + properties: + branch: + description: Branch is the git branch to use. Choose either + branch or tag. This branch will be pulled only at build + time and not monitored for changes. + type: string + path: + description: Path within the git repository referenced by + url. + type: string + tag: + description: Tag is the git tag to use. Choose either tag + or branch. This tag will be pulled only at build time and + not monitored for changes. + type: string + url: + description: 'URL to the git repository to build. Example: + https://github.com/my-username/my-repo' + type: string + required: + - url + type: object + x-kubernetes-map-type: atomic + upload: + description: Upload can be set to request to start an upload flow + where the client is responsible for uploading a local directory + that is to be built in the cluster. + properties: + md5Checksum: + description: MD5Checksum is the md5 checksum of the tar'd + repo root requested to be uploaded and built. + maxLength: 32 + minLength: 32 + pattern: ^[a-fA-F0-9]{32}$ + type: string + requestID: + description: RequestID is the ID of the request to build the + image. Changing this ID to a new value can be used to get + a new signed URL (useful when a URL has expired). + type: string + required: + - md5Checksum + - requestID + type: object + x-kubernetes-map-type: atomic + type: object + x-kubernetes-map-type: atomic + command: + description: Command to run in the container. + items: + type: string + type: array + image: + description: Image that contains model code and dependencies. + type: string + params: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: Parameters are passing into the model training/loading + container as environment variables. Environment variable name will + be `"PARAM_" + uppercase(key)`. + type: object + resources: + description: Resources are the compute resources required by the container. + properties: + cpu: + default: 2 + description: CPU resources. + format: int64 + type: integer + disk: + default: 10 + description: Disk size in Gigabytes. + format: int64 + type: integer + gpu: + description: GPU resources. + properties: + count: + description: Count is the number of GPUs. + format: int64 + type: integer + type: + description: Type of GPU. + type: string + type: object + memory: + default: 10 + description: Memory is the amount of RAM in Gigabytes. + format: int64 + type: integer + type: object + trainingDataset: + description: Dataset to mount for training. + properties: + name: + description: Name of Kubernetes object. + type: string + required: + - name + type: object + type: object + status: + description: Status is the observed state of the Model. + properties: + artifacts: + description: Artifacts status. + properties: + url: + type: string + type: object + buildUpload: + description: BuildUpload contains the status of the build context + upload. + properties: + expiration: + description: Expiration is the time at which the signed URL expires. + format: date-time + type: string + requestID: + description: RequestID is the request id that corresponds to this + status. Clients should check that this matches the request id + that they set in the upload spec before uploading. + type: string + signedURL: + description: SignedURL is a short lived HTTPS URL. The client + is expected to send a PUT request to this URL containing a tar'd + docker build context. Content-Type of "application/octet-stream" + should be used. + type: string + storedMD5Checksum: + description: StoredMD5Checksum is the md5 checksum of the file + that the controller observed in storage. + type: string + type: object + conditions: + description: Conditions is the list of conditions that describe the + current state of the Model. + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + 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 + ready: + default: false + description: Ready indicates that the Model is ready to use. See Conditions + for more details. + type: boolean + required: + - ready + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.11.3 + creationTimestamp: null + name: notebooks.substratus.ai +spec: + group: substratus.ai + names: + categories: + - ai + kind: Notebook + listKind: NotebookList + plural: notebooks + shortNames: + - nb + singular: notebook + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.ready + name: Ready + type: boolean + name: v1 + schema: + openAPIV3Schema: + description: "The Notebook API can be used to quickly spin up a development + environment backed by high performance compute. \n - Notebooks integrate + with the Model and Dataset APIs allow for quick iteration. \n - Notebooks + can be synced to local directories to streamline developer experiences using + Substratus kubectl plugins." + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec is the observed state of the Notebook. + properties: + build: + description: Build specifies how to build an image. + properties: + git: + description: Git is a reference to a git repository that will + be built within the cluster. Built image will be set in the + .spec.image field. + properties: + branch: + description: Branch is the git branch to use. Choose either + branch or tag. This branch will be pulled only at build + time and not monitored for changes. + type: string + path: + description: Path within the git repository referenced by + url. + type: string + tag: + description: Tag is the git tag to use. Choose either tag + or branch. This tag will be pulled only at build time and + not monitored for changes. + type: string + url: + description: 'URL to the git repository to build. Example: + https://github.com/my-username/my-repo' + type: string + required: + - url + type: object + x-kubernetes-map-type: atomic + upload: + description: Upload can be set to request to start an upload flow + where the client is responsible for uploading a local directory + that is to be built in the cluster. + properties: + md5Checksum: + description: MD5Checksum is the md5 checksum of the tar'd + repo root requested to be uploaded and built. + maxLength: 32 + minLength: 32 + pattern: ^[a-fA-F0-9]{32}$ + type: string + requestID: + description: RequestID is the ID of the request to build the + image. Changing this ID to a new value can be used to get + a new signed URL (useful when a URL has expired). + type: string + required: + - md5Checksum + - requestID + type: object + x-kubernetes-map-type: atomic + type: object + x-kubernetes-map-type: atomic + command: + description: Command to run in the container. + items: + type: string + type: array + dataset: + description: Dataset to load into the notebook container. + properties: + name: + description: Name of Kubernetes object. + type: string + required: + - name + type: object + image: + description: Image that contains notebook and dependencies. + type: string + model: + description: Model to load into the notebook container. + properties: + name: + description: Name of Kubernetes object. + type: string + required: + - name + type: object + params: + additionalProperties: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + description: Params will be passed into the notebook container as + environment variables. + type: object + resources: + description: Resources are the compute resources required by the container. + properties: + cpu: + default: 2 + description: CPU resources. + format: int64 + type: integer + disk: + default: 10 + description: Disk size in Gigabytes. + format: int64 + type: integer + gpu: + description: GPU resources. + properties: + count: + description: Count is the number of GPUs. + format: int64 + type: integer + type: + description: Type of GPU. + type: string + type: object + memory: + default: 10 + description: Memory is the amount of RAM in Gigabytes. + format: int64 + type: integer + type: object + suspend: + description: Suspend should be set to true to stop the notebook (Pod) + from running. This is a pointer to distinguish between explicit + false and not specified. + type: boolean + type: object + status: + description: Status is the observed state of the Notebook. + properties: + buildUpload: + description: BuildUpload contains the status of the build context + upload. + properties: + expiration: + description: Expiration is the time at which the signed URL expires. + format: date-time + type: string + requestID: + description: RequestID is the request id that corresponds to this + status. Clients should check that this matches the request id + that they set in the upload spec before uploading. + type: string + signedURL: + description: SignedURL is a short lived HTTPS URL. The client + is expected to send a PUT request to this URL containing a tar'd + docker build context. Content-Type of "application/octet-stream" + should be used. + type: string + storedMD5Checksum: + description: StoredMD5Checksum is the md5 checksum of the file + that the controller observed in storage. + type: string + type: object + conditions: + description: Conditions is the list of conditions that describe the + current state of the Notebook. + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + 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 + ready: + default: false + description: Ready indicates that the Notebook is ready to serve. + See Conditions for more details. + type: boolean + required: + - ready + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.11.3 + creationTimestamp: null + name: servers.substratus.ai +spec: + group: substratus.ai + names: + categories: + - ai + kind: Server + listKind: ServerList + plural: servers + singular: server + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.ready + name: Ready + type: boolean + name: v1 + schema: + openAPIV3Schema: + description: The Server API is used to deploy a server that exposes the capabilities + of a Model via a HTTP interface. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec is the desired state of the Server. + properties: + build: + description: Build specifies how to build an image. + properties: + git: + description: Git is a reference to a git repository that will + be built within the cluster. Built image will be set in the + .spec.image field. + properties: + branch: + description: Branch is the git branch to use. Choose either + branch or tag. This branch will be pulled only at build + time and not monitored for changes. + type: string + path: + description: Path within the git repository referenced by + url. + type: string + tag: + description: Tag is the git tag to use. Choose either tag + or branch. This tag will be pulled only at build time and + not monitored for changes. + type: string + url: + description: 'URL to the git repository to build. Example: + https://github.com/my-username/my-repo' + type: string + required: + - url + type: object + x-kubernetes-map-type: atomic + upload: + description: Upload can be set to request to start an upload flow + where the client is responsible for uploading a local directory + that is to be built in the cluster. + properties: + md5Checksum: + description: MD5Checksum is the md5 checksum of the tar'd + repo root requested to be uploaded and built. + maxLength: 32 + minLength: 32 + pattern: ^[a-fA-F0-9]{32}$ + type: string + requestID: + description: RequestID is the ID of the request to build the + image. Changing this ID to a new value can be used to get + a new signed URL (useful when a URL has expired). + type: string + required: + - md5Checksum + - requestID + type: object + x-kubernetes-map-type: atomic + type: object + x-kubernetes-map-type: atomic + command: + description: Command to run in the container. + items: + type: string + type: array + image: + description: Image that contains model serving application and dependencies. + type: string + model: + description: Model references the Model object to be served. + properties: + name: + description: Name of Kubernetes object. + type: string + required: + - name + type: object + resources: + description: Resources are the compute resources required by the container. + properties: + cpu: + default: 2 + description: CPU resources. + format: int64 + type: integer + disk: + default: 10 + description: Disk size in Gigabytes. + format: int64 + type: integer + gpu: + description: GPU resources. + properties: + count: + description: Count is the number of GPUs. + format: int64 + type: integer + type: + description: Type of GPU. + type: string + type: object + memory: + default: 10 + description: Memory is the amount of RAM in Gigabytes. + format: int64 + type: integer + type: object + type: object + status: + description: Status is the observed state of the Server. + properties: + buildUpload: + description: Upload contains the status of the build context upload. + properties: + expiration: + description: Expiration is the time at which the signed URL expires. + format: date-time + type: string + requestID: + description: RequestID is the request id that corresponds to this + status. Clients should check that this matches the request id + that they set in the upload spec before uploading. + type: string + signedURL: + description: SignedURL is a short lived HTTPS URL. The client + is expected to send a PUT request to this URL containing a tar'd + docker build context. Content-Type of "application/octet-stream" + should be used. + type: string + storedMD5Checksum: + description: StoredMD5Checksum is the md5 checksum of the file + that the controller observed in storage. + type: string + type: object + conditions: + description: Conditions is the list of conditions that describe the + current state of the Server. + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + 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 + ready: + default: false + description: Ready indicates whether the Server is ready to serve + traffic. See Conditions for more details. + type: boolean + required: + - ready + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: substratus + app.kubernetes.io/instance: controller-manager-sa + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: serviceaccount + app.kubernetes.io/part-of: substratus + name: controller-manager + namespace: substratus +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: sci + namespace: substratus +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: substratus + app.kubernetes.io/instance: leader-election-role + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: role + app.kubernetes.io/part-of: substratus + name: leader-election-role + namespace: substratus +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: manager-role +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - pods + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - deployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - batch + resources: + - jobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - substratus.ai + resources: + - datasets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - substratus.ai + resources: + - datasets/finalizers + verbs: + - update +- apiGroups: + - substratus.ai + resources: + - datasets/status + verbs: + - get + - patch + - update +- apiGroups: + - substratus.ai + resources: + - models + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - substratus.ai + resources: + - models/finalizers + verbs: + - update +- apiGroups: + - substratus.ai + resources: + - models/status + verbs: + - get + - patch + - update +- apiGroups: + - substratus.ai + resources: + - notebooks + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - substratus.ai + resources: + - notebooks/finalizers + verbs: + - update +- apiGroups: + - substratus.ai + resources: + - notebooks/status + verbs: + - get + - patch + - update +- apiGroups: + - substratus.ai + resources: + - servers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - substratus.ai + resources: + - servers/finalizers + verbs: + - update +- apiGroups: + - substratus.ai + resources: + - servers/status + verbs: + - get + - patch + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: substratus + app.kubernetes.io/instance: metrics-reader + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: clusterrole + app.kubernetes.io/part-of: substratus + name: metrics-reader +rules: +- nonResourceURLs: + - /metrics + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: substratus + app.kubernetes.io/instance: proxy-role + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: clusterrole + app.kubernetes.io/part-of: substratus + name: proxy-role +rules: +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: substratus + app.kubernetes.io/instance: leader-election-rolebinding + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: rolebinding + app.kubernetes.io/part-of: substratus + name: leader-election-rolebinding + namespace: substratus +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: leader-election-role +subjects: +- kind: ServiceAccount + name: controller-manager + namespace: substratus +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: substratus + app.kubernetes.io/instance: manager-rolebinding + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: clusterrolebinding + app.kubernetes.io/part-of: substratus + name: manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: manager-role +subjects: +- kind: ServiceAccount + name: controller-manager + namespace: substratus +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: substratus + app.kubernetes.io/instance: proxy-rolebinding + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: clusterrolebinding + app.kubernetes.io/part-of: substratus + name: proxy-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: proxy-role +subjects: +- kind: ServiceAccount + name: controller-manager + namespace: substratus +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: substratus + app.kubernetes.io/instance: controller-manager-metrics-service + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: service + app.kubernetes.io/part-of: substratus + control-plane: controller-manager + name: controller-manager-metrics-service + namespace: substratus +spec: + ports: + - name: https + port: 8443 + protocol: TCP + targetPort: https + selector: + control-plane: controller-manager +--- +apiVersion: v1 +kind: Service +metadata: + name: sci + namespace: substratus +spec: + ports: + - name: grpc-sci + port: 10080 + protocol: TCP + targetPort: 10080 + selector: + app: sci +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/component: manager + app.kubernetes.io/created-by: substratus + app.kubernetes.io/instance: controller-manager + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: deployment + app.kubernetes.io/part-of: substratus + control-plane: controller-manager + name: controller-manager + namespace: substratus +spec: + replicas: 1 + selector: + matchLabels: + control-plane: controller-manager + template: + metadata: + annotations: + kubectl.kubernetes.io/default-container: manager + labels: + control-plane: controller-manager + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - amd64 + - arm64 + - ppc64le + - s390x + - key: kubernetes.io/os + operator: In + values: + - linux + containers: + - args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1 + name: kube-rbac-proxy + ports: + - containerPort: 8443 + name: https + protocol: TCP + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + - args: + - --health-probe-bind-address=:8081 + - --metrics-bind-address=127.0.0.1:8080 + - --leader-elect + command: + - /manager + envFrom: + - configMapRef: + name: system + image: docker.io/substratusai/controller-manager:v0.8.2 + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + name: manager + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 10m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + securityContext: + runAsNonRoot: true + serviceAccountName: controller-manager + terminationGracePeriodSeconds: 10 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: sci + namespace: substratus +spec: + replicas: 1 + selector: + matchLabels: + app: sci + template: + metadata: + labels: + app: sci + spec: + containers: + - envFrom: + - configMapRef: + name: system + image: docker.io/substratusai/sci-gcp:v0.8.2 + imagePullPolicy: Always + livenessProbe: + failureThreshold: 3 + initialDelaySeconds: 15 + periodSeconds: 20 + successThreshold: 1 + tcpSocket: + port: 10080 + timeoutSeconds: 5 + name: sci + ports: + - containerPort: 10080 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 10m + memory: 64Mi + serviceAccountName: sci + terminationGracePeriodSeconds: 10 diff --git a/install/kind/manifests.yaml b/install/kind/manifests.yaml index 5d708c32..2db9d3a7 100644 --- a/install/kind/manifests.yaml +++ b/install/kind/manifests.yaml @@ -1631,7 +1631,7 @@ spec: envFrom: - configMapRef: name: system - image: docker.io/substratusai/controller-manager:v0.8.1 + image: docker.io/substratusai/controller-manager:v0.8.2 livenessProbe: httpGet: path: /healthz @@ -1710,7 +1710,7 @@ spec: - envFrom: - configMapRef: name: system - image: docker.io/substratusai/sci-kind:v0.8.1 + image: docker.io/substratusai/sci-kind:v0.8.2 imagePullPolicy: Always livenessProbe: failureThreshold: 3 diff --git a/install/kubectl-plugins.sh b/install/kubectl-plugins.sh index 30b0d552..39b785ef 100755 --- a/install/kubectl-plugins.sh +++ b/install/kubectl-plugins.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -xe -version=v0.8.1 +version=v0.8.2 os=$(uname -s) arch=$(uname -m | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g')