Unverified Commit 26fe79dc authored by julienmancuso's avatar julienmancuso Committed by GitHub
Browse files

feat: rename operator CRDs (#795)

parent a03fd307
......@@ -176,39 +176,39 @@ func main() {
setupLog.Error(err, "unable to create etcd client")
os.Exit(1)
}
if err = (&controller.DynamoNimDeploymentReconciler{
if err = (&controller.DynamoComponentDeploymentReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Recorder: mgr.GetEventRecorderFor("dynamo-deployment"),
Recorder: mgr.GetEventRecorderFor("dynamocomponentdeployment"),
Config: ctrlConfig,
NatsAddr: natsAddr,
EtcdAddr: etcdAddr,
EtcdStorage: etcd.NewStorage(cli),
UseVirtualService: istioVirtualServiceGateway != "",
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "DynamoNimDeployment")
setupLog.Error(err, "unable to create controller", "controller", "DynamoComponentDeployment")
os.Exit(1)
}
if err = (&controller.DynamoNimRequestReconciler{
if err = (&controller.DynamoComponentRequestReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Recorder: mgr.GetEventRecorderFor("dynamo-image-builder"),
Config: ctrlConfig,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "DynamoNimRequest")
setupLog.Error(err, "unable to create controller", "controller", "DynamoComponentRequest")
os.Exit(1)
}
if err = (&controller.DynamoDeploymentReconciler{
if err = (&controller.DynamoGraphDeploymentReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Recorder: mgr.GetEventRecorderFor("dynamodeployment"),
Recorder: mgr.GetEventRecorderFor("dynamographdeployment"),
Config: ctrlConfig,
VirtualServiceGateway: istioVirtualServiceGateway,
IngressControllerClassName: ingressControllerClassName,
IngressControllerTLSSecret: ingressControllerTLSSecretName,
IngressHostSuffix: ingressHostSuffix,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "DynamoDeployment")
setupLog.Error(err, "unable to create controller", "controller", "DynamoGraphDeployment")
os.Exit(1)
}
//+kubebuilder:scaffold:builder
......
......@@ -19,20 +19,20 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.4
name: dynamonimdeployments.nvidia.com
name: dynamocomponentdeployments.nvidia.com
spec:
group: nvidia.com
names:
kind: DynamoNimDeployment
listKind: DynamoNimDeploymentList
plural: dynamonimdeployments
singular: dynamonimdeployment
kind: DynamoComponentDeployment
listKind: DynamoComponentDeploymentList
plural: dynamocomponentdeployments
singular: dynamocomponentdeployment
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Bento
jsonPath: .spec.bento
name: Bento
- description: Dynamo component
jsonPath: .spec.dynamoComponent
name: DynamoComponent
type: string
- description: Available
jsonPath: .status.conditions[?(@.type=='Available')].status
......@@ -389,9 +389,9 @@ spec:
minReplicas:
type: integer
type: object
dynamoNamespace:
dynamoComponent:
type: string
dynamoNim:
dynamoNamespace:
type: string
dynamoTag:
type: string
......@@ -2798,7 +2798,7 @@ spec:
serviceName:
type: string
required:
- dynamoNim
- dynamoComponent
- dynamoTag
type: object
status:
......
......@@ -19,36 +19,32 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.4
name: dynamonimrequests.nvidia.com
name: dynamocomponentrequests.nvidia.com
spec:
group: nvidia.com
names:
kind: DynamoNimRequest
listKind: DynamoNimRequestList
plural: dynamonimrequests
singular: dynamonimrequest
kind: DynamoComponentRequest
listKind: DynamoComponentRequestList
plural: dynamocomponentrequests
singular: dynamocomponentrequest
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Bento Tag
jsonPath: .spec.bentoTag
name: Bento-Tag
- description: Dynamo component
jsonPath: .spec.dynamoComponent
name: DynamoComponent
type: string
- description: Download URL
jsonPath: .spec.downloadUrl
name: Download-Url
type: string
- description: Image
jsonPath: .spec.image
name: Image
type: string
- description: Image Exists
jsonPath: .status.conditions[?(@.type=='ImageExists')].status
name: Image-Exists
type: string
- description: Bento Available
jsonPath: .status.conditions[?(@.type=='BentoAvailable')].status
name: Bento-Available
- description: Dynamo Component Available
jsonPath: .status.conditions[?(@.type=='DynamoComponentAvailable')].status
name: DynamoComponent-Available
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
......@@ -65,17 +61,10 @@ spec:
type: object
spec:
properties:
bentoTag:
type: string
buildArgs:
items:
type: string
type: array
context:
properties:
bentomlVersion:
type: string
type: object
dockerConfigJsonSecretName:
type: string
downloadUrl:
......@@ -105,6 +94,8 @@ spec:
x-kubernetes-map-type: atomic
type: object
type: array
dynamoComponent:
type: string
image:
type: string
imageBuildTimeout:
......@@ -1422,29 +1413,12 @@ spec:
type: object
type: array
type: object
models:
items:
properties:
downloadUrl:
type: string
size:
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
tag:
type: string
required:
- tag
type: object
type: array
ociRegistryInsecure:
type: boolean
serviceName:
type: string
required:
- bentoTag
- dynamoComponent
type: object
status:
properties:
......
......@@ -19,14 +19,14 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.4
name: dynamonims.nvidia.com
name: dynamocomponents.nvidia.com
spec:
group: nvidia.com
names:
kind: DynamoNim
listKind: DynamoNimList
plural: dynamonims
singular: dynamonim
kind: DynamoComponent
listKind: DynamoComponentList
plural: dynamocomponents
singular: dynamocomponent
scope: Namespaced
versions:
- name: v1alpha1
......@@ -41,11 +41,8 @@ spec:
type: object
spec:
properties:
context:
properties:
bentomlVersion:
dynamoComponent:
type: string
type: object
image:
type: string
imagePullSecrets:
......@@ -57,30 +54,11 @@ spec:
type: object
x-kubernetes-map-type: atomic
type: array
models:
items:
properties:
downloadUrl:
type: string
size:
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
tag:
type: string
required:
- tag
type: object
type: array
serviceName:
type: string
tag:
type: string
required:
- dynamoComponent
- image
- tag
type: object
status:
properties:
......
......@@ -19,14 +19,14 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.4
name: dynamodeployments.nvidia.com
name: dynamographdeployments.nvidia.com
spec:
group: nvidia.com
names:
kind: DynamoDeployment
listKind: DynamoDeploymentList
plural: dynamodeployments
singular: dynamodeployment
kind: DynamoGraphDeployment
listKind: DynamoGraphDeploymentList
plural: dynamographdeployments
singular: dynamographdeployment
scope: Namespaced
versions:
- name: v1alpha1
......@@ -41,7 +41,7 @@ spec:
type: object
spec:
properties:
dynamoNim:
dynamoGraph:
type: string
envs:
items:
......@@ -2855,7 +2855,7 @@ spec:
type: object
type: object
required:
- dynamoNim
- dynamoGraph
type: object
status:
properties:
......
......@@ -17,10 +17,10 @@
# since it depends on service name and namespace that are out of this kustomize package.
# It should be run by config/default
resources:
- bases/nvidia.com_dynamonimdeployments.yaml
- bases/nvidia.com_dynamonimrequests.yaml
- bases/nvidia.com_dynamonims.yaml
- bases/nvidia.com_dynamodeployments.yaml
- bases/nvidia.com_dynamocomponentdeployments.yaml
- bases/nvidia.com_dynamocomponentrequests.yaml
- bases/nvidia.com_dynamocomponents.yaml
- bases/nvidia.com_dynamographdeployments.yaml
#+kubebuilder:scaffold:crdkustomizeresource
patches: []
......@@ -30,9 +30,9 @@ patches: []
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
# patches here are for enabling the CA injection for each CRD
#- path: patches/cainjection_in_dynamonimdeployments.yaml
#- path: patches/cainjection_in_dynamonimrequests.yaml
#- path: patches/cainjection_in_dynamonims.yaml
#- path: patches/cainjection_in_dynamocomponentdeployments.yaml
#- path: patches/cainjection_in_dynamocomponentrequests.yaml
#- path: patches/cainjection_in_dynamocomponents.yaml
#+kubebuilder:scaffold:crdkustomizecainjectionpatch
# [WEBHOOK] To enable webhook, uncomment the following section
......
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# 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.
# permissions for end users to edit dynamonims.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: dynamo-kubernetes-operator
app.kubernetes.io/managed-by: kustomize
name: dynamonim-editor-role
rules:
- apiGroups:
- nvidia.com
resources:
- dynamonims
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- nvidia.com
resources:
- dynamonims/status
verbs:
- get
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# 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.
# permissions for end users to view dynamonims.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: dynamo-kubernetes-operator
app.kubernetes.io/managed-by: kustomize
name: dynamonim-viewer-role
rules:
- apiGroups:
- nvidia.com
resources:
- dynamonims
verbs:
- get
- list
- watch
- apiGroups:
- nvidia.com
resources:
- dynamonims/status
verbs:
- get
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# 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.
# permissions for end users to edit dynamonimdeployments.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: dynamo-kubernetes-operator
app.kubernetes.io/managed-by: kustomize
name: dynamonimdeployment-editor-role
rules:
- apiGroups:
- nvidia.com
resources:
- dynamonimdeployments
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- nvidia.com
resources:
- dynamonimdeployments/status
verbs:
- get
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# 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.
# permissions for end users to view dynamonimdeployments.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: dynamo-kubernetes-operator
app.kubernetes.io/managed-by: kustomize
name: dynamonimdeployment-viewer-role
rules:
- apiGroups:
- nvidia.com
resources:
- dynamonimdeployments
verbs:
- get
- list
- watch
- apiGroups:
- nvidia.com
resources:
- dynamonimdeployments/status
verbs:
- get
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# 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.
# permissions for end users to edit dynamonimrequests.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: dynamo-kubernetes-operator
app.kubernetes.io/managed-by: kustomize
name: dynamonimrequest-editor-role
rules:
- apiGroups:
- nvidia.com
resources:
- dynamonimrequests
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- nvidia.com
resources:
- dynamonimrequests/status
verbs:
- get
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# 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.
# permissions for end users to view dynamonimrequests.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: dynamo-kubernetes-operator
app.kubernetes.io/managed-by: kustomize
name: dynamonimrequest-viewer-role
rules:
- apiGroups:
- nvidia.com
resources:
- dynamonimrequests
verbs:
- get
- list
- watch
- apiGroups:
- nvidia.com
resources:
- dynamonimrequests/status
verbs:
- get
......@@ -35,10 +35,10 @@ resources:
# default, aiding admins in cluster management. Those roles are
# not used by the Project itself. You can comment the following lines
# if you do not want those helpers be installed with your Project.
# - dynamonim_editor_role.yaml
# - dynamonim_viewer_role.yaml
# - dynamonimrequest_editor_role.yaml
# - dynamonimrequest_viewer_role.yaml
# - dynamonimdeployment_editor_role.yaml
# - dynamonimdeployment_viewer_role.yaml
# - dynamocomponent_editor_role.yaml
# - dynamocomponent_viewer_role.yaml
# - dynamocomponentrequest_editor_role.yaml
# - dynamocomponentrequest_viewer_role.yaml
# - dynamocomponentdeployment_editor_role.yaml
# - dynamocomponentdeployment_viewer_role.yaml
......@@ -128,10 +128,10 @@ rules:
- apiGroups:
- nvidia.com
resources:
- dynamodeployments
- dynamonimdeployments
- dynamonimrequests
- dynamonims
- dynamocomponentdeployments
- dynamocomponentrequests
- dynamocomponents
- dynamographdeployments
verbs:
- create
- delete
......@@ -143,18 +143,18 @@ rules:
- apiGroups:
- nvidia.com
resources:
- dynamodeployments/finalizers
- dynamonimdeployments/finalizers
- dynamonimrequests/finalizers
- dynamocomponentdeployments/finalizers
- dynamocomponentrequests/finalizers
- dynamographdeployments/finalizers
verbs:
- update
- apiGroups:
- nvidia.com
resources:
- dynamodeployments/status
- dynamonimdeployments/status
- dynamonimrequests/status
- dynamonims/status
- dynamocomponentdeployments/status
- dynamocomponentrequests/status
- dynamocomponents/status
- dynamographdeployments/status
verbs:
- get
- patch
......
......@@ -15,8 +15,8 @@
## Append samples of your project ##
resources:
- nvidia.com_v1alpha1_dynamonimdeployment.yaml
- nvidia.com_v1alpha1_dynamonimrequest.yaml
- nvidia.com_v1alpha1_dynamonim.yaml
- nvidia.com_v1alpha1_dynamodeployment.yaml
- nvidia.com_v1alpha1_dynamocomponentdeployment.yaml
- nvidia.com_v1alpha1_dynamocomponentrequest.yaml
- nvidia.com_v1alpha1_dynamocomponent.yaml
- nvidia.com_v1alpha1_dynamographdeployment.yaml
#+kubebuilder:scaffold:manifestskustomizesamples
......@@ -14,11 +14,11 @@
# limitations under the License.
apiVersion: nvidia.com/v1alpha1
kind: DynamoNimDeployment
kind: DynamoComponentDeployment
metadata:
labels:
app.kubernetes.io/name: dynamo-kubernetes-operator
app.kubernetes.io/managed-by: kustomize
name: dynamonimdeployment-sample
name: dynamocomponentdeployment-sample
spec:
# TODO(user): Add fields here
......@@ -14,11 +14,11 @@
# limitations under the License.
apiVersion: nvidia.com/v1alpha1
kind: DynamoNimRequest
kind: DynamoComponentRequest
metadata:
labels:
app.kubernetes.io/name: dynamo-kubernetes-operator
app.kubernetes.io/managed-by: kustomize
name: dynamonimrequest-sample
name: dynamocomponentrequest-sample
spec:
# TODO(user): Add fields here
......@@ -14,12 +14,12 @@
# limitations under the License.
apiVersion: nvidia.com/v1alpha1
kind: DynamoDeployment
kind: DynamoGraphDeployment
metadata:
labels:
app.kubernetes.io/name: dynamo-kubernetes-operator
app.kubernetes.io/managed-by: kustomize
name: dynamodeployment-sample
name: dynamographdeployment-sample
spec:
# TODO(user): Add fields here
# EXAMPLE: dynamoNim: basic:dev
# EXAMPLE: dynamoComponent: basic:dev
......@@ -14,11 +14,11 @@
# limitations under the License.
apiVersion: nvidia.com/v1alpha1
kind: DynamoNim
kind: DynamoComponent
metadata:
labels:
app.kubernetes.io/name: dynamo-kubernetes-operator
app.kubernetes.io/managed-by: kustomize
name: dynamonim-sample
name: dynamocomponent-sample
spec:
# TODO(user): Add fields here
......@@ -12,7 +12,7 @@ const (
DynamoImageBuilderComponentName = "dynamo-image-builder"
DynamoDeploymentComponentApiServer = "api-server"
DynamoApiServerComponentName = "api-server"
InternalImagesDynamoComponentsDownloaderDefault = "quay.io/bentoml/bento-downloader:0.0.3"
InternalImagesKanikoDefault = "gcr.io/kaniko-project/executor:debug"
......@@ -27,12 +27,6 @@ const (
EnvDynamoServicePort = "PORT"
// tracking envars
EnvDynamoDeploymentUID = "DYNAMO_DEPLOYMENT_UID"
EnvDynamoDeploymentName = "DYNAMO_DEPLOYMENT_NAME"
EnvDynamoDeploymentNamespace = "DYNAMO_DEPLOYMENT_NAMESPACE"
EnvDockerRegistryServer = "DOCKER_REGISTRY_SERVER"
EnvDockerRegistryInClusterServer = "DOCKER_REGISTRY_IN_CLUSTER_SERVER"
EnvDockerRegistryUsername = "DOCKER_REGISTRY_USERNAME"
......@@ -51,16 +45,14 @@ const (
EnvDynamoImageBuilderNamespace = "DYNAMO_IMAGE_BUILDER_NAMESPACE"
KubeLabelDynamoSelector = "nvidia.com/selector"
KubeLabelDynamoRepository = "nvidia.com/dynamo-repository"
KubeLabelDynamoVersion = "nvidia.com/dynamo-version"
KubeLabelDynamoDeployment = "nvidia.com/dynamo-deployment"
KubeLabelDynamoDeploymentComponentType = "nvidia.com/dynamo-deployment-component-type"
KubeLabelDynamoComponent = "nvidia.com/dynamo-component"
KubeLabelDynamoDeploymentTargetType = "nvidia.com/dynamo-deployment-target-type"
KubeLabelDynamoCreator = "nvidia.com/dynamo-creator"
KubeLabelDynamoComponentType = "nvidia.com/dynamo-component-type"
KubeLabelIsDynamoImageBuilder = "nvidia.com/is-dynamo-image-builder"
KubeLabelDynamoRequest = "nvidia.com/dynamo-request"
KubeLabelDynamoComponentRequest = "nvidia.com/dynamo-component-request"
KubeLabelValueFalse = "false"
KubeLabelValueTrue = "true"
......@@ -77,7 +69,7 @@ const (
// nolint: gosec
KubeSecretNameRegcred = "dynamo-regcred"
KubeAnnotationDynamoNimRequestHash = "nvidia.com/dynamo-request-hash"
KubeAnnotationDynamoNimRequestImageBuiderHash = "nvidia.com/dynamo-request-image-builder-hash"
KubeAnnotationDynamoNimStorageNS = "nvidia.com/dynamo-storage-namespace"
KubeAnnotationDynamoComponentRequestHash = "nvidia.com/dynamo-request-hash"
KubeAnnotationDynamoComponentRequestImageBuiderHash = "nvidia.com/dynamo-request-image-builder-hash"
KubeAnnotationDynamoComponentStorageNS = "nvidia.com/dynamo-storage-namespace"
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment