From f150d08498da6f11ff8614b58de67ea8162bec64 Mon Sep 17 00:00:00 2001 From: Simon Beck Date: Thu, 7 Sep 2023 11:08:54 +0200 Subject: [PATCH 1/2] Add minio objectbucket --- class/defaults.yml | 7 + component/common.libsonnet | 8 +- component/objectstorage.jsonnet | 41 ++++ dev/component/objectstorage.jsonnet | 175 ----------------- dev/scripts/exoscale-plans/go.mod | 21 -- dev/scripts/exoscale-plans/go.sum | 180 ------------------ dev/scripts/exoscale-plans/main.go | 94 --------- ..._composition_objectstorage_cloudscale.yaml | 2 +- ...21_composition_objectstorage_exoscale.yaml | 4 +- ...21_composition_objectstorage_exoscale.yaml | 4 +- .../appcat/20_rbac_helm_provider_dev.yaml | 64 ------- .../appcat/appcat/20_xrd_objectstorage.yaml | 2 +- .../21_composition_objectstorage_minio.yaml | 39 ++++ ...1_composition_objectstorage_minio_dev.yaml | 21 -- tests/minio.yml | 5 - tests/vshn.yml | 10 +- 16 files changed, 103 insertions(+), 574 deletions(-) delete mode 100644 dev/component/objectstorage.jsonnet delete mode 100644 dev/scripts/exoscale-plans/go.mod delete mode 100644 dev/scripts/exoscale-plans/go.sum delete mode 100644 dev/scripts/exoscale-plans/main.go delete mode 100644 tests/golden/vshn/appcat/appcat/20_rbac_helm_provider_dev.yaml create mode 100644 tests/golden/vshn/appcat/appcat/21_composition_objectstorage_minio.yaml delete mode 100644 tests/golden/vshn/appcat/appcat/21_composition_objectstorage_minio_dev.yaml diff --git a/class/defaults.yml b/class/defaults.yml index 0daa5b8bb..e1d3c9d44 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -371,6 +371,13 @@ parameters: secretNamespace: ${appcat:services:generic:objectstorage:secretNamespace} providerSecretNamespace: ${appcat:providers:cloudscale:connectionSecretNamespace} bucketDeletionPolicy: ${appcat:services:generic:objectstorage:bucketDeletionPolicy} + minio: + enabled: false + secretNamespace: ${appcat:services:generic:objectstorage:secretNamespace} + providerSecretNamespace: ${appcat:providers:cloudscale:connectionSecretNamespace} + bucketDeletionPolicy: ${appcat:services:generic:objectstorage:bucketDeletionPolicy} + grpcEndpoint: ${appcat:grpcEndpoint} + providerConfig: minio # Generic config for objecstorage composite secretNamespace: ${crossplane:namespace} diff --git a/component/common.libsonnet b/component/common.libsonnet index c4a058c3b..852f88ab7 100644 --- a/component/common.libsonnet +++ b/component/common.libsonnet @@ -67,14 +67,18 @@ local vshnMetaVshnDBaas(dbname, flavor, offered, plans) = vshnMetaVshn(dbname, f }, }; +local providerZones(provider) = + if provider == 'Exoscale' then strExoscaleZones + else if provider == 'Cloudscale' then strCloudscaleZones + else if provider == 'Minio' then 'us-east-1'; + local vshnMetaObjectStorage(provider) = { metadata+: { annotations+: { 'metadata.appcat.vshn.io/displayname': provider + ' Object Storage', 'metadata.appcat.vshn.io/description': 'S3 compatible object storage hosted by ' + provider, 'metadata.appcat.vshn.io/end-user-docs-url': 'https://vs.hn/objstor', - 'metadata.appcat.vshn.io/zone': provider + ' zones: ' + - if provider == 'Exoscale' then strExoscaleZones else strCloudscaleZones, + 'metadata.appcat.vshn.io/zone': providerZones(provider), 'metadata.appcat.vshn.io/product-description': 'https://products.docs.vshn.ch/products/appcat/objectstorage.html', }, labels+: { diff --git a/component/objectstorage.jsonnet b/component/objectstorage.jsonnet index e3af35950..ad3e6ba94 100644 --- a/component/objectstorage.jsonnet +++ b/component/objectstorage.jsonnet @@ -241,9 +241,50 @@ local compositionExoscale = }, }; +local compositionMinio = + + local compParams = objStoParams.compositions.minio; + + kube._Object('apiextensions.crossplane.io/v1', 'Composition', 'minio.objectbuckets.appcat.vshn.io') + + common.SyncOptions + + common.VshnMetaObjectStorage('Minio') + + { + spec: { + compositeTypeRef: comp.CompositeRef(xrd), + writeConnectionSecretsToNamespace: compParams.secretNamespace, + functions: + [ + { + name: 'minio-func', + type: 'Container', + config: kube.ConfigMap('xfn-config') + { + metadata: { + labels: { + name: 'xfn-config', + }, + name: 'xfn-config', + }, + data: { + providerConfig: objStoParams.compositions.minio.providerConfig, + }, + }, + container: { + image: 'miniobucket', + imagePullPolicy: 'IfNotPresent', + timeout: '20s', + runner: { + endpoint: objStoParams.compositions.minio.grpcEndpoint, + }, + }, + }, + ], + }, + }; + if objStoParams.enabled then { '20_xrd_objectstorage': xrd, '20_rbac_objectstorage': xrds.CompositeClusterRoles(xrd), [if objStoParams.compositions.cloudscale.enabled then '21_composition_objectstorage_cloudscale']: compositionCloudscale, [if objStoParams.compositions.exoscale.enabled then '21_composition_objectstorage_exoscale']: compositionExoscale, + [if objStoParams.compositions.minio.enabled then '21_composition_objectstorage_minio']: compositionMinio, } else {} diff --git a/dev/component/objectstorage.jsonnet b/dev/component/objectstorage.jsonnet deleted file mode 100644 index 2912915ae..000000000 --- a/dev/component/objectstorage.jsonnet +++ /dev/null @@ -1,175 +0,0 @@ -local com = import 'lib/commodore.libjsonnet'; -local kap = import 'lib/kapitan.libjsonnet'; -local kube = import 'lib/kube.libjsonnet'; - -local comp = import 'lib/appcat-compositions.libsonnet'; -local crossplane = import 'lib/crossplane.libsonnet'; - -local common = import '../component/common.libsonnet'; -local xrds = import '../component/xrds.libsonnet'; - -local inv = kap.inventory(); -local params = inv.parameters.appcat; -local objStoParams = params.services.generic.objectstorage; - -local xrd = xrds.XRDFromCRD( - 'xobjectbuckets.appcat.vshn.io', - xrds.LoadCRD('appcat.vshn.io_objectbuckets.yaml', params.images.appcat.tag), - defaultComposition='%s.objectbuckets.appcat.vshn.io' % objStoParams.defaultComposition, - connectionSecretKeys=[ - 'AWS_ACCESS_KEY_ID', - 'AWS_SECRET_ACCESS_KEY', - 'AWS_REGION', - 'ENDPOINT', - 'ENDPOINT_URL', - 'BUCKET_NAME', - ] -); - -local minioRbac = - local provider = params.providers.helm; - - local sa = kube.ServiceAccount(provider.controllerConfig.serviceAccountName) { - metadata+: { - namespace: provider.namespace, - }, - }; - local role = kube.ClusterRole('crossplane:provider:provider-helm:system:dev') { - rules: [ - { - apiGroups: [ '' ], - resources: [ 'persistentvolumeclaims', 'deployments' ], - verbs: [ 'get', 'list', 'watch', 'create', 'watch', 'patch', 'update', 'delete' ], - }, - { - apiGroups: [ 'apps' ], - resources: [ 'deployments' ], - verbs: [ 'get', 'list', 'watch', 'create', 'watch', 'patch', 'update', 'delete' ], - }, - { - apiGroups: [ 'batch' ], - resources: [ 'jobs' ], - verbs: [ 'get', 'list', 'watch', 'create', 'watch', 'patch', 'update', 'delete' ], - }, - ], - }; - local rolebinding = kube.ClusterRoleBinding('crossplane:provider:provider-helm:system:dev') { - roleRef_: role, - subjects_: [ sa ], - }; - - [ - role, - rolebinding, - ]; - -local compositionMinioDev = - - local namespace = comp.KubeObject('v1', 'Namespace'); - - local devMinioHelmChart = - { - apiVersion: 'helm.crossplane.io/v1beta1', - kind: 'Release', - spec+: { - deletionPolicy: 'Delete', - rollbackLimit: 3, - connectionDetails: [ - { - apiVersion: 'v1', - kind: 'Service', - name: 'minio-server', - fieldPath: 'spec.clusterIP', - toConnectionSecretKey: 'ENDPOINT_URL', - namespace: 'minio', - }, - { - apiVersion: 'v1', - kind: 'Secret', - name: 'minio-server', - fieldPath: 'data.rootUser', - toConnectionSecretKey: 'AWS_ACCESS_KEY_ID', - namespace: 'minio', - }, - { - apiVersion: 'v1', - kind: 'Secret', - name: 'minio-server', - fieldPath: 'data.rootPassword', - toConnectionSecretKey: 'AWS_SECRET_ACCESS_KEY', - namespace: 'minio', - }, - ], - writeConnectionSecretToRef: { - name: '', - namespace: 'syn-crossplane', - }, - forProvider+: { - namespace: 'minio', - chart: { - name: 'minio', - repository: 'https://charts.min.io/', - version: '5.0.7', - }, - set: [ - { - name: 'rootUser', - value: 'minioadmin', - }, - { - name: 'rootPassword', - value: 'minioadmin', - }, - ], - values: { - fullnameOverride: 'minio-server', - replicas: 1, - resources: { - requests: { - memory: '128Mi', - }, - }, - persistence: { - size: '1Gi', - }, - mode: 'standalone', - buckets: [ - { - name: '', - policy: 'none', - }, - ], - }, - }, - providerConfigRef: { - name: 'helm', - }, - }, - }; - - kube._Object('apiextensions.crossplane.io/v1', 'Composition', 'dev.objectbuckets.appcat.vshn.io') + - common.SyncOptions + - { - spec: { - compositeTypeRef: comp.CompositeRef(xrd), - writeConnectionSecretsToNamespace: 'syn-crossplane', - functions: - [ - { - name: 'miniodev-func', - type: 'Container', - container: { - image: 'miniodev', - runner: { - endpoint: 'unix-abstract:crossplane/fn/default.sock', - }, - }, - }, - ], - }, - }; - -if objStoParams.enabled then { - '20_rbac_helm_provider_dev': minioRbac, - '21_composition_objectstorage_minio_dev': compositionMinioDev, -} else {} diff --git a/dev/scripts/exoscale-plans/go.mod b/dev/scripts/exoscale-plans/go.mod deleted file mode 100644 index d589dcdb4..000000000 --- a/dev/scripts/exoscale-plans/go.mod +++ /dev/null @@ -1,21 +0,0 @@ -module github.com/vshn/component-appcat/dev/scripts/exoscale-plans - -go 1.20 - -require ( - github.com/exoscale/egoscale v0.100.1 - k8s.io/apimachinery v0.27.2 -) - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/deepmap/oapi-codegen v1.9.1 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/hashicorp/go-cleanhttp v0.5.1 // indirect - github.com/hashicorp/go-retryablehttp v0.7.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect - github.com/stretchr/testify v1.8.1 // indirect - gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/dev/scripts/exoscale-plans/go.sum b/dev/scripts/exoscale-plans/go.sum deleted file mode 100644 index e5523dd74..000000000 --- a/dev/scripts/exoscale-plans/go.sum +++ /dev/null @@ -1,180 +0,0 @@ -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210816181553-5444fa50b93d/go.mod h1:tmAIfUFEirG/Y8jhZ9M+h36obRZAk/1fcSpXwAVlfqE= -github.com/deepmap/oapi-codegen v1.9.1 h1:yHmEnA7jSTUMQgV+uN02WpZtwHnz2CBW3mZRIxr1vtI= -github.com/deepmap/oapi-codegen v1.9.1/go.mod h1:PLqNAhdedP8ttRpBBkzLKU3bp+Fpy+tTgeAMlztR2cw= -github.com/exoscale/egoscale v0.100.1 h1:iXsV1Ei7daqe/6FYSCSDyrFs1iUG1l1X9qNh2uMw6z0= -github.com/exoscale/egoscale v0.100.1/go.mod h1:BAb9p4rmyU+Wl400CJZO5270H2sXtdsZjLcm5xMKkz4= -github.com/getkin/kin-openapi v0.87.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= -github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-playground/validator/v10 v10.9.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= -github.com/goccy/go-json v0.7.8/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= -github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.6.3/go.mod h1:Hk5OiHj0kDqmFq7aHe7eDqI7CUhuCrfpupQtLGGLm7A= -github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/lestrrat-go/backoff/v2 v2.0.8/go.mod h1:rHP/q/r9aT27n24JQLa7JhSQZCKBBOiM/uP402WwN8Y= -github.com/lestrrat-go/blackmagic v1.0.0/go.mod h1:TNgH//0vYSs8VXDCfkZLgIrVTTXQELZffUV0tz3MtdQ= -github.com/lestrrat-go/codegen v1.0.2/go.mod h1:JhJw6OQAuPEfVKUCLItpaVLumDGWQznd1VaXrBk9TdM= -github.com/lestrrat-go/httpcc v1.0.0/go.mod h1:tGS/u00Vh5N6FHNkExqGGNId8e0Big+++0Gf8MBnAvE= -github.com/lestrrat-go/iter v1.0.1/go.mod h1:zIdgO1mRKhn8l9vrZJZz9TUMMFbQbLeTsbqPDrJ/OJc= -github.com/lestrrat-go/jwx v1.2.7/go.mod h1:bw24IXWbavc0R2RsOtpXL7RtMyP589yZ1+L7kd09ZGA= -github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201217014255-9d1352758620/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210913180222-943fd674d43e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200918232735-d647fc253266/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210114065538-d78b04bdf963/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/apimachinery v0.27.2 h1:vBjGaKKieaIreI+oQwELalVG4d8f3YAMNpWLzDXkxeg= -k8s.io/apimachinery v0.27.2/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= diff --git a/dev/scripts/exoscale-plans/main.go b/dev/scripts/exoscale-plans/main.go deleted file mode 100644 index bf3426c5f..000000000 --- a/dev/scripts/exoscale-plans/main.go +++ /dev/null @@ -1,94 +0,0 @@ -package main - -import ( - "context" - "encoding/json" - "fmt" - "os" - - egoscalev2 "github.com/exoscale/egoscale/v2" - "k8s.io/apimachinery/pkg/api/resource" -) - -var ( - defaultZone = "ch-gva-2" - deafultLocation = "../../../component/exoscale-plans/" -) - -type Plan struct { - Note string `json:"note,omitempty"` - Size Size `json:"size,omitempty"` -} - -type Size struct { - CPU string `json:"cpu,omitempty"` - Disk string `json:"disk,omitempty"` - Memory string `json:"memory,omitempty"` -} - -func main() { - - apiKey := os.Getenv("EXOSCALE_API_KEY") - if apiKey == "" { - println("Please provide EXOSCALE_API_KEY env variable") - os.Exit(1) - } - - apiSecret := os.Getenv("EXOSCALE_API_SECRET") - if apiSecret == "" { - println("Please provide EXOSCALE_API_KEY env variable") - os.Exit(1) - } - - ec, err := egoscalev2.NewClient(apiKey, apiSecret) - if err != nil { - panic(err) - } - - saveServicesJSON(getPlans(ec)) - -} - -func getPlans(ec *egoscalev2.Client) []*egoscalev2.DatabaseServiceType { - - serviceList, err := ec.ListDatabaseServiceTypes(context.TODO(), defaultZone) - if err != nil { - panic(err) - } - - return serviceList -} - -func saveServicesJSON(serviceList []*egoscalev2.DatabaseServiceType) { - - for _, service := range serviceList { - - fmt.Println("Processing", *service.Name) - - plans := map[string]Plan{} - - for _, plan := range service.Plans { - plans[*plan.Name] = Plan{ - Note: *service.Name + " " + *plan.Name, - Size: Size{ - Disk: resource.NewQuantity(*plan.DiskSpace, resource.BinarySI).String(), - CPU: resource.NewQuantity(*plan.NodeCPUs, resource.DecimalSI).String(), - Memory: resource.NewQuantity(*plan.NodeMemory, resource.BinarySI).String(), - }, - } - } - - marshalledPlan, err := json.Marshal(plans) - if err != nil { - panic(err) - } - - // eclint wants a newline at the end of the file. - marshalledPlan = append(marshalledPlan, []byte("\n")...) - err = os.WriteFile(deafultLocation+*service.Name+".json", marshalledPlan, 0644) - if err != nil { - panic(err) - } - } - -} diff --git a/tests/golden/cloudscale/appcat/appcat/21_composition_objectstorage_cloudscale.yaml b/tests/golden/cloudscale/appcat/appcat/21_composition_objectstorage_cloudscale.yaml index becc3e3c6..86ea9d1bd 100644 --- a/tests/golden/cloudscale/appcat/appcat/21_composition_objectstorage_cloudscale.yaml +++ b/tests/golden/cloudscale/appcat/appcat/21_composition_objectstorage_cloudscale.yaml @@ -8,7 +8,7 @@ metadata: metadata.appcat.vshn.io/displayname: cloudscale.ch Object Storage metadata.appcat.vshn.io/end-user-docs-url: https://vs.hn/objstor metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/objectstorage.html - metadata.appcat.vshn.io/zone: 'cloudscale.ch zones: lpgandrma' + metadata.appcat.vshn.io/zone: null labels: metadata.appcat.vshn.io/offered: 'true' metadata.appcat.vshn.io/serviceID: cloudscale-objectbucket diff --git a/tests/golden/exoscale/appcat/appcat/21_composition_objectstorage_exoscale.yaml b/tests/golden/exoscale/appcat/appcat/21_composition_objectstorage_exoscale.yaml index 07463663e..4adf03869 100644 --- a/tests/golden/exoscale/appcat/appcat/21_composition_objectstorage_exoscale.yaml +++ b/tests/golden/exoscale/appcat/appcat/21_composition_objectstorage_exoscale.yaml @@ -8,8 +8,8 @@ metadata: metadata.appcat.vshn.io/displayname: Exoscale Object Storage metadata.appcat.vshn.io/end-user-docs-url: https://vs.hn/objstor metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/objectstorage.html - metadata.appcat.vshn.io/zone: 'Exoscale zones: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, - ch-dk-2, bg-sof-1' + metadata.appcat.vshn.io/zone: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, ch-dk-2, + bg-sof-1 labels: metadata.appcat.vshn.io/offered: 'true' metadata.appcat.vshn.io/serviceID: exoscale-objectbucket diff --git a/tests/golden/openshift/appcat/appcat/21_composition_objectstorage_exoscale.yaml b/tests/golden/openshift/appcat/appcat/21_composition_objectstorage_exoscale.yaml index 07463663e..4adf03869 100644 --- a/tests/golden/openshift/appcat/appcat/21_composition_objectstorage_exoscale.yaml +++ b/tests/golden/openshift/appcat/appcat/21_composition_objectstorage_exoscale.yaml @@ -8,8 +8,8 @@ metadata: metadata.appcat.vshn.io/displayname: Exoscale Object Storage metadata.appcat.vshn.io/end-user-docs-url: https://vs.hn/objstor metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/objectstorage.html - metadata.appcat.vshn.io/zone: 'Exoscale zones: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, - ch-dk-2, bg-sof-1' + metadata.appcat.vshn.io/zone: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, ch-dk-2, + bg-sof-1 labels: metadata.appcat.vshn.io/offered: 'true' metadata.appcat.vshn.io/serviceID: exoscale-objectbucket diff --git a/tests/golden/vshn/appcat/appcat/20_rbac_helm_provider_dev.yaml b/tests/golden/vshn/appcat/appcat/20_rbac_helm_provider_dev.yaml deleted file mode 100644 index 737b37069..000000000 --- a/tests/golden/vshn/appcat/appcat/20_rbac_helm_provider_dev.yaml +++ /dev/null @@ -1,64 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - annotations: {} - labels: - name: crossplane-provider-provider-helm-system-dev - name: crossplane:provider:provider-helm:system:dev -rules: - - apiGroups: - - '' - resources: - - persistentvolumeclaims - - deployments - verbs: - - get - - list - - watch - - create - - watch - - patch - - update - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - watch - - create - - watch - - patch - - update - - delete - - apiGroups: - - batch - resources: - - jobs - verbs: - - get - - list - - watch - - create - - watch - - patch - - update - - delete ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: {} - labels: - name: crossplane-provider-provider-helm-system-dev - name: crossplane:provider:provider-helm:system:dev -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: crossplane:provider:provider-helm:system:dev -subjects: - - kind: ServiceAccount - name: provider-helm - namespace: syn-crossplane diff --git a/tests/golden/vshn/appcat/appcat/20_xrd_objectstorage.yaml b/tests/golden/vshn/appcat/appcat/20_xrd_objectstorage.yaml index 88f11f808..6c4fbd929 100644 --- a/tests/golden/vshn/appcat/appcat/20_xrd_objectstorage.yaml +++ b/tests/golden/vshn/appcat/appcat/20_xrd_objectstorage.yaml @@ -19,7 +19,7 @@ spec: - ENDPOINT_URL - BUCKET_NAME defaultCompositionRef: - name: dev.objectbuckets.appcat.vshn.io + name: minio.objectbuckets.appcat.vshn.io group: appcat.vshn.io names: kind: XObjectBucket diff --git a/tests/golden/vshn/appcat/appcat/21_composition_objectstorage_minio.yaml b/tests/golden/vshn/appcat/appcat/21_composition_objectstorage_minio.yaml new file mode 100644 index 000000000..2a220bcd6 --- /dev/null +++ b/tests/golden/vshn/appcat/appcat/21_composition_objectstorage_minio.yaml @@ -0,0 +1,39 @@ +apiVersion: apiextensions.crossplane.io/v1 +kind: Composition +metadata: + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + argocd.argoproj.io/sync-wave: '10' + metadata.appcat.vshn.io/description: S3 compatible object storage hosted by Minio + metadata.appcat.vshn.io/displayname: Minio Object Storage + metadata.appcat.vshn.io/end-user-docs-url: https://vs.hn/objstor + metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/objectstorage.html + metadata.appcat.vshn.io/zone: Currently no zones available + labels: + metadata.appcat.vshn.io/offered: 'true' + metadata.appcat.vshn.io/serviceID: minio-objectbucket + name: minio.objectbuckets.appcat.vshn.io + name: minio.objectbuckets.appcat.vshn.io +spec: + compositeTypeRef: + apiVersion: appcat.vshn.io/v1 + kind: XObjectBucket + functions: + - config: + apiVersion: v1 + data: + providerConfig: minio + kind: ConfigMap + metadata: + labels: + name: xfn-config + name: xfn-config + container: + image: miniobucket + imagePullPolicy: IfNotPresent + runner: + endpoint: unix-abstract:crossplane/fn/default.sock + timeout: 20s + name: minio-func + type: Container + writeConnectionSecretsToNamespace: syn-crossplane diff --git a/tests/golden/vshn/appcat/appcat/21_composition_objectstorage_minio_dev.yaml b/tests/golden/vshn/appcat/appcat/21_composition_objectstorage_minio_dev.yaml deleted file mode 100644 index 9f0d49773..000000000 --- a/tests/golden/vshn/appcat/appcat/21_composition_objectstorage_minio_dev.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: apiextensions.crossplane.io/v1 -kind: Composition -metadata: - annotations: - argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true - argocd.argoproj.io/sync-wave: '10' - labels: - name: dev.objectbuckets.appcat.vshn.io - name: dev.objectbuckets.appcat.vshn.io -spec: - compositeTypeRef: - apiVersion: appcat.vshn.io/v1 - kind: XObjectBucket - functions: - - container: - image: miniodev - runner: - endpoint: unix-abstract:crossplane/fn/default.sock - name: miniodev-func - type: Container - writeConnectionSecretsToNamespace: syn-crossplane diff --git a/tests/minio.yml b/tests/minio.yml index facde867c..fd613a621 100644 --- a/tests/minio.yml +++ b/tests/minio.yml @@ -4,11 +4,6 @@ parameters: - type: https source: https://raw.githubusercontent.com/projectsyn/component-crossplane/v2.3.0/lib/crossplane.libsonnet output_path: vendor/lib/crossplane.libsonnet - compile: - - input_paths: - - ${_base_directory}/dev/component/objectstorage.jsonnet - input_type: jsonnet - output_path: appcat/ facts: cloud: cloudscale diff --git a/tests/vshn.yml b/tests/vshn.yml index 03b8a9e5a..3d64d77b7 100644 --- a/tests/vshn.yml +++ b/tests/vshn.yml @@ -4,11 +4,6 @@ parameters: - type: https source: https://raw.githubusercontent.com/projectsyn/component-crossplane/v2.3.0/lib/crossplane.libsonnet output_path: vendor/lib/crossplane.libsonnet - compile: - - input_paths: - - ${_base_directory}/dev/component/objectstorage.jsonnet - input_type: jsonnet - output_path: appcat/ facts: cloud: cloudscale @@ -111,9 +106,12 @@ parameters: objectstorage: enabled: true - defaultComposition: dev + defaultComposition: minio compositions: exoscale: enabled: false cloudscale: enabled: false + minio: + enabled: true + # grpcEndpoint: host.docker.internal:9547 From d51448951f32388aee2a18e3610162a6f46f6ed0 Mon Sep 17 00:00:00 2001 From: Simon Beck Date: Mon, 18 Sep 2023 16:10:18 +0200 Subject: [PATCH 2/2] Some glue to make minio buckets working --- Makefile.vars.mk | 2 +- class/defaults.yml | 7 +- component/appcat_sla_reporter.jsonnet | 7 +- component/common.libsonnet | 26 ++- component/objectstorage.jsonnet | 24 ++- component/provider.jsonnet | 15 +- component/vshn_minio.jsonnet | 20 +- .../ROOT/pages/explanations/minio.adoc | 31 +++ .../ROOT/pages/references/provider-minio.adoc | 44 ++++ .../ROOT/pages/references/services-vshn.adoc | 31 +++ docs/modules/ROOT/partials/nav.adoc | 2 + .../appcat/appcat/10_provider_kubernetes.yaml | 12 ++ ..._composition_objectstorage_cloudscale.yaml | 2 +- .../controllers/appcat/30_deployment.yaml | 2 +- ...appcat-sliexporter-controller-manager.yaml | 2 +- ...ppcat-sliexporter-appcat-sli-exporter.yaml | 1 - .../appcat/appcat/10_provider_kubernetes.yaml | 12 ++ .../appcat/21_composition_exoscale_kafka.yaml | 4 +- .../appcat/21_composition_exoscale_mysql.yaml | 4 +- .../21_composition_exoscale_opensearch.yaml | 4 +- .../21_composition_exoscale_postgres.yaml | 4 +- .../appcat/21_composition_exoscale_redis.yaml | 4 +- .../appcat/appcat/10_provider_kubernetes.yaml | 12 ++ .../appcat/appcat/20_xrd_vshn_minio.yaml | 24 ++- .../appcat/21_composition_vshn_minio.yaml | 5 +- .../controllers/appcat/30_deployment.yaml | 2 +- .../appcat/sla_reporter/01_cronjob.yaml | 2 +- ...appcat-sliexporter-controller-manager.yaml | 2 +- ...ppcat-sliexporter-appcat-sli-exporter.yaml | 1 - .../appcat/appcat/10_provider_kubernetes.yaml | 12 ++ .../appcat/21_composition_exoscale_kafka.yaml | 4 +- .../appcat/21_composition_exoscale_mysql.yaml | 4 +- .../21_composition_exoscale_opensearch.yaml | 4 +- .../21_composition_exoscale_postgres.yaml | 4 +- .../appcat/21_composition_exoscale_redis.yaml | 4 +- ...appcat-sliexporter-controller-manager.yaml | 2 +- ...ppcat-sliexporter-appcat-sli-exporter.yaml | 1 - .../appcat/appcat/10_provider_kubernetes.yaml | 12 ++ .../appcat/appcat/20_rbac_vshn_minio.yaml | 36 ++++ .../vshn/appcat/appcat/20_xrd_vshn_minio.yaml | 203 ++++++++++++++++++ .../21_composition_objectstorage_minio.yaml | 8 +- .../appcat/21_composition_vshn_minio.yaml | 46 ++++ .../appcat/21_composition_vshn_postgres.yaml | 2 +- .../21_composition_vshn_postgresrestore.yaml | 2 +- .../appcat/21_composition_vshn_redis.yaml | 2 +- .../controllers/appcat/30_deployment.yaml | 2 +- .../appcat/sla_reporter/01_cronjob.yaml | 2 +- ...appcat-sliexporter-controller-manager.yaml | 2 +- ...ppcat-sliexporter-appcat-sli-exporter.yaml | 1 - tests/vshn.yml | 40 ++-- 50 files changed, 606 insertions(+), 95 deletions(-) create mode 100644 docs/modules/ROOT/pages/explanations/minio.adoc create mode 100644 docs/modules/ROOT/pages/references/provider-minio.adoc create mode 100644 tests/golden/vshn/appcat/appcat/20_rbac_vshn_minio.yaml create mode 100644 tests/golden/vshn/appcat/appcat/20_xrd_vshn_minio.yaml create mode 100644 tests/golden/vshn/appcat/appcat/21_composition_vshn_minio.yaml diff --git a/Makefile.vars.mk b/Makefile.vars.mk index 7f7a9a44d..1cea253c1 100644 --- a/Makefile.vars.mk +++ b/Makefile.vars.mk @@ -32,7 +32,7 @@ JSONNET_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) --entrypoint=json VALE_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) --volume "$${PWD}"/docs/modules:/pages ghcr.io/vshn/vale:2.15.5 VALE_ARGS ?= --minAlertLevel=error --config=/pages/ROOT/pages/.vale.ini /pages -ANTORA_PREVIEW_CMD ?= $(DOCKER_CMD) run --rm --publish 35729:35729 --publish 2020:2020 $(antora_git_volume) --volume "${PWD}/docs":/preview/antora/docs ghcr.io/vshn/antora-preview:3.1.2.3 --style=syn --antora=docs +ANTORA_PREVIEW_CMD ?= $(DOCKER_CMD) run --rm --publish 35729:35729 --publish 2020:2020 $(antora_git_volume) --volume "${PWD}/docs":/preview/antora/docs ghcr.io/vshn/antora-preview:3.1.4 --style=syn --antora=docs COMMODORE_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) docker.io/projectsyn/commodore:latest COMPILE_CMD ?= $(COMMODORE_CMD) component compile . $(commodore_args) diff --git a/class/defaults.yml b/class/defaults.yml index e1d3c9d44..a84ec3bd9 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -39,7 +39,7 @@ parameters: appcat: registry: ghcr.io repository: vshn/appcat - tag: v4.25.0 + tag: v4.27.0 apiserver: registry: ghcr.io repository: vshn/appcat-apiserver @@ -222,7 +222,8 @@ parameters: package: ${appcat:images:provider-minio:registry}/${appcat:images:provider-minio:repository}:${appcat:images:provider-minio:tag} controllerConfig: serviceAccountName: provider-minio - providerConfig: {} + providerConfigRefs: [] + additionalProviderConfigs: [] services: # Used for deploying jobs @@ -325,7 +326,7 @@ parameters: cpu: "1" memory: "1Gi" disk: 50Gi - + instances: [] # Config for exoscale composites exoscale: diff --git a/component/appcat_sla_reporter.jsonnet b/component/appcat_sla_reporter.jsonnet index d478cc66e..6d369de92 100644 --- a/component/appcat_sla_reporter.jsonnet +++ b/component/appcat_sla_reporter.jsonnet @@ -59,12 +59,7 @@ local ObjectStorage = kube._Object('appcat.vshn.io/v1', 'ObjectBucket', 'appcat- metadata: { namespace: slos_params.namespace, name: 'appcat-sla-reports', - annotations: { - // Our current ArgoCD configuration can't handle the claim -> composite - // relationship - 'argocd.argoproj.io/compare-options': 'IgnoreExtraneous', - 'argocd.argoproj.io/sync-options': 'Prune=false', - }, + annotations: common.ArgoCDAnnotations(), }, spec: { parameters: { diff --git a/component/common.libsonnet b/component/common.libsonnet index 852f88ab7..718d8a886 100644 --- a/component/common.libsonnet +++ b/component/common.libsonnet @@ -15,7 +15,7 @@ local exoscaleZones = [ 'de-fra-1', 'de-muc-1', 'at-vie-1', 'ch-gva-2', 'ch-dk-2 local cloudscaleZones = [ 'lpg', 'rma' ]; local strExoscaleZones = std.join(', ', exoscaleZones); -local strCloudscaleZones = std.join('and', cloudscaleZones); +local strCloudscaleZones = std.join(', ', cloudscaleZones); local syncOptions = { metadata+: { @@ -32,7 +32,7 @@ local vshnMetaDBaaSExoscale(dbname) = { 'metadata.appcat.vshn.io/displayname': 'Exoscale ' + dbname, 'metadata.appcat.vshn.io/description': dbname + ' DBaaS instances by Exoscale', 'metadata.appcat.vshn.io/end-user-docs-url': 'https://vs.hn/exo-' + std.asciiLower(dbname), - 'metadata.appcat.vshn.io/zone': 'Exoscale zones: ' + strExoscaleZones, + 'metadata.appcat.vshn.io/zone': strExoscaleZones, 'metadata.appcat.vshn.io/product-description': 'https://products.docs.vshn.ch/products/appcat/exoscale_dbaas.html', }, labels+: { @@ -69,8 +69,8 @@ local vshnMetaVshnDBaas(dbname, flavor, offered, plans) = vshnMetaVshn(dbname, f local providerZones(provider) = if provider == 'Exoscale' then strExoscaleZones - else if provider == 'Cloudscale' then strCloudscaleZones - else if provider == 'Minio' then 'us-east-1'; + else if provider == 'cloudscale.ch' then strCloudscaleZones + else 'default'; local vshnMetaObjectStorage(provider) = { metadata+: { @@ -159,6 +159,20 @@ local promRuleSLA(value, service) = kube._Object('monitoring.coreos.com/v1', 'Pr }, }; +local removeField(obj, name) = { + // We don't want the name field in the actual providerConfig + [k]: obj[k] + for k in std.objectFieldsAll(obj) + if k != name +}; + +local argoCDAnnotations() = { + // Our current ArgoCD configuration can't handle the claim -> composite + // relationship + 'argocd.argoproj.io/compare-options': 'IgnoreExtraneous', + 'argocd.argoproj.io/sync-options': 'Prune=false', +}; + { SyncOptions: syncOptions, VshnMetaDBaaSExoscale(dbname): @@ -185,4 +199,8 @@ local promRuleSLA(value, service) = kube._Object('monitoring.coreos.com/v1', 'Pr getApiserverImageString(), PromRuleSLA(value, service): promRuleSLA(value, service), + RemoveField(obj, name): + removeField(obj, name), + ArgoCDAnnotations(): + argoCDAnnotations(), } diff --git a/component/objectstorage.jsonnet b/component/objectstorage.jsonnet index ad3e6ba94..259aeb0ff 100644 --- a/component/objectstorage.jsonnet +++ b/component/objectstorage.jsonnet @@ -241,13 +241,12 @@ local compositionExoscale = }, }; -local compositionMinio = - +local minioComp(name) = local compParams = objStoParams.compositions.minio; - kube._Object('apiextensions.crossplane.io/v1', 'Composition', 'minio.objectbuckets.appcat.vshn.io') + + kube._Object('apiextensions.crossplane.io/v1', 'Composition', name + '.objectbuckets.appcat.vshn.io') + common.SyncOptions + - common.VshnMetaObjectStorage('Minio') + + common.VshnMetaObjectStorage('Minio-' + name) + { spec: { compositeTypeRef: comp.CompositeRef(xrd), @@ -265,7 +264,7 @@ local compositionMinio = name: 'xfn-config', }, data: { - providerConfig: objStoParams.compositions.minio.providerConfig, + providerConfig: name, }, }, container: { @@ -281,6 +280,21 @@ local compositionMinio = }, }; +local compositionMinio = + local provider = params.providers.minio; + [ + minioComp(config.name) + for config in provider.additionalProviderConfigs + ] + [ + minioComp(configRef) + for configRef in provider.providerConfigRefs + ] + [ + // Automagically add the defined instances as well + minioComp(instance.name) + for instance in params.services.vshn.minio.instances + ]; + + if objStoParams.enabled then { '20_xrd_objectstorage': xrd, '20_rbac_objectstorage': xrds.CompositeClusterRoles(xrd), diff --git a/component/provider.jsonnet b/component/provider.jsonnet index de6080df3..2d6b2ef25 100644 --- a/component/provider.jsonnet +++ b/component/provider.jsonnet @@ -1,3 +1,4 @@ +local common = import 'common.libsonnet'; local com = import 'lib/commodore.libjsonnet'; local kap = import 'lib/kapitan.libjsonnet'; local kube = import 'lib/kube.libjsonnet'; @@ -209,6 +210,11 @@ local controllerConfigRef(config) = resources: [ 'snapshots' ], verbs: [ 'get' ], }, + { + apiGroups: [ 'minio.crossplane.io' ], + resources: [ 'providerconfigs' ], + verbs: [ 'get', 'list', 'watch', 'update', 'patch', 'create', 'delete' ], + }, ], }; local rolebinding = kube.ClusterRoleBinding('crossplane:provider:provider-kubernetes:system:custom') { @@ -348,15 +354,18 @@ local controllerConfigRef(config) = controllerConf + [ - crossplane.ProviderConfig('minio') { + crossplane.ProviderConfig(config.name) { apiVersion: 'minio.crossplane.io/v1', spec+: addCredentials( - provider.providerConfig, + common.RemoveField(config, 'name'), { source: 'InjectedIdentity', } ), - }, + } + for config in provider.additionalProviderConfigs + ] + + [ sa, role, rolebinding, diff --git a/component/vshn_minio.jsonnet b/component/vshn_minio.jsonnet index 2720ddf43..bfcbb613b 100644 --- a/component/vshn_minio.jsonnet +++ b/component/vshn_minio.jsonnet @@ -17,8 +17,8 @@ local serviceNamespaceLabelKey = 'appcat.vshn.io/claim-namespace'; local connectionSecretKeys = [ 'MINIO_URL', - 'MINIO_USERNAME', - 'MINIO_PASSWORD', + 'AWS_SECRET_ACCESS_KEY', + 'AWS_ACCESS_KEY_ID', ]; local minioPlans = common.FilterDisabledParams(minioParams.plans); @@ -33,7 +33,7 @@ local xrd = xrds.XRDFromCRD( local composition = kube._Object('apiextensions.crossplane.io/v1', 'Composition', 'vshnminio.vshn.appcat.vshn.io') + common.SyncOptions + - common.VshnMetaVshn('Minio', 'distributed', 'true', minioPlans) + + common.VshnMetaVshn('Minio', 'distributed', 'false', minioPlans) + { spec: { compositeTypeRef: comp.CompositeRef(xrd), @@ -56,6 +56,7 @@ local composition = minioChartVersion: params.charts.minio.version, plans: std.toString(minioPlans), defaultPlan: minioParams.defaultPlan, + providerEnabled: std.toString(params.providers.minio.enabled), }, }, container: { @@ -71,8 +72,21 @@ local composition = }, }; + +local instances = [ + kube._Object('vshn.appcat.vshn.io/v1', 'VSHNMinio', instance.name) + { + metadata+: { + namespace: instance.namespace, + annotations+: common.ArgoCDAnnotations(), + }, + spec+: instance.spec, + } + for instance in minioParams.instances +]; + if params.services.vshn.enabled && minioParams.enabled then { '20_xrd_vshn_minio': xrd, '20_rbac_vshn_minio': xrds.CompositeClusterRoles(xrd), '21_composition_vshn_minio': composition, + [if std.length(instances) != 0 then '22_minio_instances']: instances, } else {} diff --git a/docs/modules/ROOT/pages/explanations/minio.adoc b/docs/modules/ROOT/pages/explanations/minio.adoc new file mode 100644 index 000000000..c60b1ee60 --- /dev/null +++ b/docs/modules/ROOT/pages/explanations/minio.adoc @@ -0,0 +1,31 @@ += Minio + +Installing Minio and generating the providerconfigs can be managed via the component. + +This setup has multiple parts to it: + +* provider +* composition functions +* deployments via composition function + +== Provider + +The provider section `appcat.provider.minio` can take multiple variations of provider configs: + +* By referencing an existing provider config by name +* By creating additional configs through the `additionalProviderConfigs` field +* Automatically injected configs from the `appcat.services.vshn.minio.instance`` field + +== Composition Function + +The composition here is very bare bones, the whole composition is via functions. +The compositions are generated depending on how many provider configs there are. +Each composition will handle exactly one provider config. +This is the mechanism we can use so that a user can choose between different minio instances. +We already use this mechanism to choose between different clouds for the `ObjectBuckets`. +The default composition can easily be set. + +== Deployment + +Via `appcat.services.vshn.minio.instance` it's possible to deploy arbitrary amounts of minio instances to a cluster. +As mentioned above, the provider configs will then be injected automatically and new compositions are generated accordingly. diff --git a/docs/modules/ROOT/pages/references/provider-minio.adoc b/docs/modules/ROOT/pages/references/provider-minio.adoc new file mode 100644 index 000000000..cc01c3976 --- /dev/null +++ b/docs/modules/ROOT/pages/references/provider-minio.adoc @@ -0,0 +1,44 @@ += Provider Minio + +The parent key for all of the following parameters is `appcat.provider.minio`. + +== `enabled` +[horizontal] +type:: bool +default:: `false` + +If the provider should be installed. + +== `providerConfigRefs` +[horizontal] +type:: array + +A list of names for already existing `ProviderConfigs`. + +== `additionalProviderConfigs` +[horizontal] +type:: array + +A list of additional `ProviderConfigs` that should be deployed via the component. +Contains the `spec` of the `ProviderConfig` object. + +.Examples +[source,yaml] +---- +additionalProviderConfigs: + - name: minio + minioURL: http://minio-server.minio.svc:9000/ + credentials: + apiSecretRef: + name: minio-secret + namespace: syn-crossplane +---- + +== `controllerConfig` +[horizontal] +type:: dict + +The `spec` of the `ControllerConfig`. +If the component is deployed on OpenShift, it will automatically add the necessary security context changes to the config. + +Consult the https://doc.crds.dev/github.com/crossplane/crossplane/pkg.crossplane.io/ControllerConfig/v1alpha1[upstream documentation] for configuration options. diff --git a/docs/modules/ROOT/pages/references/services-vshn.adoc b/docs/modules/ROOT/pages/references/services-vshn.adoc index 8c304953d..71a33bd41 100644 --- a/docs/modules/ROOT/pages/references/services-vshn.adoc +++ b/docs/modules/ROOT/pages/references/services-vshn.adoc @@ -220,3 +220,34 @@ type:: string default:: `standard-1` The default plan used for Redis by VSHN, if the service user doesn't specify a plan. + +== minio +[horizontal] +type:: dict + +Configuration option for VSHN Minio. +You have to option to enable or disable it through the `enabled` parameter and can set the `secretNamespace` and `providerSecretNamespace`. + +It's disabled by default and use the top level defined namespaces for `secretNamespace` and `providerSecretNamespace`. + +=== instances +[horizontal] +type:: array + +Array of minio instances to deploy to a given cluster. + +.Examples +[source,yaml] +---- +instances: + - name: my-minio + namespace: default + spec: + parameters: + service: + mode: standalone + size: + disk: 1Gi + writeConnectionSecretToRef: + name: my-minio-creds +---- diff --git a/docs/modules/ROOT/partials/nav.adoc b/docs/modules/ROOT/partials/nav.adoc index e05ed61c4..bfd915bcf 100644 --- a/docs/modules/ROOT/partials/nav.adoc +++ b/docs/modules/ROOT/partials/nav.adoc @@ -6,6 +6,7 @@ * xref:explanations/add-to-openshift-catalog.adoc[] * xref:explanations/exoscale-plans.adoc[] * xref:explanations/redisrestore.adoc[] +* xref:explanations/minio.adoc[] .Tutorials * xref:tutorials/install-cloudscale.adoc[Install Cloudscale Stack] @@ -21,6 +22,7 @@ ** xref:references/provider-cloudscale.adoc[Provider Cloudscale] ** xref:references/provider-exoscale.adoc[Provider Exoscale] ** xref:references/provider-kubernetes.adoc[Provider Kubernetes] +** xref:references/provider-minio.adoc[Provider Minio] * Service Parameters ** xref:references/services-exoscale.adoc[Exoscale Services] diff --git a/tests/golden/cloudscale/appcat/appcat/10_provider_kubernetes.yaml b/tests/golden/cloudscale/appcat/appcat/10_provider_kubernetes.yaml index 4472f3399..5d62bf97a 100644 --- a/tests/golden/cloudscale/appcat/appcat/10_provider_kubernetes.yaml +++ b/tests/golden/cloudscale/appcat/appcat/10_provider_kubernetes.yaml @@ -259,6 +259,18 @@ rules: - snapshots verbs: - get + - apiGroups: + - minio.crossplane.io + resources: + - providerconfigs + verbs: + - get + - list + - watch + - update + - patch + - create + - delete --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding diff --git a/tests/golden/cloudscale/appcat/appcat/21_composition_objectstorage_cloudscale.yaml b/tests/golden/cloudscale/appcat/appcat/21_composition_objectstorage_cloudscale.yaml index 86ea9d1bd..98c4367dd 100644 --- a/tests/golden/cloudscale/appcat/appcat/21_composition_objectstorage_cloudscale.yaml +++ b/tests/golden/cloudscale/appcat/appcat/21_composition_objectstorage_cloudscale.yaml @@ -8,7 +8,7 @@ metadata: metadata.appcat.vshn.io/displayname: cloudscale.ch Object Storage metadata.appcat.vshn.io/end-user-docs-url: https://vs.hn/objstor metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/objectstorage.html - metadata.appcat.vshn.io/zone: null + metadata.appcat.vshn.io/zone: lpg, rma labels: metadata.appcat.vshn.io/offered: 'true' metadata.appcat.vshn.io/serviceID: cloudscale-objectbucket diff --git a/tests/golden/controllers/appcat/appcat/controllers/appcat/30_deployment.yaml b/tests/golden/controllers/appcat/appcat/controllers/appcat/30_deployment.yaml index 68966857c..a15a197c2 100644 --- a/tests/golden/controllers/appcat/appcat/controllers/appcat/30_deployment.yaml +++ b/tests/golden/controllers/appcat/appcat/controllers/appcat/30_deployment.yaml @@ -23,7 +23,7 @@ spec: env: - name: PLANS_NAMESPACE value: syn-appcat - image: ghcr.io/vshn/appcat:v4.25.0 + image: ghcr.io/vshn/appcat:v4.27.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/defaults/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/tests/golden/defaults/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 399bcb2bb..1a0bba2ee 100644 --- a/tests/golden/defaults/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/tests/golden/defaults/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -28,7 +28,7 @@ spec: value: "false" - name: APPCAT_SLI_VSHNREDIS value: "false" - image: ghcr.io/vshn/appcat:v4.25.0 + image: ghcr.io/vshn/appcat:v4.27.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/defaults/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml b/tests/golden/defaults/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml index 129ee1fb1..b31fce4ea 100644 --- a/tests/golden/defaults/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml +++ b/tests/golden/defaults/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml @@ -1,7 +1,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: appcat-sliexporter-appcat-sli-exporter rules: - apiGroups: diff --git a/tests/golden/exoscale/appcat/appcat/10_provider_kubernetes.yaml b/tests/golden/exoscale/appcat/appcat/10_provider_kubernetes.yaml index 4472f3399..5d62bf97a 100644 --- a/tests/golden/exoscale/appcat/appcat/10_provider_kubernetes.yaml +++ b/tests/golden/exoscale/appcat/appcat/10_provider_kubernetes.yaml @@ -259,6 +259,18 @@ rules: - snapshots verbs: - get + - apiGroups: + - minio.crossplane.io + resources: + - providerconfigs + verbs: + - get + - list + - watch + - update + - patch + - create + - delete --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding diff --git a/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_kafka.yaml b/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_kafka.yaml index 2bdd7275e..d6e624576 100644 --- a/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_kafka.yaml +++ b/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_kafka.yaml @@ -10,8 +10,8 @@ metadata: metadata.appcat.vshn.io/plans: | {"business-16":{"note":"kafka business-16","size":{"cpu":"4","disk":"2010Gi","memory":"16Gi"}},"business-32":{"note":"kafka business-32","size":{"cpu":"8","disk":"4020Gi","memory":"32Gi"}},"business-4":{"note":"kafka business-4","size":{"cpu":"2","disk":"480Gi","memory":"4Gi"}},"business-8":{"note":"kafka business-8","size":{"cpu":"4","disk":"960Gi","memory":"8Gi"}},"premium-15x-16":{"note":"kafka premium-15x-16","size":{"cpu":"4","disk":"10005Gi","memory":"16Gi"}},"premium-15x-32":{"note":"kafka premium-15x-32","size":{"cpu":"8","disk":"20010Gi","memory":"32Gi"}},"premium-15x-8":{"note":"kafka premium-15x-8","size":{"cpu":"4","disk":"5010Gi","memory":"8Gi"}},"premium-30x-16":{"note":"kafka premium-30x-16","size":{"cpu":"4","disk":"20010Gi","memory":"16Gi"}},"premium-30x-32":{"note":"kafka premium-30x-32","size":{"cpu":"8","disk":"40020Gi","memory":"32Gi"}},"premium-30x-8":{"note":"kafka premium-30x-8","size":{"cpu":"4","disk":"10020Gi","memory":"8Gi"}},"premium-6x-16":{"note":"kafka premium-6x-16","size":{"cpu":"4","disk":"4020Gi","memory":"16Gi"}},"premium-6x-32":{"note":"kafka premium-6x-32","size":{"cpu":"8","disk":"8010Gi","memory":"32Gi"}},"premium-6x-8":{"note":"kafka premium-6x-8","size":{"cpu":"4","disk":"2010Gi","memory":"8Gi"}},"premium-9x-16":{"note":"kafka premium-9x-16","size":{"cpu":"4","disk":"6003Gi","memory":"16Gi"}},"premium-9x-32":{"note":"kafka premium-9x-32","size":{"cpu":"8","disk":"12006Gi","memory":"32Gi"}},"premium-9x-8":{"note":"kafka premium-9x-8","size":{"cpu":"4","disk":"3006Gi","memory":"8Gi"}},"startup-2":{"note":"kafka startup-2","size":{"cpu":"2","disk":"90Gi","memory":"2Gi"}}} metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/exoscale_dbaas.html - metadata.appcat.vshn.io/zone: 'Exoscale zones: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, - ch-dk-2, bg-sof-1' + metadata.appcat.vshn.io/zone: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, ch-dk-2, + bg-sof-1 labels: metadata.appcat.vshn.io/offered: 'true' metadata.appcat.vshn.io/serviceID: exoscale-kafka diff --git a/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_mysql.yaml b/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_mysql.yaml index 6f0b35626..46fe788ed 100644 --- a/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_mysql.yaml +++ b/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_mysql.yaml @@ -10,8 +10,8 @@ metadata: metadata.appcat.vshn.io/plans: | {"business-128":{"note":"mysql business-128","size":{"cpu":"16","disk":"1000Gi","memory":"128Gi"}},"business-16":{"note":"mysql business-16","size":{"cpu":"4","disk":"350Gi","memory":"16Gi"}},"business-225":{"note":"mysql business-225","size":{"cpu":"24","disk":"1300Gi","memory":"225Gi"}},"business-32":{"note":"mysql business-32","size":{"cpu":"8","disk":"500Gi","memory":"32Gi"}},"business-4":{"note":"mysql business-4","size":{"cpu":"2","disk":"80Gi","memory":"4Gi"}},"business-64":{"note":"mysql business-64","size":{"cpu":"12","disk":"750Gi","memory":"64Gi"}},"business-8":{"note":"mysql business-8","size":{"cpu":"4","disk":"175Gi","memory":"8Gi"}},"hobbyist-2":{"note":"mysql hobbyist-2","size":{"cpu":"2","disk":"8Gi","memory":"2Gi"}},"premium-128":{"note":"mysql premium-128","size":{"cpu":"16","disk":"1000Gi","memory":"128Gi"}},"premium-16":{"note":"mysql premium-16","size":{"cpu":"4","disk":"350Gi","memory":"16Gi"}},"premium-225":{"note":"mysql premium-225","size":{"cpu":"24","disk":"1300Gi","memory":"225Gi"}},"premium-32":{"note":"mysql premium-32","size":{"cpu":"8","disk":"500Gi","memory":"32Gi"}},"premium-4":{"note":"mysql premium-4","size":{"cpu":"2","disk":"80Gi","memory":"4Gi"}},"premium-64":{"note":"mysql premium-64","size":{"cpu":"12","disk":"750Gi","memory":"64Gi"}},"premium-8":{"note":"mysql premium-8","size":{"cpu":"4","disk":"175Gi","memory":"8Gi"}},"startup-128":{"note":"mysql startup-128","size":{"cpu":"16","disk":"1000Gi","memory":"128Gi"}},"startup-16":{"note":"mysql startup-16","size":{"cpu":"4","disk":"350Gi","memory":"16Gi"}},"startup-225":{"note":"mysql startup-225","size":{"cpu":"24","disk":"1300Gi","memory":"225Gi"}},"startup-32":{"note":"mysql startup-32","size":{"cpu":"8","disk":"500Gi","memory":"32Gi"}},"startup-4":{"note":"mysql startup-4","size":{"cpu":"2","disk":"80Gi","memory":"4Gi"}},"startup-64":{"note":"mysql startup-64","size":{"cpu":"12","disk":"750Gi","memory":"64Gi"}},"startup-8":{"note":"mysql startup-8","size":{"cpu":"4","disk":"175Gi","memory":"8Gi"}}} metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/exoscale_dbaas.html - metadata.appcat.vshn.io/zone: 'Exoscale zones: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, - ch-dk-2, bg-sof-1' + metadata.appcat.vshn.io/zone: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, ch-dk-2, + bg-sof-1 labels: metadata.appcat.vshn.io/offered: 'true' metadata.appcat.vshn.io/serviceID: exoscale-mysql diff --git a/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_opensearch.yaml b/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_opensearch.yaml index a2257b55b..18b336abe 100644 --- a/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_opensearch.yaml +++ b/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_opensearch.yaml @@ -10,8 +10,8 @@ metadata: metadata.appcat.vshn.io/plans: | {"business-16":{"note":"opensearch business-16","size":{"cpu":"4","disk":"1050Gi","memory":"16Gi"}},"business-32":{"note":"opensearch business-32","size":{"cpu":"8","disk":"2100Gi","memory":"32Gi"}},"business-4":{"note":"opensearch business-4","size":{"cpu":"2","disk":"240Gi","memory":"4Gi"}},"business-8":{"note":"opensearch business-8","size":{"cpu":"4","disk":"525Gi","memory":"8Gi"}},"hobbyist-2":{"note":"opensearch hobbyist-2","size":{"cpu":"2","disk":"16Gi","memory":"2Gi"}},"premium-15x-16":{"note":"opensearch premium-15x-16","size":{"cpu":"4","disk":"5250Gi","memory":"16Gi"}},"premium-15x-32":{"note":"opensearch premium-15x-32","size":{"cpu":"8","disk":"10500Gi","memory":"32Gi"}},"premium-30x-16":{"note":"opensearch premium-30x-16","size":{"cpu":"4","disk":"10500Gi","memory":"16Gi"}},"premium-30x-32":{"note":"opensearch premium-30x-32","size":{"cpu":"8","disk":"21000Gi","memory":"32Gi"}},"premium-6x-16":{"note":"opensearch premium-6x-16","size":{"cpu":"4","disk":"2100Gi","memory":"16Gi"}},"premium-6x-32":{"note":"opensearch premium-6x-32","size":{"cpu":"8","disk":"4200Gi","memory":"32Gi"}},"premium-6x-8":{"note":"opensearch premium-6x-8","size":{"cpu":"4","disk":"1050Gi","memory":"8Gi"}},"premium-9x-16":{"note":"opensearch premium-9x-16","size":{"cpu":"4","disk":"3150Gi","memory":"16Gi"}},"premium-9x-32":{"note":"opensearch premium-9x-32","size":{"cpu":"8","disk":"6300Gi","memory":"32Gi"}},"premium-9x-8":{"note":"opensearch premium-9x-8","size":{"cpu":"4","disk":"1575Gi","memory":"8Gi"}},"startup-16":{"note":"opensearch startup-16","size":{"cpu":"4","disk":"350Gi","memory":"16Gi"}},"startup-32":{"note":"opensearch startup-32","size":{"cpu":"8","disk":"700Gi","memory":"32Gi"}},"startup-4":{"note":"opensearch startup-4","size":{"cpu":"2","disk":"80Gi","memory":"4Gi"}},"startup-8":{"note":"opensearch startup-8","size":{"cpu":"4","disk":"175Gi","memory":"8Gi"}}} metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/exoscale_dbaas.html - metadata.appcat.vshn.io/zone: 'Exoscale zones: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, - ch-dk-2, bg-sof-1' + metadata.appcat.vshn.io/zone: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, ch-dk-2, + bg-sof-1 labels: metadata.appcat.vshn.io/offered: 'true' metadata.appcat.vshn.io/serviceID: exoscale-opensearch diff --git a/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_postgres.yaml b/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_postgres.yaml index b2f7ba4a2..2517007bc 100644 --- a/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_postgres.yaml +++ b/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_postgres.yaml @@ -10,8 +10,8 @@ metadata: metadata.appcat.vshn.io/plans: | {"business-128":{"note":"pg business-128","size":{"cpu":"16","disk":"1000Gi","memory":"128Gi"}},"business-16":{"note":"pg business-16","size":{"cpu":"4","disk":"350Gi","memory":"16Gi"}},"business-225":{"note":"pg business-225","size":{"cpu":"24","disk":"1300Gi","memory":"225Gi"}},"business-32":{"note":"pg business-32","size":{"cpu":"8","disk":"500Gi","memory":"32Gi"}},"business-4":{"note":"pg business-4","size":{"cpu":"2","disk":"80Gi","memory":"4Gi"}},"business-64":{"note":"pg business-64","size":{"cpu":"12","disk":"750Gi","memory":"64Gi"}},"business-8":{"note":"pg business-8","size":{"cpu":"4","disk":"175Gi","memory":"8Gi"}},"hobbyist-2":{"note":"pg hobbyist-2","size":{"cpu":"2","disk":"8Gi","memory":"2Gi"}},"premium-128":{"note":"pg premium-128","size":{"cpu":"16","disk":"1000Gi","memory":"128Gi"}},"premium-16":{"note":"pg premium-16","size":{"cpu":"4","disk":"350Gi","memory":"16Gi"}},"premium-225":{"note":"pg premium-225","size":{"cpu":"24","disk":"1300Gi","memory":"225Gi"}},"premium-32":{"note":"pg premium-32","size":{"cpu":"8","disk":"500Gi","memory":"32Gi"}},"premium-4":{"note":"pg premium-4","size":{"cpu":"2","disk":"80Gi","memory":"4Gi"}},"premium-64":{"note":"pg premium-64","size":{"cpu":"12","disk":"750Gi","memory":"64Gi"}},"premium-8":{"note":"pg premium-8","size":{"cpu":"4","disk":"175Gi","memory":"8Gi"}},"startup-128":{"note":"pg startup-128","size":{"cpu":"16","disk":"1000Gi","memory":"128Gi"}},"startup-16":{"note":"pg startup-16","size":{"cpu":"4","disk":"350Gi","memory":"16Gi"}},"startup-225":{"note":"pg startup-225","size":{"cpu":"24","disk":"1300Gi","memory":"225Gi"}},"startup-32":{"note":"pg startup-32","size":{"cpu":"8","disk":"500Gi","memory":"32Gi"}},"startup-4":{"note":"pg startup-4","size":{"cpu":"2","disk":"80Gi","memory":"4Gi"}},"startup-64":{"note":"pg startup-64","size":{"cpu":"12","disk":"750Gi","memory":"64Gi"}},"startup-8":{"note":"pg startup-8","size":{"cpu":"4","disk":"175Gi","memory":"8Gi"}}} metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/exoscale_dbaas.html - metadata.appcat.vshn.io/zone: 'Exoscale zones: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, - ch-dk-2, bg-sof-1' + metadata.appcat.vshn.io/zone: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, ch-dk-2, + bg-sof-1 labels: metadata.appcat.vshn.io/offered: 'true' metadata.appcat.vshn.io/serviceID: exoscale-postgresql diff --git a/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_redis.yaml b/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_redis.yaml index 2e28f2be7..1720b6eb7 100644 --- a/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_redis.yaml +++ b/tests/golden/exoscale/appcat/appcat/21_composition_exoscale_redis.yaml @@ -10,8 +10,8 @@ metadata: metadata.appcat.vshn.io/plans: | {"business-1":{"note":"redis business-1","size":{"cpu":"2","disk":"0","memory":"1Gi"}},"business-128":{"note":"redis business-128","size":{"cpu":"16","disk":"0","memory":"128Gi"}},"business-16":{"note":"redis business-16","size":{"cpu":"4","disk":"0","memory":"16Gi"}},"business-225":{"note":"redis business-225","size":{"cpu":"24","disk":"0","memory":"225Gi"}},"business-32":{"note":"redis business-32","size":{"cpu":"8","disk":"0","memory":"32Gi"}},"business-4":{"note":"redis business-4","size":{"cpu":"2","disk":"0","memory":"4Gi"}},"business-64":{"note":"redis business-64","size":{"cpu":"12","disk":"0","memory":"64Gi"}},"business-8":{"note":"redis business-8","size":{"cpu":"4","disk":"0","memory":"8Gi"}},"hobbyist-2":{"note":"redis hobbyist-2","size":{"cpu":"2","disk":"0","memory":"1Gi"}},"premium-128":{"note":"redis premium-128","size":{"cpu":"16","disk":"0","memory":"128Gi"}},"premium-16":{"note":"redis premium-16","size":{"cpu":"4","disk":"0","memory":"16Gi"}},"premium-225":{"note":"redis premium-225","size":{"cpu":"24","disk":"0","memory":"225Gi"}},"premium-32":{"note":"redis premium-32","size":{"cpu":"8","disk":"0","memory":"32Gi"}},"premium-4":{"note":"redis premium-4","size":{"cpu":"2","disk":"0","memory":"4Gi"}},"premium-64":{"note":"redis premium-64","size":{"cpu":"12","disk":"0","memory":"64Gi"}},"premium-8":{"note":"redis premium-8","size":{"cpu":"4","disk":"0","memory":"8Gi"}},"startup-128":{"note":"redis startup-128","size":{"cpu":"16","disk":"0","memory":"128Gi"}},"startup-16":{"note":"redis startup-16","size":{"cpu":"4","disk":"0","memory":"16Gi"}},"startup-225":{"note":"redis startup-225","size":{"cpu":"24","disk":"0","memory":"225Gi"}},"startup-32":{"note":"redis startup-32","size":{"cpu":"8","disk":"0","memory":"32Gi"}},"startup-4":{"note":"redis startup-4","size":{"cpu":"2","disk":"0","memory":"4Gi"}},"startup-64":{"note":"redis startup-64","size":{"cpu":"12","disk":"0","memory":"64Gi"}},"startup-8":{"note":"redis startup-8","size":{"cpu":"4","disk":"0","memory":"8Gi"}}} metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/exoscale_dbaas.html - metadata.appcat.vshn.io/zone: 'Exoscale zones: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, - ch-dk-2, bg-sof-1' + metadata.appcat.vshn.io/zone: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, ch-dk-2, + bg-sof-1 labels: metadata.appcat.vshn.io/offered: 'true' metadata.appcat.vshn.io/serviceID: exoscale-redis diff --git a/tests/golden/minio/appcat/appcat/10_provider_kubernetes.yaml b/tests/golden/minio/appcat/appcat/10_provider_kubernetes.yaml index 4472f3399..5d62bf97a 100644 --- a/tests/golden/minio/appcat/appcat/10_provider_kubernetes.yaml +++ b/tests/golden/minio/appcat/appcat/10_provider_kubernetes.yaml @@ -259,6 +259,18 @@ rules: - snapshots verbs: - get + - apiGroups: + - minio.crossplane.io + resources: + - providerconfigs + verbs: + - get + - list + - watch + - update + - patch + - create + - delete --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding diff --git a/tests/golden/minio/appcat/appcat/20_xrd_vshn_minio.yaml b/tests/golden/minio/appcat/appcat/20_xrd_vshn_minio.yaml index 6a8750f50..7df2186f1 100644 --- a/tests/golden/minio/appcat/appcat/20_xrd_vshn_minio.yaml +++ b/tests/golden/minio/appcat/appcat/20_xrd_vshn_minio.yaml @@ -13,8 +13,8 @@ spec: plural: vshnminios connectionSecretKeys: - MINIO_URL - - MINIO_USERNAME - - MINIO_PASSWORD + - AWS_SECRET_ACCESS_KEY + - AWS_ACCESS_KEY_ID defaultCompositionRef: name: vshnminio.vshn.appcat.vshn.io group: vshn.appcat.vshn.io @@ -70,14 +70,6 @@ spec: for the cluster. Each instance contains one Minio server. minimum: 4 type: integer - mode: - default: distributed - description: Mode configures the mode of MinIO. Valid values - are "distributed" and "standalone". - enum: - - distributed - - standalone - type: string restore: description: Restore contains settings to control the restore of an instance. @@ -92,6 +84,18 @@ spec: namespace as this new instance. type: string type: object + service: + description: Service contains the Minio specific configurations + properties: + mode: + default: distributed + description: Mode configures the mode of MinIO. Valid values + are "distributed" and "standalone". + enum: + - distributed + - standalone + type: string + type: object size: default: {} description: Size contains settings to control the sizing of diff --git a/tests/golden/minio/appcat/appcat/21_composition_vshn_minio.yaml b/tests/golden/minio/appcat/appcat/21_composition_vshn_minio.yaml index c05ab5c1f..9715e3f8a 100644 --- a/tests/golden/minio/appcat/appcat/21_composition_vshn_minio.yaml +++ b/tests/golden/minio/appcat/appcat/21_composition_vshn_minio.yaml @@ -11,7 +11,7 @@ metadata: metadata.appcat.vshn.io/plans: '{"standard-1":{"size":{"cpu":"1","disk":"50Gi","enabled":true,"memory":"1Gi"}}}' metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/minio.html labels: - metadata.appcat.vshn.io/offered: 'true' + metadata.appcat.vshn.io/offered: 'false' metadata.appcat.vshn.io/serviceID: vshn-minio name: vshnminio.vshn.appcat.vshn.io name: vshnminio.vshn.appcat.vshn.io @@ -24,11 +24,12 @@ spec: apiVersion: v1 data: defaultPlan: standard-1 - imageTag: v4.25.0 + imageTag: v4.27.0 minioChartRepository: https://charts.min.io minioChartVersion: 5.0.13 plans: '{"standard-1": {"size": {"cpu": "1", "disk": "50Gi", "enabled": true, "memory": "1Gi"}}}' + providerEnabled: 'false' kind: ConfigMap metadata: labels: diff --git a/tests/golden/minio/appcat/appcat/controllers/appcat/30_deployment.yaml b/tests/golden/minio/appcat/appcat/controllers/appcat/30_deployment.yaml index 68966857c..a15a197c2 100644 --- a/tests/golden/minio/appcat/appcat/controllers/appcat/30_deployment.yaml +++ b/tests/golden/minio/appcat/appcat/controllers/appcat/30_deployment.yaml @@ -23,7 +23,7 @@ spec: env: - name: PLANS_NAMESPACE value: syn-appcat - image: ghcr.io/vshn/appcat:v4.25.0 + image: ghcr.io/vshn/appcat:v4.27.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/minio/appcat/appcat/sla_reporter/01_cronjob.yaml b/tests/golden/minio/appcat/appcat/sla_reporter/01_cronjob.yaml index 4c5750cd2..17f5510c3 100644 --- a/tests/golden/minio/appcat/appcat/sla_reporter/01_cronjob.yaml +++ b/tests/golden/minio/appcat/appcat/sla_reporter/01_cronjob.yaml @@ -30,7 +30,7 @@ spec: envFrom: - secretRef: name: appcat-sla-reports-creds - image: ghcr.io/vshn/appcat:v4.25.0 + image: ghcr.io/vshn/appcat:v4.27.0 name: sla-reporter resources: limits: diff --git a/tests/golden/minio/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/tests/golden/minio/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 399bcb2bb..1a0bba2ee 100644 --- a/tests/golden/minio/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/tests/golden/minio/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -28,7 +28,7 @@ spec: value: "false" - name: APPCAT_SLI_VSHNREDIS value: "false" - image: ghcr.io/vshn/appcat:v4.25.0 + image: ghcr.io/vshn/appcat:v4.27.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/minio/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml b/tests/golden/minio/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml index 129ee1fb1..b31fce4ea 100644 --- a/tests/golden/minio/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml +++ b/tests/golden/minio/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml @@ -1,7 +1,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: appcat-sliexporter-appcat-sli-exporter rules: - apiGroups: diff --git a/tests/golden/openshift/appcat/appcat/10_provider_kubernetes.yaml b/tests/golden/openshift/appcat/appcat/10_provider_kubernetes.yaml index d83945f33..cc6437fb2 100644 --- a/tests/golden/openshift/appcat/appcat/10_provider_kubernetes.yaml +++ b/tests/golden/openshift/appcat/appcat/10_provider_kubernetes.yaml @@ -261,6 +261,18 @@ rules: - snapshots verbs: - get + - apiGroups: + - minio.crossplane.io + resources: + - providerconfigs + verbs: + - get + - list + - watch + - update + - patch + - create + - delete --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding diff --git a/tests/golden/openshift/appcat/appcat/21_composition_exoscale_kafka.yaml b/tests/golden/openshift/appcat/appcat/21_composition_exoscale_kafka.yaml index 2bdd7275e..d6e624576 100644 --- a/tests/golden/openshift/appcat/appcat/21_composition_exoscale_kafka.yaml +++ b/tests/golden/openshift/appcat/appcat/21_composition_exoscale_kafka.yaml @@ -10,8 +10,8 @@ metadata: metadata.appcat.vshn.io/plans: | {"business-16":{"note":"kafka business-16","size":{"cpu":"4","disk":"2010Gi","memory":"16Gi"}},"business-32":{"note":"kafka business-32","size":{"cpu":"8","disk":"4020Gi","memory":"32Gi"}},"business-4":{"note":"kafka business-4","size":{"cpu":"2","disk":"480Gi","memory":"4Gi"}},"business-8":{"note":"kafka business-8","size":{"cpu":"4","disk":"960Gi","memory":"8Gi"}},"premium-15x-16":{"note":"kafka premium-15x-16","size":{"cpu":"4","disk":"10005Gi","memory":"16Gi"}},"premium-15x-32":{"note":"kafka premium-15x-32","size":{"cpu":"8","disk":"20010Gi","memory":"32Gi"}},"premium-15x-8":{"note":"kafka premium-15x-8","size":{"cpu":"4","disk":"5010Gi","memory":"8Gi"}},"premium-30x-16":{"note":"kafka premium-30x-16","size":{"cpu":"4","disk":"20010Gi","memory":"16Gi"}},"premium-30x-32":{"note":"kafka premium-30x-32","size":{"cpu":"8","disk":"40020Gi","memory":"32Gi"}},"premium-30x-8":{"note":"kafka premium-30x-8","size":{"cpu":"4","disk":"10020Gi","memory":"8Gi"}},"premium-6x-16":{"note":"kafka premium-6x-16","size":{"cpu":"4","disk":"4020Gi","memory":"16Gi"}},"premium-6x-32":{"note":"kafka premium-6x-32","size":{"cpu":"8","disk":"8010Gi","memory":"32Gi"}},"premium-6x-8":{"note":"kafka premium-6x-8","size":{"cpu":"4","disk":"2010Gi","memory":"8Gi"}},"premium-9x-16":{"note":"kafka premium-9x-16","size":{"cpu":"4","disk":"6003Gi","memory":"16Gi"}},"premium-9x-32":{"note":"kafka premium-9x-32","size":{"cpu":"8","disk":"12006Gi","memory":"32Gi"}},"premium-9x-8":{"note":"kafka premium-9x-8","size":{"cpu":"4","disk":"3006Gi","memory":"8Gi"}},"startup-2":{"note":"kafka startup-2","size":{"cpu":"2","disk":"90Gi","memory":"2Gi"}}} metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/exoscale_dbaas.html - metadata.appcat.vshn.io/zone: 'Exoscale zones: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, - ch-dk-2, bg-sof-1' + metadata.appcat.vshn.io/zone: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, ch-dk-2, + bg-sof-1 labels: metadata.appcat.vshn.io/offered: 'true' metadata.appcat.vshn.io/serviceID: exoscale-kafka diff --git a/tests/golden/openshift/appcat/appcat/21_composition_exoscale_mysql.yaml b/tests/golden/openshift/appcat/appcat/21_composition_exoscale_mysql.yaml index 6f0b35626..46fe788ed 100644 --- a/tests/golden/openshift/appcat/appcat/21_composition_exoscale_mysql.yaml +++ b/tests/golden/openshift/appcat/appcat/21_composition_exoscale_mysql.yaml @@ -10,8 +10,8 @@ metadata: metadata.appcat.vshn.io/plans: | {"business-128":{"note":"mysql business-128","size":{"cpu":"16","disk":"1000Gi","memory":"128Gi"}},"business-16":{"note":"mysql business-16","size":{"cpu":"4","disk":"350Gi","memory":"16Gi"}},"business-225":{"note":"mysql business-225","size":{"cpu":"24","disk":"1300Gi","memory":"225Gi"}},"business-32":{"note":"mysql business-32","size":{"cpu":"8","disk":"500Gi","memory":"32Gi"}},"business-4":{"note":"mysql business-4","size":{"cpu":"2","disk":"80Gi","memory":"4Gi"}},"business-64":{"note":"mysql business-64","size":{"cpu":"12","disk":"750Gi","memory":"64Gi"}},"business-8":{"note":"mysql business-8","size":{"cpu":"4","disk":"175Gi","memory":"8Gi"}},"hobbyist-2":{"note":"mysql hobbyist-2","size":{"cpu":"2","disk":"8Gi","memory":"2Gi"}},"premium-128":{"note":"mysql premium-128","size":{"cpu":"16","disk":"1000Gi","memory":"128Gi"}},"premium-16":{"note":"mysql premium-16","size":{"cpu":"4","disk":"350Gi","memory":"16Gi"}},"premium-225":{"note":"mysql premium-225","size":{"cpu":"24","disk":"1300Gi","memory":"225Gi"}},"premium-32":{"note":"mysql premium-32","size":{"cpu":"8","disk":"500Gi","memory":"32Gi"}},"premium-4":{"note":"mysql premium-4","size":{"cpu":"2","disk":"80Gi","memory":"4Gi"}},"premium-64":{"note":"mysql premium-64","size":{"cpu":"12","disk":"750Gi","memory":"64Gi"}},"premium-8":{"note":"mysql premium-8","size":{"cpu":"4","disk":"175Gi","memory":"8Gi"}},"startup-128":{"note":"mysql startup-128","size":{"cpu":"16","disk":"1000Gi","memory":"128Gi"}},"startup-16":{"note":"mysql startup-16","size":{"cpu":"4","disk":"350Gi","memory":"16Gi"}},"startup-225":{"note":"mysql startup-225","size":{"cpu":"24","disk":"1300Gi","memory":"225Gi"}},"startup-32":{"note":"mysql startup-32","size":{"cpu":"8","disk":"500Gi","memory":"32Gi"}},"startup-4":{"note":"mysql startup-4","size":{"cpu":"2","disk":"80Gi","memory":"4Gi"}},"startup-64":{"note":"mysql startup-64","size":{"cpu":"12","disk":"750Gi","memory":"64Gi"}},"startup-8":{"note":"mysql startup-8","size":{"cpu":"4","disk":"175Gi","memory":"8Gi"}}} metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/exoscale_dbaas.html - metadata.appcat.vshn.io/zone: 'Exoscale zones: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, - ch-dk-2, bg-sof-1' + metadata.appcat.vshn.io/zone: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, ch-dk-2, + bg-sof-1 labels: metadata.appcat.vshn.io/offered: 'true' metadata.appcat.vshn.io/serviceID: exoscale-mysql diff --git a/tests/golden/openshift/appcat/appcat/21_composition_exoscale_opensearch.yaml b/tests/golden/openshift/appcat/appcat/21_composition_exoscale_opensearch.yaml index a2257b55b..18b336abe 100644 --- a/tests/golden/openshift/appcat/appcat/21_composition_exoscale_opensearch.yaml +++ b/tests/golden/openshift/appcat/appcat/21_composition_exoscale_opensearch.yaml @@ -10,8 +10,8 @@ metadata: metadata.appcat.vshn.io/plans: | {"business-16":{"note":"opensearch business-16","size":{"cpu":"4","disk":"1050Gi","memory":"16Gi"}},"business-32":{"note":"opensearch business-32","size":{"cpu":"8","disk":"2100Gi","memory":"32Gi"}},"business-4":{"note":"opensearch business-4","size":{"cpu":"2","disk":"240Gi","memory":"4Gi"}},"business-8":{"note":"opensearch business-8","size":{"cpu":"4","disk":"525Gi","memory":"8Gi"}},"hobbyist-2":{"note":"opensearch hobbyist-2","size":{"cpu":"2","disk":"16Gi","memory":"2Gi"}},"premium-15x-16":{"note":"opensearch premium-15x-16","size":{"cpu":"4","disk":"5250Gi","memory":"16Gi"}},"premium-15x-32":{"note":"opensearch premium-15x-32","size":{"cpu":"8","disk":"10500Gi","memory":"32Gi"}},"premium-30x-16":{"note":"opensearch premium-30x-16","size":{"cpu":"4","disk":"10500Gi","memory":"16Gi"}},"premium-30x-32":{"note":"opensearch premium-30x-32","size":{"cpu":"8","disk":"21000Gi","memory":"32Gi"}},"premium-6x-16":{"note":"opensearch premium-6x-16","size":{"cpu":"4","disk":"2100Gi","memory":"16Gi"}},"premium-6x-32":{"note":"opensearch premium-6x-32","size":{"cpu":"8","disk":"4200Gi","memory":"32Gi"}},"premium-6x-8":{"note":"opensearch premium-6x-8","size":{"cpu":"4","disk":"1050Gi","memory":"8Gi"}},"premium-9x-16":{"note":"opensearch premium-9x-16","size":{"cpu":"4","disk":"3150Gi","memory":"16Gi"}},"premium-9x-32":{"note":"opensearch premium-9x-32","size":{"cpu":"8","disk":"6300Gi","memory":"32Gi"}},"premium-9x-8":{"note":"opensearch premium-9x-8","size":{"cpu":"4","disk":"1575Gi","memory":"8Gi"}},"startup-16":{"note":"opensearch startup-16","size":{"cpu":"4","disk":"350Gi","memory":"16Gi"}},"startup-32":{"note":"opensearch startup-32","size":{"cpu":"8","disk":"700Gi","memory":"32Gi"}},"startup-4":{"note":"opensearch startup-4","size":{"cpu":"2","disk":"80Gi","memory":"4Gi"}},"startup-8":{"note":"opensearch startup-8","size":{"cpu":"4","disk":"175Gi","memory":"8Gi"}}} metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/exoscale_dbaas.html - metadata.appcat.vshn.io/zone: 'Exoscale zones: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, - ch-dk-2, bg-sof-1' + metadata.appcat.vshn.io/zone: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, ch-dk-2, + bg-sof-1 labels: metadata.appcat.vshn.io/offered: 'true' metadata.appcat.vshn.io/serviceID: exoscale-opensearch diff --git a/tests/golden/openshift/appcat/appcat/21_composition_exoscale_postgres.yaml b/tests/golden/openshift/appcat/appcat/21_composition_exoscale_postgres.yaml index b2f7ba4a2..2517007bc 100644 --- a/tests/golden/openshift/appcat/appcat/21_composition_exoscale_postgres.yaml +++ b/tests/golden/openshift/appcat/appcat/21_composition_exoscale_postgres.yaml @@ -10,8 +10,8 @@ metadata: metadata.appcat.vshn.io/plans: | {"business-128":{"note":"pg business-128","size":{"cpu":"16","disk":"1000Gi","memory":"128Gi"}},"business-16":{"note":"pg business-16","size":{"cpu":"4","disk":"350Gi","memory":"16Gi"}},"business-225":{"note":"pg business-225","size":{"cpu":"24","disk":"1300Gi","memory":"225Gi"}},"business-32":{"note":"pg business-32","size":{"cpu":"8","disk":"500Gi","memory":"32Gi"}},"business-4":{"note":"pg business-4","size":{"cpu":"2","disk":"80Gi","memory":"4Gi"}},"business-64":{"note":"pg business-64","size":{"cpu":"12","disk":"750Gi","memory":"64Gi"}},"business-8":{"note":"pg business-8","size":{"cpu":"4","disk":"175Gi","memory":"8Gi"}},"hobbyist-2":{"note":"pg hobbyist-2","size":{"cpu":"2","disk":"8Gi","memory":"2Gi"}},"premium-128":{"note":"pg premium-128","size":{"cpu":"16","disk":"1000Gi","memory":"128Gi"}},"premium-16":{"note":"pg premium-16","size":{"cpu":"4","disk":"350Gi","memory":"16Gi"}},"premium-225":{"note":"pg premium-225","size":{"cpu":"24","disk":"1300Gi","memory":"225Gi"}},"premium-32":{"note":"pg premium-32","size":{"cpu":"8","disk":"500Gi","memory":"32Gi"}},"premium-4":{"note":"pg premium-4","size":{"cpu":"2","disk":"80Gi","memory":"4Gi"}},"premium-64":{"note":"pg premium-64","size":{"cpu":"12","disk":"750Gi","memory":"64Gi"}},"premium-8":{"note":"pg premium-8","size":{"cpu":"4","disk":"175Gi","memory":"8Gi"}},"startup-128":{"note":"pg startup-128","size":{"cpu":"16","disk":"1000Gi","memory":"128Gi"}},"startup-16":{"note":"pg startup-16","size":{"cpu":"4","disk":"350Gi","memory":"16Gi"}},"startup-225":{"note":"pg startup-225","size":{"cpu":"24","disk":"1300Gi","memory":"225Gi"}},"startup-32":{"note":"pg startup-32","size":{"cpu":"8","disk":"500Gi","memory":"32Gi"}},"startup-4":{"note":"pg startup-4","size":{"cpu":"2","disk":"80Gi","memory":"4Gi"}},"startup-64":{"note":"pg startup-64","size":{"cpu":"12","disk":"750Gi","memory":"64Gi"}},"startup-8":{"note":"pg startup-8","size":{"cpu":"4","disk":"175Gi","memory":"8Gi"}}} metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/exoscale_dbaas.html - metadata.appcat.vshn.io/zone: 'Exoscale zones: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, - ch-dk-2, bg-sof-1' + metadata.appcat.vshn.io/zone: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, ch-dk-2, + bg-sof-1 labels: metadata.appcat.vshn.io/offered: 'true' metadata.appcat.vshn.io/serviceID: exoscale-postgresql diff --git a/tests/golden/openshift/appcat/appcat/21_composition_exoscale_redis.yaml b/tests/golden/openshift/appcat/appcat/21_composition_exoscale_redis.yaml index 2e28f2be7..1720b6eb7 100644 --- a/tests/golden/openshift/appcat/appcat/21_composition_exoscale_redis.yaml +++ b/tests/golden/openshift/appcat/appcat/21_composition_exoscale_redis.yaml @@ -10,8 +10,8 @@ metadata: metadata.appcat.vshn.io/plans: | {"business-1":{"note":"redis business-1","size":{"cpu":"2","disk":"0","memory":"1Gi"}},"business-128":{"note":"redis business-128","size":{"cpu":"16","disk":"0","memory":"128Gi"}},"business-16":{"note":"redis business-16","size":{"cpu":"4","disk":"0","memory":"16Gi"}},"business-225":{"note":"redis business-225","size":{"cpu":"24","disk":"0","memory":"225Gi"}},"business-32":{"note":"redis business-32","size":{"cpu":"8","disk":"0","memory":"32Gi"}},"business-4":{"note":"redis business-4","size":{"cpu":"2","disk":"0","memory":"4Gi"}},"business-64":{"note":"redis business-64","size":{"cpu":"12","disk":"0","memory":"64Gi"}},"business-8":{"note":"redis business-8","size":{"cpu":"4","disk":"0","memory":"8Gi"}},"hobbyist-2":{"note":"redis hobbyist-2","size":{"cpu":"2","disk":"0","memory":"1Gi"}},"premium-128":{"note":"redis premium-128","size":{"cpu":"16","disk":"0","memory":"128Gi"}},"premium-16":{"note":"redis premium-16","size":{"cpu":"4","disk":"0","memory":"16Gi"}},"premium-225":{"note":"redis premium-225","size":{"cpu":"24","disk":"0","memory":"225Gi"}},"premium-32":{"note":"redis premium-32","size":{"cpu":"8","disk":"0","memory":"32Gi"}},"premium-4":{"note":"redis premium-4","size":{"cpu":"2","disk":"0","memory":"4Gi"}},"premium-64":{"note":"redis premium-64","size":{"cpu":"12","disk":"0","memory":"64Gi"}},"premium-8":{"note":"redis premium-8","size":{"cpu":"4","disk":"0","memory":"8Gi"}},"startup-128":{"note":"redis startup-128","size":{"cpu":"16","disk":"0","memory":"128Gi"}},"startup-16":{"note":"redis startup-16","size":{"cpu":"4","disk":"0","memory":"16Gi"}},"startup-225":{"note":"redis startup-225","size":{"cpu":"24","disk":"0","memory":"225Gi"}},"startup-32":{"note":"redis startup-32","size":{"cpu":"8","disk":"0","memory":"32Gi"}},"startup-4":{"note":"redis startup-4","size":{"cpu":"2","disk":"0","memory":"4Gi"}},"startup-64":{"note":"redis startup-64","size":{"cpu":"12","disk":"0","memory":"64Gi"}},"startup-8":{"note":"redis startup-8","size":{"cpu":"4","disk":"0","memory":"8Gi"}}} metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/exoscale_dbaas.html - metadata.appcat.vshn.io/zone: 'Exoscale zones: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, - ch-dk-2, bg-sof-1' + metadata.appcat.vshn.io/zone: de-fra-1, de-muc-1, at-vie-1, ch-gva-2, ch-dk-2, + bg-sof-1 labels: metadata.appcat.vshn.io/offered: 'true' metadata.appcat.vshn.io/serviceID: exoscale-redis diff --git a/tests/golden/openshift/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/tests/golden/openshift/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 399bcb2bb..1a0bba2ee 100644 --- a/tests/golden/openshift/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/tests/golden/openshift/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -28,7 +28,7 @@ spec: value: "false" - name: APPCAT_SLI_VSHNREDIS value: "false" - image: ghcr.io/vshn/appcat:v4.25.0 + image: ghcr.io/vshn/appcat:v4.27.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/openshift/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml b/tests/golden/openshift/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml index 129ee1fb1..b31fce4ea 100644 --- a/tests/golden/openshift/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml +++ b/tests/golden/openshift/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml @@ -1,7 +1,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: appcat-sliexporter-appcat-sli-exporter rules: - apiGroups: diff --git a/tests/golden/vshn/appcat/appcat/10_provider_kubernetes.yaml b/tests/golden/vshn/appcat/appcat/10_provider_kubernetes.yaml index 4472f3399..5d62bf97a 100644 --- a/tests/golden/vshn/appcat/appcat/10_provider_kubernetes.yaml +++ b/tests/golden/vshn/appcat/appcat/10_provider_kubernetes.yaml @@ -259,6 +259,18 @@ rules: - snapshots verbs: - get + - apiGroups: + - minio.crossplane.io + resources: + - providerconfigs + verbs: + - get + - list + - watch + - update + - patch + - create + - delete --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding diff --git a/tests/golden/vshn/appcat/appcat/20_rbac_vshn_minio.yaml b/tests/golden/vshn/appcat/appcat/20_rbac_vshn_minio.yaml new file mode 100644 index 000000000..e09b3c14a --- /dev/null +++ b/tests/golden/vshn/appcat/appcat/20_rbac_vshn_minio.yaml @@ -0,0 +1,36 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + annotations: {} + labels: + rbac.authorization.k8s.io/aggregate-to-view: 'true' + name: appcat:composite:xvshnminios.vshn.appcat.vshn.io:claim-view +rules: + - apiGroups: + - vshn.appcat.vshn.io + resources: + - vshnminios + - vshnminios/status + - vshnminios/finalizers + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + annotations: {} + labels: + rbac.authorization.k8s.io/aggregate-to-admin: 'true' + rbac.authorization.k8s.io/aggregate-to-edit: 'true' + name: appcat:composite:xvshnminios.vshn.appcat.vshn.io:claim-edit +rules: + - apiGroups: + - vshn.appcat.vshn.io + resources: + - vshnminios + - vshnminios/status + - vshnminios/finalizers + verbs: + - '*' diff --git a/tests/golden/vshn/appcat/appcat/20_xrd_vshn_minio.yaml b/tests/golden/vshn/appcat/appcat/20_xrd_vshn_minio.yaml new file mode 100644 index 000000000..7df2186f1 --- /dev/null +++ b/tests/golden/vshn/appcat/appcat/20_xrd_vshn_minio.yaml @@ -0,0 +1,203 @@ +apiVersion: apiextensions.crossplane.io/v1 +kind: CompositeResourceDefinition +metadata: + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + argocd.argoproj.io/sync-wave: '10' + labels: + name: xvshnminios.vshn.appcat.vshn.io + name: xvshnminios.vshn.appcat.vshn.io +spec: + claimNames: + kind: VSHNMinio + plural: vshnminios + connectionSecretKeys: + - MINIO_URL + - AWS_SECRET_ACCESS_KEY + - AWS_ACCESS_KEY_ID + defaultCompositionRef: + name: vshnminio.vshn.appcat.vshn.io + group: vshn.appcat.vshn.io + names: + kind: XVSHNMinio + plural: xvshnminios + versions: + - name: v1 + referenceable: true + schema: + openAPIV3Schema: + description: VSHNMinio is the API for creating Minio instances. + properties: + spec: + description: Spec defines the desired state of a VSHNMinio. + properties: + parameters: + default: {} + description: Parameters are the configurable fields of a VSHNMinio. + properties: + backup: + default: {} + description: Backup contains settings to control how the instance + should get backed up. + properties: + retention: + description: K8upRetentionPolicy describes the retention + configuration for a K8up backup. + properties: + keepDaily: + default: 6 + type: integer + keepHourly: + type: integer + keepLast: + type: integer + keepMonthly: + type: integer + keepWeekly: + type: integer + keepYearly: + type: integer + type: object + schedule: + pattern: ^(\*|([0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])|\*\/([0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])) + (\*|([0-9]|1[0-9]|2[0-3])|\*\/([0-9]|1[0-9]|2[0-3])) (\*|([1-9]|1[0-9]|2[0-9]|3[0-1])|\*\/([1-9]|1[0-9]|2[0-9]|3[0-1])) + (\*|([1-9]|1[0-2])|\*\/([1-9]|1[0-2])) (\*|([0-6])|\*\/([0-6]))$ + type: string + type: object + instances: + default: 4 + description: Instances configures the number of Minio instances + for the cluster. Each instance contains one Minio server. + minimum: 4 + type: integer + restore: + description: Restore contains settings to control the restore + of an instance. + properties: + backupName: + description: BackupName is the name of the specific backup + you want to restore. + type: string + claimName: + description: ClaimName specifies the name of the instance + you want to restore from. The claim has to be in the same + namespace as this new instance. + type: string + type: object + service: + description: Service contains the Minio specific configurations + properties: + mode: + default: distributed + description: Mode configures the mode of MinIO. Valid values + are "distributed" and "standalone". + enum: + - distributed + - standalone + type: string + type: object + size: + default: {} + description: Size contains settings to control the sizing of + a service. + properties: + cpu: + description: CPU defines the amount of Kubernetes CPUs for + an instance. + type: string + disk: + description: Disk defines the amount of disk space for an + instance. + type: string + memory: + description: Memory defines the amount of memory in units + of bytes for an instance. + type: string + plan: + default: standard-1 + description: | + Plan is the name of the resource plan that defines the compute resources. + + The following plans are available: + + standard-1 - CPU: 1; Memory: 1Gi; Disk: 50Gi + enum: + - standard-1 + type: string + requests: + description: Requests defines CPU and memory requests for + an instance + properties: + cpu: + description: CPU defines the amount of Kubernetes CPUs + for an instance. + type: string + memory: + description: Memory defines the amount of memory in + units of bytes for an instance. + type: string + type: object + type: object + storageClass: + description: StorageClass configures the storageClass to use + for the PVC used by MinIO. + type: string + type: object + type: object + status: + description: Status reflects the observed state of a VSHNMinio. + properties: + instanceNamespace: + description: InstanceNamespace contains the name of the namespace + where the instance resides + type: string + namespaceConditions: + description: MinioConditions contains the status conditions of the + backing object. + items: + properties: + lastTransitionTime: + description: LastTransitionTime is the last time the condition + transitioned from one status to another. + format: date-time + type: string + message: + description: Message is a human-readable message indicating + details about the transition. + maxLength: 32768 + type: string + observedGeneration: + description: ObservedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if + .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: Reason contains a programmatic identifier indicating + the reason for the condition's last transition. + maxLength: 1024 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: Status of the condition, one of True, False, + Unknown. + enum: + - 'True' + - 'False' + - Unknown + type: string + type: + description: Type of condition. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + type: object + type: array + type: object + required: + - spec + type: object + served: true diff --git a/tests/golden/vshn/appcat/appcat/21_composition_objectstorage_minio.yaml b/tests/golden/vshn/appcat/appcat/21_composition_objectstorage_minio.yaml index 2a220bcd6..c192d729a 100644 --- a/tests/golden/vshn/appcat/appcat/21_composition_objectstorage_minio.yaml +++ b/tests/golden/vshn/appcat/appcat/21_composition_objectstorage_minio.yaml @@ -4,14 +4,14 @@ metadata: annotations: argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true argocd.argoproj.io/sync-wave: '10' - metadata.appcat.vshn.io/description: S3 compatible object storage hosted by Minio - metadata.appcat.vshn.io/displayname: Minio Object Storage + metadata.appcat.vshn.io/description: S3 compatible object storage hosted by Minio-minio + metadata.appcat.vshn.io/displayname: Minio-minio Object Storage metadata.appcat.vshn.io/end-user-docs-url: https://vs.hn/objstor metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/objectstorage.html - metadata.appcat.vshn.io/zone: Currently no zones available + metadata.appcat.vshn.io/zone: default labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/serviceID: minio-objectbucket + metadata.appcat.vshn.io/serviceID: minio-minio-objectbucket name: minio.objectbuckets.appcat.vshn.io name: minio.objectbuckets.appcat.vshn.io spec: diff --git a/tests/golden/vshn/appcat/appcat/21_composition_vshn_minio.yaml b/tests/golden/vshn/appcat/appcat/21_composition_vshn_minio.yaml new file mode 100644 index 000000000..5afbf484c --- /dev/null +++ b/tests/golden/vshn/appcat/appcat/21_composition_vshn_minio.yaml @@ -0,0 +1,46 @@ +apiVersion: apiextensions.crossplane.io/v1 +kind: Composition +metadata: + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + argocd.argoproj.io/sync-wave: '10' + metadata.appcat.vshn.io/description: Minio instances by VSHN + metadata.appcat.vshn.io/displayname: Minio by VSHN + metadata.appcat.vshn.io/end-user-docs-url: https://vs.hn/vshn-minio + metadata.appcat.vshn.io/flavor: distributed + metadata.appcat.vshn.io/plans: '{"standard-1":{"size":{"cpu":"1","disk":"50Gi","enabled":true,"memory":"1Gi"}}}' + metadata.appcat.vshn.io/product-description: https://products.docs.vshn.ch/products/appcat/minio.html + labels: + metadata.appcat.vshn.io/offered: 'false' + metadata.appcat.vshn.io/serviceID: vshn-minio + name: vshnminio.vshn.appcat.vshn.io + name: vshnminio.vshn.appcat.vshn.io +spec: + compositeTypeRef: + apiVersion: vshn.appcat.vshn.io/v1 + kind: XVSHNMinio + functions: + - config: + apiVersion: v1 + data: + defaultPlan: standard-1 + imageTag: v4.27.0 + minioChartRepository: https://charts.min.io + minioChartVersion: 5.0.13 + plans: '{"standard-1": {"size": {"cpu": "1", "disk": "50Gi", "enabled": + true, "memory": "1Gi"}}}' + providerEnabled: 'true' + kind: ConfigMap + metadata: + labels: + name: xfn-config + name: xfn-config + container: + image: minio + imagePullPolicy: IfNotPresent + runner: + endpoint: unix-abstract:crossplane/fn/default.sock + timeout: 20s + name: minio-func + type: Container + writeConnectionSecretsToNamespace: syn-crossplane diff --git a/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgres.yaml b/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgres.yaml index b73a43977..c4bbaf5ff 100644 --- a/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgres.yaml +++ b/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgres.yaml @@ -33,7 +33,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: myuser@example.com externalDatabaseConnectionsEnabled: 'true' - imageTag: v4.25.0 + imageTag: v4.27.0 quotasEnabled: 'false' sgNamespace: stackgres kind: ConfigMap diff --git a/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgresrestore.yaml b/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgresrestore.yaml index df59d2d17..d99757d1b 100644 --- a/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgresrestore.yaml +++ b/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgresrestore.yaml @@ -33,7 +33,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: myuser@example.com externalDatabaseConnectionsEnabled: 'true' - imageTag: v4.25.0 + imageTag: v4.27.0 quotasEnabled: 'false' sgNamespace: stackgres kind: ConfigMap diff --git a/tests/golden/vshn/appcat/appcat/21_composition_vshn_redis.yaml b/tests/golden/vshn/appcat/appcat/21_composition_vshn_redis.yaml index b9712ecfe..ebdbddf1a 100644 --- a/tests/golden/vshn/appcat/appcat/21_composition_vshn_redis.yaml +++ b/tests/golden/vshn/appcat/appcat/21_composition_vshn_redis.yaml @@ -30,7 +30,7 @@ spec: data: bucketRegion: lpg controlNamespace: syn-appcat-control - imageTag: v4.25.0 + imageTag: v4.27.0 maintenanceSA: helm-based-service-maintenance quotasEnabled: 'false' restoreSA: redisrestoreserviceaccount diff --git a/tests/golden/vshn/appcat/appcat/controllers/appcat/30_deployment.yaml b/tests/golden/vshn/appcat/appcat/controllers/appcat/30_deployment.yaml index 68966857c..a15a197c2 100644 --- a/tests/golden/vshn/appcat/appcat/controllers/appcat/30_deployment.yaml +++ b/tests/golden/vshn/appcat/appcat/controllers/appcat/30_deployment.yaml @@ -23,7 +23,7 @@ spec: env: - name: PLANS_NAMESPACE value: syn-appcat - image: ghcr.io/vshn/appcat:v4.25.0 + image: ghcr.io/vshn/appcat:v4.27.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/vshn/appcat/appcat/sla_reporter/01_cronjob.yaml b/tests/golden/vshn/appcat/appcat/sla_reporter/01_cronjob.yaml index 44774e162..19ee532ed 100644 --- a/tests/golden/vshn/appcat/appcat/sla_reporter/01_cronjob.yaml +++ b/tests/golden/vshn/appcat/appcat/sla_reporter/01_cronjob.yaml @@ -30,7 +30,7 @@ spec: envFrom: - secretRef: name: appcat-sla-reports-creds - image: ghcr.io/vshn/appcat:v4.25.0 + image: ghcr.io/vshn/appcat:v4.27.0 name: sla-reporter resources: limits: diff --git a/tests/golden/vshn/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/tests/golden/vshn/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 600ba2b73..ed61691fb 100644 --- a/tests/golden/vshn/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/tests/golden/vshn/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -28,7 +28,7 @@ spec: value: "true" - name: APPCAT_SLI_VSHNREDIS value: "true" - image: ghcr.io/vshn/appcat:v4.25.0 + image: ghcr.io/vshn/appcat:v4.27.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/vshn/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml b/tests/golden/vshn/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml index 129ee1fb1..b31fce4ea 100644 --- a/tests/golden/vshn/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml +++ b/tests/golden/vshn/appcat/appcat/sli_exporter/rbac.authorization.k8s.io_v1_clusterrole_appcat-sliexporter-appcat-sli-exporter.yaml @@ -1,7 +1,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: appcat-sliexporter-appcat-sli-exporter rules: - apiGroups: diff --git a/tests/vshn.yml b/tests/vshn.yml index 3d64d77b7..78f5e9d50 100644 --- a/tests/vshn.yml +++ b/tests/vshn.yml @@ -33,12 +33,14 @@ parameters: enabled: true minio: enabled: true - providerConfig: - minioURL: http://minio-server.minio.svc:9000/ - credentials: - apiSecretRef: - name: minio-secret - namespace: syn-crossplane + additionalProviderConfigs: + - name: minio + minioURL: http://minio-server.minio.svc:9000/ + credentials: + apiSecretRef: + name: minio-secret + namespace: syn-crossplane + apiserver: enabled: true env: @@ -102,16 +104,20 @@ parameters: nodeSelector: appuio.io/node-class: "plus" note: "Will be scheduled on APPUiO Cloud plus nodes" + minio: + enabled: true + # grpcEndpoint: host.docker.internal:9547 + generic: - objectstorage: - enabled: true + objectstorage: + enabled: true - defaultComposition: minio - compositions: - exoscale: - enabled: false - cloudscale: - enabled: false - minio: - enabled: true - # grpcEndpoint: host.docker.internal:9547 + defaultComposition: minio + compositions: + exoscale: + enabled: false + cloudscale: + enabled: false + minio: + enabled: true + # grpcEndpoint: host.docker.internal:9547