diff --git a/.github/build/Dockerfile b/.github/build/Dockerfile new file mode 100644 index 000000000..1765b8ce1 --- /dev/null +++ b/.github/build/Dockerfile @@ -0,0 +1,67 @@ +ARG CI_BASE=registry.access.redhat.com/ubi8 + +FROM ${CI_BASE} as stage1 + +ARG GOLANGCI_LINT_VERSION=1.51.1 +ARG REVIVE_VERSION=v1.2.5 +ARG STATICCHECK_VERSION=v0.3.3 +ARG INEFFASSIGN_VERSION=13ace05 +ARG ERRCHECK_VERSION=v1.6.3 +ARG GHCLI_VERSION=2.23.0 + +ENV GOPATH=/build \ + GO111MODULE=on \ + PATH=/build/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +WORKDIR /build/src + +RUN dnf -y install \ + golang \ + git + +RUN go install github.com/mgechev/revive@${REVIVE_VERSION} +RUN go install honnef.co/go/tools/cmd/staticcheck@${STATICCHECK_VERSION} +RUN go install github.com/gordonklaus/ineffassign@${INEFFASSIGN_VERSION} +RUN go install github.com/kisielk/errcheck@${ERRCHECK_VERSION} + +RUN curl -L -o /tmp/golangci-lint.tar.gz \ + https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz +RUN tar -C /tmp -xv --strip-components=1 -f /tmp/golangci-lint.tar.gz && \ + cp /tmp/golangci-lint /build/bin/ + +RUN curl -L -o /tmp/ghcli.tar.gz https://github.com/cli/cli/releases/download/v${GHCLI_VERSION}/gh_${GHCLI_VERSION}_linux_amd64.tar.gz +RUN tar -C /tmp -xv --strip-components=1 -f /tmp/ghcli.tar.gz && \ + cp /tmp/bin/gh /build/bin/ + +FROM ${CI_BASE} + +ENV SUMMARY="Toolchain for running pre-commit hooks." \ + DESCRIPTION="Toolchain for running pre-commit hooks." \ + PATH=/build/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ + GO111MODULE=on + +LABEL summary="$SUMMARY" \ + description="$DESCRIPTION" \ + io.k8s.description="$DESCRIPTION" \ + io.k8s.display-name="Pre-Commit Toolchain" \ + io.openshift.tags="pre-commit" + +COPY --from=stage1 /build/bin /build/bin + +RUN dnf -y install \ + python39 \ + python3-pip \ + golang \ + git \ + make \ + && \ + dnf clean all + +WORKDIR /build/src + +COPY requirements.txt /tmp/requirements.txt +RUN python3 -m venv /build + +RUN . /build/bin/activate && \ + python3 -m pip install -U pip && \ + python3 -m pip install -r /tmp/requirements.txt diff --git a/.github/build/Pipfile b/.github/build/Pipfile new file mode 100644 index 000000000..72154a5a6 --- /dev/null +++ b/.github/build/Pipfile @@ -0,0 +1,12 @@ +[[source]] +name = "pypi" +url = "https://pypi.org/simple" +verify_ssl = true + +[dev-packages] + +[requires] +python_version = "3.9.16" + +[packages] +pre-commit = "~=2.17.0" diff --git a/.github/build/Pipfile.lock b/.github/build/Pipfile.lock new file mode 100644 index 000000000..90d155146 --- /dev/null +++ b/.github/build/Pipfile.lock @@ -0,0 +1,138 @@ +{ + "_meta": { + "hash": { + "sha256": "681283c9b2071144a4d5a7763542126f39d69316c3890e24c631aa8385ac88b1" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.9.16" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "cfgv": { + "hashes": [ + "sha256:c6a0883f3917a037485059700b9e75da2464e6c27051014ad85ba6aaa5884426", + "sha256:f5a830efb9ce7a445376bb66ec94c638a9787422f96264c98edc6bdeed8ab736" + ], + "markers": "python_full_version >= '3.6.1'", + "version": "==3.3.1" + }, + "distlib": { + "hashes": [ + "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46", + "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e" + ], + "version": "==0.3.6" + }, + "filelock": { + "hashes": [ + "sha256:7b319f24340b51f55a2bf7a12ac0755a9b03e718311dac567a0f4f7fabd2f5de", + "sha256:f58d535af89bb9ad5cd4df046f741f8553a418c01a7856bf0d173bbc9f6bd16d" + ], + "markers": "python_version >= '3.7'", + "version": "==3.9.0" + }, + "identify": { + "hashes": [ + "sha256:7d526dd1283555aafcc91539acc061d8f6f59adb0a7bba462735b0a318bff7ed", + "sha256:93cc61a861052de9d4c541a7acb7e3dcc9c11b398a2144f6e52ae5285f5f4f06" + ], + "markers": "python_version >= '3.7'", + "version": "==2.5.17" + }, + "nodeenv": { + "hashes": [ + "sha256:27083a7b96a25f2f5e1d8cb4b6317ee8aeda3bdd121394e5ac54e498028a042e", + "sha256:e0e7f7dfb85fc5394c6fe1e8fa98131a2473e04311a45afb6508f7cf1836fa2b" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'", + "version": "==1.7.0" + }, + "platformdirs": { + "hashes": [ + "sha256:8a1228abb1ef82d788f74139988b137e78692984ec7b08eaa6c65f1723af28f9", + "sha256:b1d5eb14f221506f50d6604a561f4c5786d9e80355219694a1b244bcd96f4567" + ], + "markers": "python_version >= '3.7'", + "version": "==3.0.0" + }, + "pre-commit": { + "hashes": [ + "sha256:725fa7459782d7bec5ead072810e47351de01709be838c2ce1726b9591dad616", + "sha256:c1a8040ff15ad3d648c70cc3e55b93e4d2d5b687320955505587fd79bbaed06a" + ], + "index": "pypi", + "version": "==2.17.0" + }, + "pyyaml": { + "hashes": [ + "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf", + "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293", + "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b", + "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57", + "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b", + "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4", + "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07", + "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba", + "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9", + "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287", + "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513", + "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0", + "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782", + "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0", + "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92", + "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f", + "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2", + "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc", + "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1", + "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c", + "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86", + "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4", + "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c", + "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34", + "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b", + "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d", + "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c", + "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb", + "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7", + "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737", + "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3", + "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d", + "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358", + "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53", + "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78", + "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803", + "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a", + "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f", + "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174", + "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5" + ], + "markers": "python_version >= '3.6'", + "version": "==6.0" + }, + "toml": { + "hashes": [ + "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b", + "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'", + "version": "==0.10.2" + }, + "virtualenv": { + "hashes": [ + "sha256:37a640ba82ed40b226599c522d411e4be5edb339a0c0de030c0dc7b646d61590", + "sha256:54eb59e7352b573aa04d53f80fc9736ed0ad5143af445a1e539aada6eb947dd1" + ], + "markers": "python_version >= '3.7'", + "version": "==20.19.0" + } + }, + "develop": {} +} diff --git a/.github/build/README.md b/.github/build/README.md new file mode 100644 index 000000000..fbb912d14 --- /dev/null +++ b/.github/build/README.md @@ -0,0 +1,4 @@ +# Pre-Commit Go Toolchain + +The artifacts in this folder are used for running pre-commit CI against Pull Requests in this repo. For the pre-commit +configuration, see the `.github/workflows` directory. diff --git a/.github/build/requirements.txt b/.github/build/requirements.txt new file mode 100644 index 000000000..67e31ad25 --- /dev/null +++ b/.github/build/requirements.txt @@ -0,0 +1,18 @@ +# +# These requirements were autogenerated by pipenv +# To regenerate from the project's Pipfile, run: +# +# pipenv lock --requirements +# + +-i https://pypi.org/simple +cfgv==3.3.1; python_full_version >= '3.6.1' +distlib==0.3.6 +filelock==3.9.0; python_version >= '3.7' +identify==2.5.17; python_version >= '3.7' +nodeenv==1.7.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6' +platformdirs==3.0.0; python_version >= '3.7' +pre-commit==2.17.0 +pyyaml==6.0; python_version >= '3.6' +toml==0.10.2; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2' +virtualenv==20.19.0; python_version >= '3.7' diff --git a/.github/workflows/precommit.yml b/.github/workflows/precommit.yml new file mode 100644 index 000000000..9e4090d1a --- /dev/null +++ b/.github/workflows/precommit.yml @@ -0,0 +1,33 @@ +name: Pre-commit +on: + push: + branches: + - '**' + tags-ignore: + - 'v*' + pull_request: + workflow_dispatch: + +jobs: + precommit: + runs-on: ubuntu-latest + container: + image: quay.io/opendatahub/pre-commit-go-toolchain:v0.1 + env: + XDG_CACHE_HOME: /cache + GOCACHE: /cache/go-build + GOMODCACHE: /cache/go-mod + PRE_COMMIT_HOME: /cache/pre-commit + volumes: + - /cache + steps: + - uses: actions/checkout@v2 + + - name: Activate cache + uses: actions/cache@v2 + with: + path: /cache + key: ${{ runner.os }}-cache-${{ hashFiles('**/go.sum', '.pre-commit-config.yaml') }} + + - name: Run pre-commit checks + run: pre-commit run --all-files diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 000000000..e4fc63b6b --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,12 @@ +run: + timeout: 5m +linters: + enable: + - errcheck + - gosimple + - govet + - ineffassign + - staticcheck + - typecheck + - unused + - revive diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..16a78d2a8 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,30 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.3.0 + hooks: + - id: trailing-whitespace + exclude: README.md + - id: check-merge-conflict + - id: end-of-file-fixer + - id: check-added-large-files + - id: check-case-conflict + - id: check-json + - id: check-symlinks + - id: detect-private-key + + - repo: https://github.com/adrienverge/yamllint.git + rev: v1.25.0 + hooks: + - id: yamllint + files: \.(yaml|yml)$ + types: [file, yaml] + entry: yamllint --strict + + - repo: https://github.com/dnephin/pre-commit-golang + rev: c17f835cf9 + hooks: + - id: go-fmt + - id: golangci-lint + - id: go-unit-tests + - id: go-build + - id: go-mod-tidy diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 000000000..64be913c6 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,11 @@ +extends: default +rules: + line-length: disable + document-start: disable + indentation: + indent-sequences: whatever + comments-indentation: disable + hyphens: + max-spaces-after: 4 + truthy: + check-keys: false diff --git a/OWNERS b/OWNERS index 5ceb3dd83..f13317931 100644 --- a/OWNERS +++ b/OWNERS @@ -9,5 +9,6 @@ reviewers: - DharmitD - gmfrasca - gregsheremeta + - harshad16 - HumairAK - rimolive diff --git a/README.md b/README.md index ece40b124..0195ca229 100644 --- a/README.md +++ b/README.md @@ -40,4 +40,4 @@ oc delete project ${DSP_Namespace_2} cd ${REPO}/config/default kustomize build . | oc delete -f - oc delete project ds-pipelines-controller -``` \ No newline at end of file +``` diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 163913cce..1da6058a5 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -1,6 +1,6 @@ resources: - bases/dspipelines.opendatahub.io_dspipelines.yaml -#+kubebuilder:scaffold:crdkustomizeresource +# +kubebuilder:scaffold:crdkustomizeresource - bases/scheduledworkflows.yaml - bases/viewers.yaml diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index ebbee7b5c..28f4b512b 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -1,4 +1,3 @@ - # Prometheus Monitor Service (Metrics) apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor diff --git a/config/samples/dspipelines.io_v1alpha1_dspipeline.yaml b/config/samples/dspipelines.io_v1alpha1_dspipeline.yaml index 1881e4f30..41897fe16 100644 --- a/config/samples/dspipelines.io_v1alpha1_dspipeline.yaml +++ b/config/samples/dspipelines.io_v1alpha1_dspipeline.yaml @@ -21,23 +21,23 @@ spec: image: quay.io/opendatahub/odh-ml-pipelines-frontend-container:beta-ui configMap: ds-pipeline-ui-configmap database: - mariaDB: # mutually exclusive with custom + mariaDB: # mutually exclusive with custom image: registry.redhat.io/rhel8/mariadb-103:1-188 username: mlpipeline pipelineDBName: randomDBName passwordSecret: name: ds-pipelines-db-sample key: password -# customDB: -# host: mysql:3306 -# port: "8888" -# username: root -# pipelineDBName: randomDBName -# passwordSecret: -# name: somesecret -# key: somekey + # customDB: + # host: mysql:3306 + # port: "8888" + # username: root + # pipelineDBName: randomDBName + # passwordSecret: + # name: somesecret + # key: somekey storage: - minio: # mutually exclusive with custom + minio: # mutually exclusive with custom image: quay.io/opendatahub/minio:RELEASE.2019-08-14T20-37-41Z-license-compliance bucket: mlpipeline s3CredentialsSecret: diff --git a/controllers/apiserver.go b/controllers/apiserver.go index dc3522615..2cf9b35c3 100644 --- a/controllers/apiserver.go +++ b/controllers/apiserver.go @@ -40,7 +40,7 @@ var apiServerTemplates = []string{ const minioArtifactSecret = "config/internal/apiserver/mlpipeline-minio-artifact.yaml.tmpl" const minioArtifactSecretName = "mlpipeline-minio-artifact" -func (r *DSPipelineReconciler) ReconcileAPIServer(dsp *dspipelinesiov1alpha1.DSPipeline, ctx context.Context, req ctrl.Request, params *DSPipelineParams) error { +func (r *DSPipelineReconciler) ReconcileAPIServer(ctx context.Context, dsp *dspipelinesiov1alpha1.DSPipeline, req ctrl.Request, params *DSPipelineParams) error { r.Log.Info("Applying APIServer Resources") for _, template := range apiServerTemplates { diff --git a/controllers/database.go b/controllers/database.go index 381204682..233df5de8 100644 --- a/controllers/database.go +++ b/controllers/database.go @@ -32,7 +32,7 @@ const ( DBServiceTemplate = "config/internal/mariadb/service.yaml.tmpl" ) -func (r *DSPipelineReconciler) ReconcileDatabase(dsp *dspipelinesiov1alpha1.DSPipeline, ctx context.Context, +func (r *DSPipelineReconciler) ReconcileDatabase(ctx context.Context, dsp *dspipelinesiov1alpha1.DSPipeline, req ctrl.Request, params *DSPipelineParams) error { r.Log.Info("Applying Database Resources") diff --git a/controllers/dspipeline_controller.go b/controllers/dspipeline_controller.go index 301e928c9..575c86dd8 100644 --- a/controllers/dspipeline_controller.go +++ b/controllers/dspipeline_controller.go @@ -51,6 +51,9 @@ func (r *DSPipelineReconciler) Apply(owner mf.Owner, params *DSPipelineParams, t tmplManifest, err = tmplManifest.Transform( mf.InjectOwner(owner), ) + if err != nil { + return err + } tmplManifest, err = tmplManifest.Transform(fns...) if err != nil { @@ -154,7 +157,7 @@ func (r *DSPipelineReconciler) Reconcile(ctx context.Context, req ctrl.Request) } } else { if controllerutil.ContainsFinalizer(dspipeline, finalizerName) { - if err := r.cleanUpResources(dspipeline, ctx, req, params); err != nil { + if err := r.cleanUpResources(ctx, req, dspipeline, params); err != nil { return ctrl.Result{}, err } controllerutil.RemoveFinalizer(dspipeline, finalizerName) @@ -178,14 +181,14 @@ func (r *DSPipelineReconciler) Reconcile(ctx context.Context, req ctrl.Request) } if !usingCustomStorage { - err := r.ReconcileStorage(dspipeline, ctx, req, params) + err := r.ReconcileStorage(ctx, dspipeline, req, params) if err != nil { return ctrl.Result{}, err } } if !usingCustomDB { - err = r.ReconcileDatabase(dspipeline, ctx, req, params) + err = r.ReconcileDatabase(ctx, dspipeline, req, params) if err != nil { return ctrl.Result{}, err } @@ -194,7 +197,7 @@ func (r *DSPipelineReconciler) Reconcile(ctx context.Context, req ctrl.Request) // TODO: Ensure db/storage (if deploying custom) are running before // Use status fields to conditionally deploy - err = r.ReconcileAPIServer(dspipeline, ctx, req, params) + err = r.ReconcileAPIServer(ctx, dspipeline, req, params) if err != nil { return ctrl.Result{}, err } @@ -240,7 +243,7 @@ func (r *DSPipelineReconciler) SetupWithManager(mgr ctrl.Manager) error { } // Clean Up any resources not handled by garbage collection, like Cluster Resources -func (r *DSPipelineReconciler) cleanUpResources(dsp *dspipelinesiov1alpha1.DSPipeline, ctx context.Context, req ctrl.Request, params *DSPipelineParams) error { +func (r *DSPipelineReconciler) cleanUpResources(ctx context.Context, req ctrl.Request, dsp *dspipelinesiov1alpha1.DSPipeline, params *DSPipelineParams) error { err := r.CleanUpUI(params) if err != nil { return err diff --git a/controllers/dspipeline_params.go b/controllers/dspipeline_params.go index e1533ba26..a685effb1 100644 --- a/controllers/dspipeline_params.go +++ b/controllers/dspipeline_params.go @@ -38,7 +38,7 @@ type DSPipelineParams struct { Name string Namespace string Owner mf.Owner - ApiServerImage string + APIServerImage string PipelineRuntime string StripEOF string ArtifactScript string @@ -75,7 +75,7 @@ type DSPipelineParams struct { DBServiceName string MinioServiceName string PersistenceAgentImage string - ApiServerServiceName string + APIServerServiceName string ScheduledWorkflowImage string VisualizationServerImage string ViewerCrdImage string @@ -116,7 +116,7 @@ func (r *DSPipelineParams) ExtractParams(dsp *dspipelinesiov1alpha1.DSPipeline) r.Name = dsp.Name r.Namespace = dsp.Namespace r.Owner = dsp - r.ApiServerImage = dsp.Spec.APIServer.Image + r.APIServerImage = dsp.Spec.APIServer.Image r.PipelineRuntime = "tekton" r.StripEOF = "true" r.ObjectStoreConfigSecure = "false" @@ -130,7 +130,7 @@ func (r *DSPipelineParams) ExtractParams(dsp *dspipelinesiov1alpha1.DSPipeline) r.AutoUpdatePipelineDefaultVersion = "true" r.DBConfigCONMAXLifetimeSec = "120" r.PersistenceAgentImage = dsp.Spec.PersistentAgent.Image - r.ApiServerServiceName = fmt.Sprintf("%s-%s", defaultDSPServicePrefix, r.Name) + r.APIServerServiceName = fmt.Sprintf("%s-%s", defaultDSPServicePrefix, r.Name) r.ScheduledWorkflowImage = dsp.Spec.ScheduledWorkflow.Image r.ViewerCrdImage = dsp.Spec.ViewerCRD.Image r.CronScheduleTimezone = "UTC" diff --git a/controllers/storage.go b/controllers/storage.go index 127e4b1c1..5f4850691 100644 --- a/controllers/storage.go +++ b/controllers/storage.go @@ -32,7 +32,7 @@ const ( storageSecretTemplate = "config/internal/minio/secret.yaml.tmpl" ) -func (r *DSPipelineReconciler) ReconcileStorage(dsp *dspipelinesiov1alpha1.DSPipeline, ctx context.Context, +func (r *DSPipelineReconciler) ReconcileStorage(ctx context.Context, dsp *dspipelinesiov1alpha1.DSPipeline, req ctrl.Request, params *DSPipelineParams) error { r.Log.Info("Applying Storage Resources") diff --git a/hack/boilerplate.go.txt b/hack/boilerplate.go.txt index 65b862271..6975adbe0 100644 --- a/hack/boilerplate.go.txt +++ b/hack/boilerplate.go.txt @@ -12,4 +12,4 @@ 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. -*/ \ No newline at end of file +*/