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

feat: remove dynamoComponentRequest CRD (#856)

parent c544e8ec
...@@ -23,7 +23,7 @@ version: 25.2.0-rc3 ...@@ -23,7 +23,7 @@ version: 25.2.0-rc3
home: https://nvidia.com home: https://nvidia.com
dependencies: dependencies:
- name: dynamo-operator - name: dynamo-operator
version: 0.1.6 version: 0.1.7
repository: file://components/operator repository: file://components/operator
condition: dynamo-operator.enabled condition: dynamo-operator.enabled
- name: dynamo-api-store - name: dynamo-api-store
......
...@@ -27,7 +27,7 @@ type: application ...@@ -27,7 +27,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.6 version: 0.1.7
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to # incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using. # follow Semantic Versioning. They should reflect the version the application is using.
...@@ -35,5 +35,5 @@ version: 0.1.6 ...@@ -35,5 +35,5 @@ version: 0.1.6
appVersion: "0.1.0" appVersion: "0.1.0"
dependencies: dependencies:
- name: dynamo-crds - name: dynamo-crds
version: 0.1.5 version: 0.1.6
repository: file://charts/dynamo-crds repository: file://charts/dynamo-crds
\ No newline at end of file
...@@ -16,5 +16,5 @@ apiVersion: v2 ...@@ -16,5 +16,5 @@ apiVersion: v2
name: dynamo-crds name: dynamo-crds
description: A Helm chart for CRDs of dynamo operator description: A Helm chart for CRDs of dynamo operator
type: application type: application
version: 0.1.5 version: 0.1.6
dependencies: [] dependencies: []
\ No newline at end of file
...@@ -26,6 +26,8 @@ spec: ...@@ -26,6 +26,8 @@ spec:
kind: DynamoComponentDeployment kind: DynamoComponentDeployment
listKind: DynamoComponentDeploymentList listKind: DynamoComponentDeploymentList
plural: dynamocomponentdeployments plural: dynamocomponentdeployments
shortNames:
- dcd
singular: dynamocomponentdeployment singular: dynamocomponentdeployment
scope: Namespaced scope: Namespaced
versions: versions:
......
...@@ -26,6 +26,8 @@ spec: ...@@ -26,6 +26,8 @@ spec:
kind: DynamoGraphDeployment kind: DynamoGraphDeployment
listKind: DynamoGraphDeploymentList listKind: DynamoGraphDeploymentList
plural: dynamographdeployments plural: dynamographdeployments
shortNames:
- dgd
singular: dynamographdeployment singular: dynamographdeployment
scope: Namespaced scope: Namespaced
versions: versions:
......
...@@ -134,37 +134,4 @@ Generate docker config json for registry credentials ...@@ -134,37 +134,4 @@ Generate docker config json for registry credentials
} }
} }
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
\ No newline at end of file
{{/*
Extract username and password from docker registry configuration
*/}}
{{- define "dynamo-operator.extractDockerCredentials" -}}
{{- $server := .Values.dynamo.dockerRegistry.server -}}
{{- $username := .Values.dynamo.dockerRegistry.username -}}
{{- $password := .Values.dynamo.dockerRegistry.password -}}
{{- $result := dict "username" $username "password" $password }}
{{- if .Values.dynamo.dockerRegistry.passwordExistingSecretName }}
{{- $secretName := .Values.dynamo.dockerRegistry.passwordExistingSecretName }}
{{- $secretKey := .Values.dynamo.dockerRegistry.passwordExistingSecretKey }}
{{- $dockerconfigjson := lookup "v1" "Secret" .Release.Namespace $secretName }}
{{- if $dockerconfigjson }}
{{- if eq $dockerconfigjson.type "kubernetes.io/dockerconfigjson" }}
{{- $decodedConfig := index $dockerconfigjson.data ".dockerconfigjson" | b64dec | fromJson }}
{{- range $registry, $authConfig := $decodedConfig.auths }}
{{- $_ := set $result "username" $authConfig.username }}
{{- $_ := set $result "password" $authConfig.password }}
{{- break }}
{{- end }}
{{- else if hasKey $dockerconfigjson.data $secretKey }}
{{- $_ := set $result "password" (index $dockerconfigjson.data $secretKey | b64dec) }}
{{- end }}
{{- end }}
{{- end }}
{{- toYaml $result }}
{{- end }}
\ No newline at end of file
...@@ -331,7 +331,6 @@ rules: ...@@ -331,7 +331,6 @@ rules:
- nvidia.com - nvidia.com
resources: resources:
- dynamocomponentdeployments - dynamocomponentdeployments
- dynamocomponentrequests
- dynamocomponents - dynamocomponents
- dynamographdeployments - dynamographdeployments
verbs: verbs:
...@@ -346,7 +345,7 @@ rules: ...@@ -346,7 +345,7 @@ rules:
- nvidia.com - nvidia.com
resources: resources:
- dynamocomponentdeployments/finalizers - dynamocomponentdeployments/finalizers
- dynamocomponentrequests/finalizers - dynamocomponents/finalizers
- dynamographdeployments/finalizers - dynamographdeployments/finalizers
verbs: verbs:
- update - update
...@@ -354,7 +353,6 @@ rules: ...@@ -354,7 +353,6 @@ rules:
- nvidia.com - nvidia.com
resources: resources:
- dynamocomponentdeployments/status - dynamocomponentdeployments/status
- dynamocomponentrequests/status
- dynamocomponents/status - dynamocomponents/status
- dynamographdeployments/status - dynamographdeployments/status
verbs: verbs:
......
...@@ -38,11 +38,7 @@ stringData: ...@@ -38,11 +38,7 @@ stringData:
{{- end }} {{- end }}
DOCKER_REGISTRY_SERVER: {{ .Values.dynamo.dockerRegistry.server | quote }} DOCKER_REGISTRY_SERVER: {{ .Values.dynamo.dockerRegistry.server | quote }}
DOCKER_REGISTRY_IN_CLUSTER_SERVER: {{ .Values.dynamo.dockerRegistry.inClusterServer | quote }} DOCKER_REGISTRY_SECRET_NAME: "dynamo-regcred"
{{- with include "dynamo-operator.extractDockerCredentials" . | fromYaml }}
DOCKER_REGISTRY_USERNAME: {{ .username | quote }}
DOCKER_REGISTRY_PASSWORD: {{ .password | quote }}
{{- end }}
DOCKER_REGISTRY_SECURE: {{ .Values.dynamo.dockerRegistry.secure | quote }} DOCKER_REGISTRY_SECURE: {{ .Values.dynamo.dockerRegistry.secure | quote }}
DOCKER_REGISTRY_DYNAMO_COMPONENTS_REPOSITORY_NAME: {{ .Values.dynamo.dockerRegistry.dynamoComponentsRepositoryName | quote }} DOCKER_REGISTRY_DYNAMO_COMPONENTS_REPOSITORY_NAME: {{ .Values.dynamo.dockerRegistry.dynamoComponentsRepositoryName | quote }}
......
...@@ -16,14 +16,6 @@ resources: ...@@ -16,14 +16,6 @@ resources:
kind: DynamoComponentDeployment kind: DynamoComponentDeployment
path: github.com/ai-dynamo/dynamo/deploy/dynamo/operator/api/v1alpha1 path: github.com/ai-dynamo/dynamo/deploy/dynamo/operator/api/v1alpha1
version: v1alpha1 version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: nvidia.com
kind: DynamoComponentRequest
path: github.com/ai-dynamo/dynamo/deploy/dynamo/operator/api/v1alpha1
version: v1alpha1
- api: - api:
crdVersion: v1 crdVersion: v1
namespaced: true namespaced: true
......
...@@ -71,10 +71,10 @@ const ( ...@@ -71,10 +71,10 @@ const (
) )
type DockerRegistrySchema struct { type DockerRegistrySchema struct {
DynamoRepositoryURI string `json:"dynamoRepositoryURI"` DynamoRepositoryURI string `json:"dynamoRepositoryURI"`
DynamoRepositoryURIInCluster string `json:"dynamoRepositoryURIInCluster"` Server string `json:"server"`
Server string `json:"server"` Username string `json:"username"`
Username string `json:"username"` Password string `json:"password"`
Password string `json:"password"` SecretName string `json:"secretName"`
Secure bool `json:"secure"` Secure bool `json:"secure"`
} }
...@@ -20,10 +20,21 @@ ...@@ -20,10 +20,21 @@
package v1alpha1 package v1alpha1
import ( import (
dynamoCommon "github.com/ai-dynamo/dynamo/deploy/dynamo/operator/api/dynamo/common"
"github.com/ai-dynamo/dynamo/deploy/dynamo/operator/api/dynamo/schemas"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
) )
const (
DynamoComponentConditionTypeImageBuilding = "ImageBuilding"
DynamoComponentConditionTypeImageExists = "ImageExists"
DynamoComponentConditionTypeImageExistsChecked = "ImageExistsChecked"
DynamoComponentConditionTypeModelsExists = "ModelsExists"
DynamoComponentConditionTypeDynamoComponentAvailable = "DynamoComponentAvailable"
)
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! // 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. // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
...@@ -34,23 +45,50 @@ type DynamoComponentSpec struct { ...@@ -34,23 +45,50 @@ type DynamoComponentSpec struct {
// +kubebuilder:validation:Required // +kubebuilder:validation:Required
DynamoComponent string `json:"dynamoComponent"` DynamoComponent string `json:"dynamoComponent"`
// +kubebuilder:validation:Required DownloadURL string `json:"downloadUrl,omitempty"`
Image string `json:"image"` ServiceName string `json:"serviceName,omitempty"`
ServiceName string `json:"serviceName,omitempty"`
// +kubebuilder:validation:Optional
Image string `json:"image,omitempty"`
ImageBuildTimeout *schemas.Duration `json:"imageBuildTimeout,omitempty"`
// +kubebuilder:validation:Optional
BuildArgs []string `json:"buildArgs,omitempty"`
// +kubebuilder:validation:Optional
ImageBuilderExtraPodMetadata *dynamoCommon.ExtraPodMetadata `json:"imageBuilderExtraPodMetadata,omitempty"`
// +kubebuilder:validation:Optional
ImageBuilderExtraPodSpec *dynamoCommon.ExtraPodSpec `json:"imageBuilderExtraPodSpec,omitempty"`
// +kubebuilder:validation:Optional
ImageBuilderExtraContainerEnv []corev1.EnvVar `json:"imageBuilderExtraContainerEnv,omitempty"`
// +kubebuilder:validation:Optional
ImageBuilderContainerResources *corev1.ResourceRequirements `json:"imageBuilderContainerResources,omitempty"`
// +kubebuilder:validation:Optional
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// +kubebuilder:validation:Optional
DockerConfigJSONSecretName string `json:"dockerConfigJsonSecretName,omitempty"`
// +kubebuilder:validation:Optional
DownloaderContainerEnvFrom []corev1.EnvFromSource `json:"downloaderContainerEnvFrom,omitempty"`
} }
// DynamoComponentStatus defines the observed state of DynamoComponent // DynamoComponentStatus defines the observed state of DynamoComponent
type DynamoComponentStatus struct { type DynamoComponentStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file // Important: Run "make" to regenerate code after modifying this file
Ready bool `json:"ready"` Conditions []metav1.Condition `json:"conditions"`
} }
// +genclient
// +kubebuilder:object:root=true // +kubebuilder:object:root=true
// +kubebuilder:subresource:status // +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="DynamoComponent",type="string",JSONPath=".spec.dynamoComponent",description="Dynamo component"
// +kubebuilder:printcolumn:name="Image-Exists",type="string",JSONPath=".status.conditions[?(@.type=='ImageExists')].status",description="Image Exists"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:resource:shortName=dc
// DynamoComponent is the Schema for the dynamocomponents API // DynamoComponent is the Schema for the dynamocomponents API
type DynamoComponent struct { type DynamoComponent struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
...@@ -60,7 +98,7 @@ type DynamoComponent struct { ...@@ -60,7 +98,7 @@ type DynamoComponent struct {
Status DynamoComponentStatus `json:"status,omitempty"` Status DynamoComponentStatus `json:"status,omitempty"`
} }
// +kubebuilder:object:root=true //+kubebuilder:object:root=true
// DynamoComponentList contains a list of DynamoComponent // DynamoComponentList contains a list of DynamoComponent
type DynamoComponentList struct { type DynamoComponentList struct {
...@@ -72,3 +110,28 @@ type DynamoComponentList struct { ...@@ -72,3 +110,28 @@ type DynamoComponentList struct {
func init() { func init() {
SchemeBuilder.Register(&DynamoComponent{}, &DynamoComponentList{}) SchemeBuilder.Register(&DynamoComponent{}, &DynamoComponentList{})
} }
func (s *DynamoComponent) GetSpec() any {
return s.Spec
}
func (s *DynamoComponent) SetSpec(spec any) {
s.Spec = spec.(DynamoComponentSpec)
}
func (s *DynamoComponent) IsReady() bool {
return meta.IsStatusConditionTrue(s.Status.Conditions, DynamoComponentConditionTypeDynamoComponentAvailable)
}
// GetImage returns the docker image of the DynamoComponent
func (s *DynamoComponent) GetImage() string {
if s.Spec.Image != "" {
// if the image is specified in the spec, return it
return s.Spec.Image
}
// if the image is not specified in the spec, the image is stored in the status condition ImageExists
if meta.FindStatusCondition(s.Status.Conditions, DynamoComponentConditionTypeImageExists) != nil {
return meta.FindStatusCondition(s.Status.Conditions, DynamoComponentConditionTypeImageExists).Message
}
return ""
}
...@@ -26,9 +26,8 @@ import ( ...@@ -26,9 +26,8 @@ import (
) )
const ( const (
DynamoGraphDeploymentConditionTypeAvailable = "Available" DynamoGraphDeploymentConditionTypeAvailable = "Available"
DynamoGraphDeploymentConditionTypeDynamoComponentFound = "DynamoComponentFound" DynamoGraphDeploymentConditionTypeDynamoComponentReady = "DynamoComponentReady"
DynamoGraphDeploymentConditionTypeDynamoComponentRequestFound = "DynamoComponentRequestFound"
) )
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
...@@ -115,14 +114,14 @@ type DynamoComponentDeploymentStatus struct { ...@@ -115,14 +114,14 @@ type DynamoComponentDeploymentStatus struct {
PodSelector map[string]string `json:"podSelector,omitempty"` PodSelector map[string]string `json:"podSelector,omitempty"`
} }
//+genclient // +genclient
//+kubebuilder:object:root=true // +kubebuilder:object:root=true
//+kubebuilder:subresource:status // +kubebuilder:subresource:status
//+kubebuilder:storageversion // +kubebuilder:storageversion
//+kubebuilder:printcolumn:name="DynamoComponent",type="string",JSONPath=".spec.dynamoComponent",description="Dynamo component" // +kubebuilder:printcolumn:name="DynamoComponent",type="string",JSONPath=".spec.dynamoComponent",description="Dynamo component"
//+kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Available" // +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Available"
//+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:resource:shortName=dcd
// DynamoComponentDeployment is the Schema for the dynamocomponentdeployments API // DynamoComponentDeployment is the Schema for the dynamocomponentdeployments API
type DynamoComponentDeployment struct { type DynamoComponentDeployment struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
......
/*
* SPDX-FileCopyrightText: Copyright (c) 2022 Atalaya Tech. Inc
* SPDX-FileCopyrightText: Copyright (c) 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.
* Modifications Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES
*/
package v1alpha1
import (
dynamoCommon "github.com/ai-dynamo/dynamo/deploy/dynamo/operator/api/dynamo/common"
"github.com/ai-dynamo/dynamo/deploy/dynamo/operator/api/dynamo/schemas"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
DynamoComponentRequestConditionTypeModelsSeeding = "ModelsSeeding"
DynamoComponentRequestConditionTypeImageBuilding = "ImageBuilding"
DynamoComponentRequestConditionTypeImageExists = "ImageExists"
DynamoComponentRequestConditionTypeImageExistsChecked = "ImageExistsChecked"
DynamoComponentRequestConditionTypeModelsExists = "ModelsExists"
DynamoComponentRequestConditionTypeDynamoComponentAvailable = "DynamoComponentAvailable"
)
// 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.
// DynamoComponentRequestSpec defines the desired state of DynamoComponentRequest
type DynamoComponentRequestSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
// +kubebuilder:validation:Required
DynamoComponent string `json:"dynamoComponent"`
DownloadURL string `json:"downloadUrl,omitempty"`
ServiceName string `json:"serviceName,omitempty"`
// +kubebuilder:validation:Optional
Image string `json:"image,omitempty"`
ImageBuildTimeout *schemas.Duration `json:"imageBuildTimeout,omitempty"`
// +kubebuilder:validation:Optional
BuildArgs []string `json:"buildArgs,omitempty"`
// +kubebuilder:validation:Optional
ImageBuilderExtraPodMetadata *dynamoCommon.ExtraPodMetadata `json:"imageBuilderExtraPodMetadata,omitempty"`
// +kubebuilder:validation:Optional
ImageBuilderExtraPodSpec *dynamoCommon.ExtraPodSpec `json:"imageBuilderExtraPodSpec,omitempty"`
// +kubebuilder:validation:Optional
ImageBuilderExtraContainerEnv []corev1.EnvVar `json:"imageBuilderExtraContainerEnv,omitempty"`
// +kubebuilder:validation:Optional
ImageBuilderContainerResources *corev1.ResourceRequirements `json:"imageBuilderContainerResources,omitempty"`
// +kubebuilder:validation:Optional
DockerConfigJSONSecretName string `json:"dockerConfigJsonSecretName,omitempty"`
// +kubebuilder:validation:Optional
OCIRegistryInsecure *bool `json:"ociRegistryInsecure,omitempty"`
// +kubebuilder:validation:Optional
DownloaderContainerEnvFrom []corev1.EnvFromSource `json:"downloaderContainerEnvFrom,omitempty"`
}
// DynamoComponentRequestStatus defines the observed state of DynamoComponentRequest
type DynamoComponentRequestStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
Conditions []metav1.Condition `json:"conditions"`
}
//+genclient
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="DynamoComponent",type="string",JSONPath=".spec.dynamoComponent",description="Dynamo component"
//+kubebuilder:printcolumn:name="Download-Url",type="string",JSONPath=".spec.downloadUrl",description="Download URL"
//+kubebuilder:printcolumn:name="Image-Exists",type="string",JSONPath=".status.conditions[?(@.type=='ImageExists')].status",description="Image Exists"
//+kubebuilder:printcolumn:name="DynamoComponent-Available",type="string",JSONPath=".status.conditions[?(@.type=='DynamoComponentAvailable')].status",description="Dynamo Component Available"
//+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// DynamoComponentRequest is the Schema for the dynamocomponentrequests API
type DynamoComponentRequest struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DynamoComponentRequestSpec `json:"spec,omitempty"`
Status DynamoComponentRequestStatus `json:"status,omitempty"`
}
//+kubebuilder:object:root=true
// DynamoComponentRequestList contains a list of DynamoComponentRequest
type DynamoComponentRequestList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []DynamoComponentRequest `json:"items"`
}
func init() {
SchemeBuilder.Register(&DynamoComponentRequest{}, &DynamoComponentRequestList{})
}
func (s *DynamoComponentRequest) GetSpec() any {
return s.Spec
}
func (s *DynamoComponentRequest) SetSpec(spec any) {
s.Spec = spec.(DynamoComponentRequestSpec)
}
...@@ -52,7 +52,7 @@ type DynamoGraphDeploymentStatus struct { ...@@ -52,7 +52,7 @@ type DynamoGraphDeploymentStatus struct {
// +kubebuilder:object:root=true // +kubebuilder:object:root=true
// +kubebuilder:subresource:status // +kubebuilder:subresource:status
// +kubebuilder:resource:shortName=dgd
// DynamoGraphDeployment is the Schema for the dynamographdeployments API. // DynamoGraphDeployment is the Schema for the dynamographdeployments API.
type DynamoGraphDeployment struct { type DynamoGraphDeployment struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
......
...@@ -121,7 +121,7 @@ func (in *DynamoComponent) DeepCopyInto(out *DynamoComponent) { ...@@ -121,7 +121,7 @@ func (in *DynamoComponent) DeepCopyInto(out *DynamoComponent) {
out.TypeMeta = in.TypeMeta out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec) in.Spec.DeepCopyInto(&out.Spec)
out.Status = in.Status in.Status.DeepCopyInto(&out.Status)
} }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamoComponent. // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamoComponent.
...@@ -394,66 +394,7 @@ func (in *DynamoComponentList) DeepCopyObject() runtime.Object { ...@@ -394,66 +394,7 @@ func (in *DynamoComponentList) DeepCopyObject() runtime.Object {
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DynamoComponentRequest) DeepCopyInto(out *DynamoComponentRequest) { func (in *DynamoComponentSpec) DeepCopyInto(out *DynamoComponentSpec) {
*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 DynamoComponentRequest.
func (in *DynamoComponentRequest) DeepCopy() *DynamoComponentRequest {
if in == nil {
return nil
}
out := new(DynamoComponentRequest)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *DynamoComponentRequest) 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 *DynamoComponentRequestList) DeepCopyInto(out *DynamoComponentRequestList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]DynamoComponentRequest, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamoComponentRequestList.
func (in *DynamoComponentRequestList) DeepCopy() *DynamoComponentRequestList {
if in == nil {
return nil
}
out := new(DynamoComponentRequestList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *DynamoComponentRequestList) 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 *DynamoComponentRequestSpec) DeepCopyInto(out *DynamoComponentRequestSpec) {
*out = *in *out = *in
if in.ImageBuildTimeout != nil { if in.ImageBuildTimeout != nil {
in, out := &in.ImageBuildTimeout, &out.ImageBuildTimeout in, out := &in.ImageBuildTimeout, &out.ImageBuildTimeout
...@@ -487,10 +428,10 @@ func (in *DynamoComponentRequestSpec) DeepCopyInto(out *DynamoComponentRequestSp ...@@ -487,10 +428,10 @@ func (in *DynamoComponentRequestSpec) DeepCopyInto(out *DynamoComponentRequestSp
*out = new(v1.ResourceRequirements) *out = new(v1.ResourceRequirements)
(*in).DeepCopyInto(*out) (*in).DeepCopyInto(*out)
} }
if in.OCIRegistryInsecure != nil { if in.ImagePullSecrets != nil {
in, out := &in.OCIRegistryInsecure, &out.OCIRegistryInsecure in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
*out = new(bool) *out = make([]v1.LocalObjectReference, len(*in))
**out = **in copy(*out, *in)
} }
if in.DownloaderContainerEnvFrom != nil { if in.DownloaderContainerEnvFrom != nil {
in, out := &in.DownloaderContainerEnvFrom, &out.DownloaderContainerEnvFrom in, out := &in.DownloaderContainerEnvFrom, &out.DownloaderContainerEnvFrom
...@@ -501,18 +442,18 @@ func (in *DynamoComponentRequestSpec) DeepCopyInto(out *DynamoComponentRequestSp ...@@ -501,18 +442,18 @@ func (in *DynamoComponentRequestSpec) DeepCopyInto(out *DynamoComponentRequestSp
} }
} }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamoComponentRequestSpec. // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamoComponentSpec.
func (in *DynamoComponentRequestSpec) DeepCopy() *DynamoComponentRequestSpec { func (in *DynamoComponentSpec) DeepCopy() *DynamoComponentSpec {
if in == nil { if in == nil {
return nil return nil
} }
out := new(DynamoComponentRequestSpec) out := new(DynamoComponentSpec)
in.DeepCopyInto(out) in.DeepCopyInto(out)
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DynamoComponentRequestStatus) DeepCopyInto(out *DynamoComponentRequestStatus) { func (in *DynamoComponentStatus) DeepCopyInto(out *DynamoComponentStatus) {
*out = *in *out = *in
if in.Conditions != nil { if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions in, out := &in.Conditions, &out.Conditions
...@@ -523,41 +464,6 @@ func (in *DynamoComponentRequestStatus) DeepCopyInto(out *DynamoComponentRequest ...@@ -523,41 +464,6 @@ func (in *DynamoComponentRequestStatus) DeepCopyInto(out *DynamoComponentRequest
} }
} }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamoComponentRequestStatus.
func (in *DynamoComponentRequestStatus) DeepCopy() *DynamoComponentRequestStatus {
if in == nil {
return nil
}
out := new(DynamoComponentRequestStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DynamoComponentSpec) DeepCopyInto(out *DynamoComponentSpec) {
*out = *in
if in.ImagePullSecrets != nil {
in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
*out = make([]v1.LocalObjectReference, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamoComponentSpec.
func (in *DynamoComponentSpec) DeepCopy() *DynamoComponentSpec {
if in == nil {
return nil
}
out := new(DynamoComponentSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DynamoComponentStatus) DeepCopyInto(out *DynamoComponentStatus) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamoComponentStatus. // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamoComponentStatus.
func (in *DynamoComponentStatus) DeepCopy() *DynamoComponentStatus { func (in *DynamoComponentStatus) DeepCopy() *DynamoComponentStatus {
if in == nil { if in == nil {
......
...@@ -189,13 +189,13 @@ func main() { ...@@ -189,13 +189,13 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "DynamoComponentDeployment") setupLog.Error(err, "unable to create controller", "controller", "DynamoComponentDeployment")
os.Exit(1) os.Exit(1)
} }
if err = (&controller.DynamoComponentRequestReconciler{ if err = (&controller.DynamoComponentReconciler{
Client: mgr.GetClient(), Client: mgr.GetClient(),
Scheme: mgr.GetScheme(), Scheme: mgr.GetScheme(),
Recorder: mgr.GetEventRecorderFor("dynamo-image-builder"), Recorder: mgr.GetEventRecorderFor("dynamocomponent"),
Config: ctrlConfig, Config: ctrlConfig,
}).SetupWithManager(mgr); err != nil { }).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "DynamoComponentRequest") setupLog.Error(err, "unable to create controller", "controller", "DynamoComponent")
os.Exit(1) os.Exit(1)
} }
if err = (&controller.DynamoGraphDeploymentReconciler{ if err = (&controller.DynamoGraphDeploymentReconciler{
......
...@@ -26,6 +26,8 @@ spec: ...@@ -26,6 +26,8 @@ spec:
kind: DynamoComponentDeployment kind: DynamoComponentDeployment
listKind: DynamoComponentDeploymentList listKind: DynamoComponentDeploymentList
plural: dynamocomponentdeployments plural: dynamocomponentdeployments
shortNames:
- dcd
singular: dynamocomponentdeployment singular: dynamocomponentdeployment
scope: Namespaced scope: Namespaced
versions: versions:
......
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