Skip to content

Commit

Permalink
Merge pull request #610 from HumairAK/update_fields
Browse files Browse the repository at this point in the history
chore: clean up unused artifacts, add deprecated notices.
  • Loading branch information
openshift-merge-bot[bot] authored Mar 20, 2024
2 parents 221b810 + fa74ff4 commit 99e01be
Show file tree
Hide file tree
Showing 19 changed files with 194 additions and 475 deletions.
6 changes: 6 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ linters:
- typecheck
- unused
- revive
issues:
exclude-rules:
- linters:
- staticcheck
path: controllers/dspipeline_params.go
text: SA1019 # exclude failures for deprecated warnings
linters-settings:
revive:
rules:
Expand Down
86 changes: 46 additions & 40 deletions api/v1alpha1/dspipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ type DSPASpec struct {
*ObjectStorage `json:"objectStorage"`
*MLMD `json:"mlmd,omitempty"`
// +kubebuilder:validation:Optional
// +kubebuilder:default:={deploy: false}
*CRDViewer `json:"crdviewer"`
// +kubebuilder:validation:Optional
// +kubebuilder:default:="v1"
DSPVersion string `json:"dspVersion,omitempty"`
// WorkflowController is an argo-specific component that manages a DSPA's Workflow objects and handles the orchestration of them with the central Argo server
Expand All @@ -59,69 +56,83 @@ type APIServer struct {
Deploy bool `json:"deploy"`
// Specify a custom image for DSP API Server.
Image string `json:"image,omitempty"`
// Create an Openshift Route for this DSP API Server. Default: true
// +kubebuilder:default:=true
// +kubebuilder:validation:Optional
EnableRoute bool `json:"enableOauth"`
// Include sample pipelines with the deployment of this DSP API Server. Default: true
// +kubebuilder:default:=false
// +kubebuilder:validation:Optional
EnableSamplePipeline bool `json:"enableSamplePipeline"`
ArgoLauncherImage string `json:"argoLauncherImage,omitempty"`
ArgoDriverImage string `json:"argoDriverImage,omitempty"`
// Specify custom Pod resource requirements for this component.
Resources *ResourceRequirements `json:"resources,omitempty"`

// If the Object store/DB is behind a TLS secured connection that is
// unrecognized by the host OpenShift/K8s cluster, then you can
// provide a PEM formatted CA bundle to be injected into the DSP
// server pod to trust this connection. CA Bundle should be provided
// as values within configmaps, mapped to keys.
CABundle *CABundle `json:"cABundle,omitempty"`

// CustomServerConfig is a custom config file that you can provide
// for the api server to use instead.
CustomServerConfig *ScriptConfigMap `json:"customServerConfigMap,omitempty"`

// Default: true
// Deprecated: DSP V1 only, will be removed in the future.
// +kubebuilder:default:=true
// +kubebuilder:validation:Optional
ApplyTektonCustomResource bool `json:"applyTektonCustomResource"`
// Default: false
// Deprecated: DSP V1 only, will be removed in the future.
// +kubebuilder:default:=false
// +kubebuilder:validation:Optional
ArchiveLogs bool `json:"archiveLogs"`
ArchiveLogs bool `json:"archiveLogs"`
// Deprecated: DSP V1 only, will be removed in the future.
ArtifactImage string `json:"artifactImage,omitempty"`
CacheImage string `json:"cacheImage,omitempty"`
// Deprecated: DSP V1 only, will be removed in the future.
CacheImage string `json:"cacheImage,omitempty"`
// Image used for internal artifact passing handling within Tekton taskruns. This field specifies the image used in the 'move-all-results-to-tekton-home' step.
MoveResultsImage string `json:"moveResultsImage,omitempty"`
// Deprecated: DSP V1 only, will be removed in the future.
MoveResultsImage string `json:"moveResultsImage,omitempty"`
// Deprecated: DSP V1 only, will be removed in the future.
ArtifactScriptConfigMap *ScriptConfigMap `json:"artifactScriptConfigMap,omitempty"`
// Inject the archive step script. Default: true
// Deprecated: DSP V1 only, will be removed in the future.
// +kubebuilder:default:=true
// +kubebuilder:validation:Optional
InjectDefaultScript bool `json:"injectDefaultScript"`
// Default: true
// Deprecated: DSP V1 only, will be removed in the future.
// +kubebuilder:default:=true
// +kubebuilder:validation:Optional
StripEOF bool `json:"stripEOF"`
// Default: "Cancelled" - Allowed Values: "Cancelled", "StoppedRunFinally", "CancelledRunFinally"
// Deprecated: DSP V1 only, will be removed in the future.
// +kubebuilder:validation:Enum=Cancelled;StoppedRunFinally;CancelledRunFinally
// +kubebuilder:default:=Cancelled
TerminateStatus string `json:"terminateStatus,omitempty"`
// Default: true
// Deprecated: DSP V1 only, will be removed in the future.
// +kubebuilder:default:=true
// +kubebuilder:validation:Optional
TrackArtifacts bool `json:"trackArtifacts"`
// Default: 120
// Deprecated: DSP V1 only, will be removed in the future.
// +kubebuilder:default:=120
DBConfigConMaxLifetimeSec int `json:"dbConfigConMaxLifetimeSec,omitempty"`
// Default: true
// Deprecated: DSP V1 only, will be removed in the future.
// +kubebuilder:default:=true
// +kubebuilder:validation:Optional
CollectMetrics bool `json:"collectMetrics"`
// Create an Openshift Route for this DSP API Server. Default: true
// +kubebuilder:default:=true
// +kubebuilder:validation:Optional
EnableRoute bool `json:"enableOauth"`
// Include sample pipelines with the deployment of this DSP API Server. Default: true
// +kubebuilder:default:=false
// +kubebuilder:validation:Optional
EnableSamplePipeline bool `json:"enableSamplePipeline"`
// Default: true
// Deprecated: DSP V1 only, will be removed in the future.
// +kubebuilder:default:=true
// +kubebuilder:validation:Optional
AutoUpdatePipelineDefaultVersion bool `json:"autoUpdatePipelineDefaultVersion"`
ArgoLauncherImage string `json:"argoLauncherImage,omitempty"`
ArgoDriverImage string `json:"argoDriverImage,omitempty"`
// Specify custom Pod resource requirements for this component.
Resources *ResourceRequirements `json:"resources,omitempty"`

// If the Object store/DB is behind a TLS secured connection that is
// unrecognized by the host OpenShift/K8s cluster, then you can
// provide a PEM formatted CA bundle to be injected into the DSP
// server pod to trust this connection. CA Bundle should be provided
// as values within configmaps, mapped to keys.
CABundle *CABundle `json:"cABundle,omitempty"`

// CustomServerConfig is a custom config file that you can provide
// for the api server to use instead.
CustomServerConfig *ScriptConfigMap `json:"customServerConfigMap,omitempty"`
AutoUpdatePipelineDefaultVersion bool `json:"autoUpdatePipelineDefaultVersion"`
}

type CABundle struct {
Expand Down Expand Up @@ -277,9 +288,10 @@ type MLMD struct {
// Enable DS Pipelines Operator management of MLMD. Setting Deploy to false disables operator reconciliation. Default: true
// +kubebuilder:default:=false
// +kubebuilder:validation:Optional
Deploy bool `json:"deploy"`
*Envoy `json:"envoy,omitempty"`
*GRPC `json:"grpc,omitempty"`
Deploy bool `json:"deploy"`
*Envoy `json:"envoy,omitempty"`
*GRPC `json:"grpc,omitempty"`
// Deprecated: DSP V1 only, will be removed in the future.
*Writer `json:"writer,omitempty"`
}

Expand All @@ -301,13 +313,6 @@ type Writer struct {
Image string `json:"image"`
}

type CRDViewer struct {
// +kubebuilder:default:=true
// +kubebuilder:validation:Optional
Deploy bool `json:"deploy"`
Image string `json:"image,omitempty"`
}

type WorkflowController struct {
// +kubebuilder:default:=true
// +kubebuilder:validation:Optional
Expand Down Expand Up @@ -336,6 +341,7 @@ type ExternalStorage struct {
Scheme string `json:"scheme"`
// +kubebuilder:validation:Optional
Region string `json:"region"`
// Subpath where objects should be stored for this DSPA
// +kubebuilder:validation:Optional
BasePath string `json:"basePath"`
*S3CredentialSecret `json:"s3CredentialsSecret"`
Expand Down
30 changes: 5 additions & 25 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions config/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,6 @@ vars:
apiVersion: v1
fieldref:
fieldpath: data.IMAGES_MLMDWRITER
- name: IMAGES_CRDVIEWER
objref:
kind: ConfigMap
name: dspo-parameters
apiVersion: v1
fieldref:
fieldpath: data.IMAGES_CRDVIEWER
- name: IMAGES_DSPO
objref:
kind: ConfigMap
Expand Down
1 change: 0 additions & 1 deletion config/base/params.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ IMAGES_SCHEDULEDWORKFLOW=quay.io/opendatahub/ds-pipelines-scheduledworkflow:v1.6
IMAGES_MLMDENVOY=quay.io/opendatahub/ds-pipelines-metadata-envoy:v1.6.3
IMAGES_MLMDGRPC=quay.io/opendatahub/ds-pipelines-metadata-grpc:v1.6.3
IMAGES_MLMDWRITER=quay.io/opendatahub/ds-pipelines-metadata-writer:v1.6.3
IMAGES_CRDVIEWER=gcr.io/ml-pipeline/viewer-crd-controller:2.0.0-rc.2
IMAGESV2_ARGO_APISERVER=quay.io/opendatahub/ds-pipelines-api-server:latest
IMAGESV2_ARGO_PERSISTENCEAGENT=quay.io/opendatahub/ds-pipelines-persistenceagent:latest
IMAGESV2_ARGO_SCHEDULEDWORKFLOW=quay.io/opendatahub/ds-pipelines-scheduledworkflow:latest
Expand Down
1 change: 0 additions & 1 deletion config/configmaps/files/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Images:
MlmdEnvoy: $(IMAGES_MLMDENVOY)
MlmdGRPC: $(IMAGES_MLMDGRPC)
MlmdWriter: $(IMAGES_MLMDWRITER)
CRDViewer: $(IMAGES_CRDVIEWER)
ImagesV2:
Argo:
ApiServer: $(IMAGESV2_ARGO_APISERVER)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,25 @@ spec:
properties:
applyTektonCustomResource:
default: true
description: 'Default: true'
description: 'Default: true Deprecated: DSP V1 only, will be removed
in the future.'
type: boolean
archiveLogs:
default: false
description: 'Default: false'
description: 'Default: false Deprecated: DSP V1 only, will be
removed in the future.'
type: boolean
argoDriverImage:
type: string
argoLauncherImage:
type: string
artifactImage:
description: 'Deprecated: DSP V1 only, will be removed in the
future.'
type: string
artifactScriptConfigMap:
description: 'Deprecated: DSP V1 only, will be removed in the
future.'
properties:
key:
type: string
Expand All @@ -63,7 +69,8 @@ spec:
type: object
autoUpdatePipelineDefaultVersion:
default: true
description: 'Default: true'
description: 'Default: true Deprecated: DSP V1 only, will be removed
in the future.'
type: boolean
cABundle:
description: If the Object store/DB is behind a TLS secured connection
Expand All @@ -83,10 +90,13 @@ spec:
- configMapName
type: object
cacheImage:
description: 'Deprecated: DSP V1 only, will be removed in the
future.'
type: string
collectMetrics:
default: true
description: 'Default: true'
description: 'Default: true Deprecated: DSP V1 only, will be removed
in the future.'
type: boolean
customServerConfigMap:
description: CustomServerConfig is a custom config file that you
Expand All @@ -99,7 +109,8 @@ spec:
type: object
dbConfigConMaxLifetimeSec:
default: 120
description: 'Default: 120'
description: 'Default: 120 Deprecated: DSP V1 only, will be removed
in the future.'
type: integer
deploy:
default: true
Expand All @@ -122,12 +133,14 @@ spec:
type: string
injectDefaultScript:
default: true
description: 'Inject the archive step script. Default: true'
description: 'Inject the archive step script. Default: true Deprecated:
DSP V1 only, will be removed in the future.'
type: boolean
moveResultsImage:
description: Image used for internal artifact passing handling
description: 'Image used for internal artifact passing handling
within Tekton taskruns. This field specifies the image used
in the 'move-all-results-to-tekton-home' step.
in the ''move-all-results-to-tekton-home'' step. Deprecated:
DSP V1 only, will be removed in the future.'
type: string
resources:
description: Specify custom Pod resource requirements for this
Expand Down Expand Up @@ -166,32 +179,25 @@ spec:
type: object
stripEOF:
default: true
description: 'Default: true'
description: 'Default: true Deprecated: DSP V1 only, will be removed
in the future.'
type: boolean
terminateStatus:
default: Cancelled
description: 'Default: "Cancelled" - Allowed Values: "Cancelled",
"StoppedRunFinally", "CancelledRunFinally"'
"StoppedRunFinally", "CancelledRunFinally" Deprecated: DSP V1
only, will be removed in the future.'
enum:
- Cancelled
- StoppedRunFinally
- CancelledRunFinally
type: string
trackArtifacts:
default: true
description: 'Default: true'
description: 'Default: true Deprecated: DSP V1 only, will be removed
in the future.'
type: boolean
type: object
crdviewer:
default:
deploy: false
properties:
deploy:
default: true
type: boolean
image:
type: string
type: object
database:
default:
mariaDB:
Expand Down Expand Up @@ -424,6 +430,8 @@ spec:
type: object
type: object
writer:
description: 'Deprecated: DSP V1 only, will be removed in the
future.'
properties:
image:
type: string
Expand Down Expand Up @@ -542,6 +550,8 @@ spec:
externalStorage:
properties:
basePath:
description: Subpath where objects should be stored for this
DSPA
type: string
bucket:
type: string
Expand Down
Loading

0 comments on commit 99e01be

Please sign in to comment.