From 009bff2231cf68db71ffa7142db483a01c864a4f Mon Sep 17 00:00:00 2001 From: Eli Date: Thu, 26 Dec 2024 14:25:17 +0200 Subject: [PATCH] Next 1 (#202) * new versions for default grafana and kibana images * fix typo in kibana version * Update appdefaults.go upgrade redis/elastic * Update values.yaml upgrade redis/elastic * update images * update images * upgrade go and dockerfile * change redis and pg * pg16 * reduce pg to 12 * Update values.yaml * Update values.yaml * Update values.yaml * Update values.yaml * Update values.yaml * weekly image * Update values.yaml * change proxy config to secret * update new images * update new images * next-1 bump docker * next-1 bump docker * add minio console ui * ingress console * console route #minor --- Dockerfile | 2 +- api/v1/appdefaults.go | 10 +++--- charts/cvatdbs/values.yaml | 4 +-- charts/mlops/values.yaml | 23 +++++++------ charts/mpi/values.yaml | 4 +-- charts/nomex/values.yaml | 4 +-- charts/optionals/helmfile.yaml | 6 ++-- go.mod | 6 ++-- go.sum | 27 +++------------ pkg/app/dbs/tmpl/minio/ingress-console.tpl | 38 ++++++++++++++++++++++ pkg/app/dbs/tmpl/minio/route-console.tpl | 37 +++++++++++++++++++++ pkg/app/dbs/tmpl/minio/svc-console.tpl | 30 +++++++++++++++++ pkg/app/dbs/tmpl/minio/vs-console.tpl | 29 +++++++++++++++++ 13 files changed, 167 insertions(+), 53 deletions(-) create mode 100644 pkg/app/dbs/tmpl/minio/ingress-console.tpl create mode 100644 pkg/app/dbs/tmpl/minio/route-console.tpl create mode 100644 pkg/app/dbs/tmpl/minio/svc-console.tpl create mode 100644 pkg/app/dbs/tmpl/minio/vs-console.tpl diff --git a/Dockerfile b/Dockerfile index 60fe61c7..4d05f221 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.22.6 as builder +FROM golang:1.23.0 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/api/v1/appdefaults.go b/api/v1/appdefaults.go index f570450c..da95f3ff 100644 --- a/api/v1/appdefaults.go +++ b/api/v1/appdefaults.go @@ -191,7 +191,7 @@ var minioDefaults = Minio{ var pgDefault = Pg{ Enabled: false, ServiceAccount: "pg", - Image: "postgresql-12-centos7:latest", + Image: "postgresql-12-centos7:pg13", Port: 5432, StorageSize: "80Gi", SvcName: "postgres", @@ -270,7 +270,7 @@ var esDefault = Es{ ServiceAccount: "kibana", SvcName: "kibana", Port: 8080, - Image: "cnvrg/kibana:7.11.2", + Image: "cnvrg/kibana:v7.17.25", NodePort: 30601, Requests: Requests{ Cpu: "100m", @@ -318,7 +318,7 @@ var promDefaults = Prom{ CredsRef: "prom-creds", SvcName: "prometheus", Port: 9090, - Image: "prometheus:v2.37.1", + Image: "prometheus:v2.55", StorageSize: "50Gi", Grafana: Grafana{ Enabled: false, @@ -428,7 +428,7 @@ var ssoDefault = SSO{ Enabled: false, Replicas: 1, SvcName: "sso-central", - CnvrgProxyImage: "cnvrg-proxy:ns-watch-scope", + CnvrgProxyImage: "cap:v0.0.12", OauthProxyImage: "oauth2-proxy:v7.4.ssov3.p6", CentralUiImage: "centralsso:latest", EmailDomain: []string{"*"}, @@ -450,7 +450,7 @@ var ssoDefault = SSO{ Proxy: CentralProxy{ Enabled: false, Replicas: 1, - Image: "cnvrg-proxy:ns-watch-scope", + Image: "cap:v0.0.12", SvcName: "cnvrg-proxy-central", Requests: Requests{ Cpu: "200m", diff --git a/charts/cvatdbs/values.yaml b/charts/cvatdbs/values.yaml index fbf2dadc..c86c4b33 100644 --- a/charts/cvatdbs/values.yaml +++ b/charts/cvatdbs/values.yaml @@ -20,7 +20,7 @@ pg: cpu: 200m memory: 1Gi redis: - image: redis:7.0.5 + image: redis:7.4.0 confRef: cvat-redis resources: limits: @@ -28,4 +28,4 @@ redis: memory: 2Gi requests: cpu: 100m - memory: 200Mi \ No newline at end of file + memory: 200Mi diff --git a/charts/mlops/values.yaml b/charts/mlops/values.yaml index 974d852b..015223ef 100644 --- a/charts/mlops/values.yaml +++ b/charts/mlops/values.yaml @@ -72,7 +72,7 @@ controlPlane: maxReplicas: 5 hyper: enabled: true - image: hyper-server:latest + image: hyper-server:v2.0 port: 5050 replicas: 1 nodePort: 30050 @@ -149,7 +149,7 @@ dbs: pg: enabled: true serviceAccount: pg - image: postgresql-12-centos7:latest + image: postgresql-12-centos7:pg13 port: 5432 storageSize: 80Gi svcName: postgres @@ -173,7 +173,7 @@ dbs: redis: enabled: true serviceAccount: redis - image: cnvrg-redis:v7.0.0 + image: redis:7.4.0 svcName: redis port: 6379 storageSize: 10Gi @@ -191,7 +191,7 @@ dbs: enabled: true serviceAccount: minio replicas: 1 - image: minio:RELEASE.2021-05-22T02-34-39Z + image: minio:RELEASE.2024-09-13T20-26-02Z port: 9000 storageSize: 100Gi svcName: minio @@ -234,7 +234,7 @@ dbs: serviceAccount: kibana svcName: kibana port: 8080 - image: cnvrg/kibana:7.11.2 + image: cnvrg/kibana:v7.17.25 nodePort: 30601 requests: cpu: 100m @@ -245,8 +245,8 @@ dbs: credsRef: kibana-creds elastalert: enabled: true - image: elastalert:3.0.0-beta.1 - authProxyImage: nginx:1.20 + image: elastalert:v5.1 + authProxyImage: nginx:1.27.1 credsRef: elastalert-creds port: 8080 nodePort: 32030 @@ -265,12 +265,12 @@ dbs: enabled: true credsRef: prom-creds extraScrapeConfigs: - image: prometheus:v2.37.1 + image: prometheus:v2.55 storageClass: "" storageSize: 50Gi grafana: enabled: true - image: grafana/grafana-oss:9.5.20 + image: grafana/grafana-oss:11.2.0 svcName: grafana port: 8080 nodePort: 30012 @@ -312,7 +312,7 @@ sso: enabled: false name: cnvrg-jwks image: jwks:ns-watch-scope - cacheImage: redis:7.0.5 + cacheImage: redis:7.4.0 central: enabled: false publicUrl: '' @@ -341,7 +341,7 @@ sso: memory: 4Gi proxy: enabled: false - image: cnvrg-proxy:4d10ded + image: cap:v0.0.12 address: "" readiness: true requests: @@ -365,4 +365,3 @@ mpi: metastorageprovisioner: enabled: true version: '' - diff --git a/charts/mpi/values.yaml b/charts/mpi/values.yaml index 88ed331a..8df425fd 100644 --- a/charts/mpi/values.yaml +++ b/charts/mpi/values.yaml @@ -1,6 +1,6 @@ imageHub: docker.io -image: mpioperator/mpi-operator:v0.2.3 -kubectlDeliveryImage: mpioperator/kubectl-delivery:v0.2.3 +image: mpioperator/mpi-operator:v0.5 +kubectlDeliveryImage: mpioperator/kubectl-delivery:v0.5 imagePullSecretRef: cnvrg-app-registry scc: false registry: diff --git a/charts/nomex/values.yaml b/charts/nomex/values.yaml index 0b74bcf1..ad001300 100644 --- a/charts/nomex/values.yaml +++ b/charts/nomex/values.yaml @@ -1,3 +1,3 @@ imageHub: docker.io/cnvrg -image: nomex:v1.0.0 -imagePullSecretRef: cnvrg-app-registry \ No newline at end of file +image: nomex:v2.0.0 +imagePullSecretRef: cnvrg-app-registry diff --git a/charts/optionals/helmfile.yaml b/charts/optionals/helmfile.yaml index 6b672b68..75a9b71a 100644 --- a/charts/optionals/helmfile.yaml +++ b/charts/optionals/helmfile.yaml @@ -1,21 +1,21 @@ releases: - name: istio-base chart: istio/base - version: 1.21.2 + version: 1.23.1 namespace: istio-system labels: stage: istio-infra - name: istiod chart: istio/istiod - version: 1.21.2 + version: 1.23.1 namespace: istio-system labels: stage: istio-infra - name: istio-ingress chart: istio/gateway - version: 1.21.2 + version: 1.23.1 namespace: istio-system labels: stage: istio-gateway diff --git a/go.mod b/go.mod index 4096b816..b17e51f5 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/AccessibleAI/cnvrg-operator -go 1.22.0 - -toolchain go1.22.2 +go 1.23.0 require ( dario.cat/mergo v1.0.0 @@ -48,7 +46,7 @@ require ( github.com/distribution/reference v0.5.0 // indirect github.com/docker/cli v25.0.1+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker v25.0.5+incompatible // indirect + github.com/docker/docker v25.0.6+incompatible // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-metrics v0.0.1 // indirect diff --git a/go.sum b/go.sum index 4508d806..57d5059b 100644 --- a/go.sum +++ b/go.sum @@ -89,8 +89,8 @@ github.com/docker/cli v25.0.1+incompatible h1:mFpqnrS6Hsm3v1k7Wa/BO23oz0k121MTbT github.com/docker/cli v25.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= -github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v25.0.6+incompatible h1:5cPwbwriIcsua2REJe8HqQV+6WlWc1byg2QSXzBxBGg= +github.com/docker/docker v25.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= @@ -107,8 +107,6 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= -github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM= @@ -329,12 +327,11 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= -github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= +github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= +github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.31.0 h1:54UJxxj6cPInHS3a35wm6BK/F9nHYueZ1NVujHDrnXE= -github.com/onsi/gomega v1.31.0/go.mod h1:DW9aCi7U6Yi40wNVAvT6kzFnEVEI5n3DloYBiKiT6zk= +github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk= github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -615,30 +612,18 @@ helm.sh/helm/v3 v3.15.3 h1:HcZDaVFe9uHa6hpsR54mJjYyRy4uz/pc6csg27nxFOc= helm.sh/helm/v3 v3.15.3/go.mod h1:FzSIP8jDQaa6WAVg9F+OkKz7J0ZmAga4MABtTbsb9WQ= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.30.0 h1:siWhRq7cNjy2iHssOB9SCGNCl2spiF1dO3dABqZ8niA= -k8s.io/api v0.30.0/go.mod h1:OPlaYhoHs8EQ1ql0R/TsUgaRPhpKNxIMrKQfWUp8QSE= k8s.io/api v0.30.1 h1:kCm/6mADMdbAxmIh0LBjS54nQBE+U4KmbCfIkF5CpJY= k8s.io/api v0.30.1/go.mod h1:ddbN2C0+0DIiPntan/bye3SW3PdwLa11/0yqwvuRrJM= -k8s.io/apiextensions-apiserver v0.30.0 h1:jcZFKMqnICJfRxTgnC4E+Hpcq8UEhT8B2lhBcQ+6uAs= -k8s.io/apiextensions-apiserver v0.30.0/go.mod h1:N9ogQFGcrbWqAY9p2mUAL5mGxsLqwgtUce127VtRX5Y= k8s.io/apiextensions-apiserver v0.30.1 h1:4fAJZ9985BmpJG6PkoxVRpXv9vmPUOVzl614xarePws= k8s.io/apiextensions-apiserver v0.30.1/go.mod h1:R4GuSrlhgq43oRY9sF2IToFh7PVlF1JjfWdoG3pixk4= -k8s.io/apimachinery v0.30.0 h1:qxVPsyDM5XS96NIh9Oj6LavoVFYff/Pon9cZeDIkHHA= -k8s.io/apimachinery v0.30.0/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= k8s.io/apimachinery v0.30.1 h1:ZQStsEfo4n65yAdlGTfP/uSHMQSoYzU/oeEbkmF7P2U= k8s.io/apimachinery v0.30.1/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= -k8s.io/apiserver v0.30.0 h1:QCec+U72tMQ+9tR6A0sMBB5Vh6ImCEkoKkTDRABWq6M= -k8s.io/apiserver v0.30.0/go.mod h1:smOIBq8t0MbKZi7O7SyIpjPsiKJ8qa+llcFCluKyqiY= k8s.io/apiserver v0.30.1 h1:BEWEe8bzS12nMtDKXzCF5Q5ovp6LjjYkSp8qOPk8LZ8= k8s.io/apiserver v0.30.1/go.mod h1:i87ZnQ+/PGAmSbD/iEKM68bm1D5reX8fO4Ito4B01mo= k8s.io/cli-runtime v0.30.0 h1:0vn6/XhOvn1RJ2KJOC6IRR2CGqrpT6QQF4+8pYpWQ48= k8s.io/cli-runtime v0.30.0/go.mod h1:vATpDMATVTMA79sZ0YUCzlMelf6rUjoBzlp+RnoM+cg= -k8s.io/client-go v0.30.0 h1:sB1AGGlhY/o7KCyCEQ0bPWzYDL0pwOZO4vAtTSh/gJQ= -k8s.io/client-go v0.30.0/go.mod h1:g7li5O5256qe6TYdAMyX/otJqMhIiGgTapdLchhmOaY= k8s.io/client-go v0.30.1 h1:uC/Ir6A3R46wdkgCV3vbLyNOYyCJ8oZnjtJGKfytl/Q= k8s.io/client-go v0.30.1/go.mod h1:wrAqLNs2trwiCH/wxxmT/x3hKVH9PuV0GGW0oDoHVqc= -k8s.io/component-base v0.30.0 h1:cj6bp38g0ainlfYtaOQuRELh5KSYjhKxM+io7AUIk4o= -k8s.io/component-base v0.30.0/go.mod h1:V9x/0ePFNaKeKYA3bOvIbrNoluTSG+fSJKjLdjOoeXQ= k8s.io/component-base v0.30.1 h1:bvAtlPh1UrdaZL20D9+sWxsJljMi0QZ3Lmw+kmZAaxQ= k8s.io/component-base v0.30.1/go.mod h1:e/X9kDiOebwlI41AvBHuWdqFriSRrX50CdwA9TFaHLI= k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= @@ -651,8 +636,6 @@ k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCf k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= oras.land/oras-go v1.2.5 h1:XpYuAwAb0DfQsunIyMfeET92emK8km3W4yEzZvUbsTo= oras.land/oras-go v1.2.5/go.mod h1:PuAwRShRZCsZb7g8Ar3jKKQR/2A/qN+pkYxIOd/FAoo= -sigs.k8s.io/controller-runtime v0.17.0 h1:fjJQf8Ukya+VjogLO6/bNX9HE6Y2xpsO5+fyS26ur/s= -sigs.k8s.io/controller-runtime v0.17.0/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw= sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= diff --git a/pkg/app/dbs/tmpl/minio/ingress-console.tpl b/pkg/app/dbs/tmpl/minio/ingress-console.tpl new file mode 100644 index 00000000..0f547fd6 --- /dev/null +++ b/pkg/app/dbs/tmpl/minio/ingress-console.tpl @@ -0,0 +1,38 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + nginx.ingress.kubernetes.io/proxy-send-timeout: 18000s + nginx.ingress.kubernetes.io/proxy-read-timeout: 18000s + nginx.ingress.kubernetes.io/proxy-body-size: 5G + mlops.cnvrg.io/default-loader: "true" + mlops.cnvrg.io/own: "true" + mlops.cnvrg.io/updatable: "true" + {{- range $k, $v := .Spec.Annotations }} + {{$k}}: "{{$v}}" + {{- end }} + name: {{ .Spec.Dbs.Minio.SvcName }}-console + namespace: {{.Namespace }} + labels: + {{- range $k, $v := .Spec.Labels }} + {{$k}}: "{{$v}}" + {{- end }} +spec: + ingressClassName: nginx + {{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }} + tls: + - hosts: + - {{ .Spec.Dbs.Minio.SvcName}}{{.Spec.Networking.ClusterDomainPrefix.Prefix}}.{{ .Spec.ClusterDomain }} + secretName: {{ .Spec.Networking.HTTPS.CertSecret }} + {{- end }} + rules: + - host: "{{.Spec.Dbs.Minio.SvcName}}-console{{.Spec.Networking.ClusterDomainPrefix.Prefix}}.{{ .Spec.ClusterDomain }}" + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ .Spec.Dbs.Minio.SvcName }}-console + port: + number: {{ .Spec.Dbs.Minio.Port }} diff --git a/pkg/app/dbs/tmpl/minio/route-console.tpl b/pkg/app/dbs/tmpl/minio/route-console.tpl new file mode 100644 index 00000000..b8b58ef6 --- /dev/null +++ b/pkg/app/dbs/tmpl/minio/route-console.tpl @@ -0,0 +1,37 @@ +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + annotations: + mlops.cnvrg.io/default-loader: "true" + mlops.cnvrg.io/own: "true" + mlops.cnvrg.io/updatable: "true" + haproxy.router.openshift.io/timeout: {{ .Spec.Networking.Ingress.PerTryTimeout }} + {{- range $k, $v := .Spec.Annotations }} + {{$k}}: "{{$v}}" + {{- end }} + name: {{ .Spec.Dbs.Minio.SvcName }}-console + namespace: {{.Namespace }} + labels: + app: {{.Namespace }} + {{- range $k, $v := .Spec.Labels }} + {{$k}}: "{{$v}}" + {{- end }} +spec: + host: "{{ .Spec.Dbs.Minio.SvcName }}-console{{.Spec.Networking.ClusterDomainPrefix.Prefix}}.{{ .Spec.ClusterDomain }}" + port: + targetPort: {{ .Spec.Dbs.Minio.Port }} + to: + kind: Service + name: {{ .Spec.Dbs.Minio.SvcName }}-console + weight: 100 + {{- if isTrue .Spec.Networking.HTTPS.Enabled }} + tls: + termination: edge + insecureEdgeTerminationPolicy: Redirect + {{- if isTrue .Spec.Networking.Ingress.OcpSecureRoutes }} + certificate: | +{{ printf "%s" .Spec.Networking.HTTPS.Cert | indent 6 }} + key: | +{{ printf "%s" .Spec.Networking.HTTPS.Key | indent 6 }} + {{- end }} + {{- end }} \ No newline at end of file diff --git a/pkg/app/dbs/tmpl/minio/svc-console.tpl b/pkg/app/dbs/tmpl/minio/svc-console.tpl new file mode 100644 index 00000000..0251bcda --- /dev/null +++ b/pkg/app/dbs/tmpl/minio/svc-console.tpl @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Spec.Dbs.Minio.SvcName }}-console + namespace: {{.Namespace }} + annotations: + mlops.cnvrg.io/default-loader: "true" + mlops.cnvrg.io/own: "true" + mlops.cnvrg.io/updatable: "true" + {{- range $k, $v := .Spec.Annotations }} + {{$k}}: "{{$v}}" + {{- end }} + labels: + app: {{ .Spec.Dbs.Minio.SvcName }} + {{- range $k, $v := .Spec.Labels }} + {{$k}}: "{{$v}}" + {{- end }} +spec: + {{- if eq .Spec.Networking.Ingress.Type "nodeport" }} + type: NodePort + {{- end }} + ports: + - name: http + port: 9090 + targetPort: 9090 + {{- if eq .Spec.Networking.Ingress.Type "nodeport" }} + nodePort: 30001 + {{- end }} + selector: + app: {{ .Spec.Dbs.Minio.SvcName }} diff --git a/pkg/app/dbs/tmpl/minio/vs-console.tpl b/pkg/app/dbs/tmpl/minio/vs-console.tpl new file mode 100644 index 00000000..a52841bd --- /dev/null +++ b/pkg/app/dbs/tmpl/minio/vs-console.tpl @@ -0,0 +1,29 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: {{ .Spec.Dbs.Minio.SvcName }}-console + namespace: {{.Namespace }} + annotations: + mlops.cnvrg.io/default-loader: "true" + mlops.cnvrg.io/own: "true" + mlops.cnvrg.io/updatable: "true" + {{- range $k, $v := .Spec.Annotations }} + {{$k}}: "{{$v}}" + {{- end }} + labels: + {{- range $k, $v := .Spec.Labels }} + {{$k}}: "{{$v}}" + {{- end }} +spec: + hosts: + - "{{ .Spec.Dbs.Minio.SvcName}}-console{{.Spec.Networking.ClusterDomainPrefix.Prefix}}.{{ .Spec.ClusterDomain }}" + gateways: + - {{ .Spec.Networking.Ingress.IstioGwName}} + http: + - retries: + attempts: {{ .Spec.Networking.Ingress.RetriesAttempts }} + perTryTimeout: 172800s + timeout: 864000s + route: + - destination: + host: "{{ .Spec.Dbs.Minio.SvcName }}-console.{{.Namespace }}.svc.{{ .Spec.ClusterInternalDomain }}" \ No newline at end of file