diff --git a/.github/workflows/ci-pipeline-extra-thanos.yml b/.github/workflows/ci-pipeline-extra-thanos.yml deleted file mode 100644 index fbd7df885d..0000000000 --- a/.github/workflows/ci-pipeline-extra-thanos.yml +++ /dev/null @@ -1,36 +0,0 @@ -# Multiple deployments pipelines are custom per asset. All single deployments pipelines are handled by ci-pipeline.yaml -name: '[CI/CD] CI Pipeline extra Thanos' -on: # rebuild any PRs and main branch changes - pull_request_target: - types: - - reopened - - synchronize - - labeled - branches: - - main - paths: - - 'bitnami/thanos/*' -env: - CSP_API_URL: https://console.cloud.vmware.com - CSP_API_TOKEN: ${{ secrets.CSP_API_TOKEN }} - VIB_PUBLIC_URL: https://cp.bromelia.vmware.com -jobs: - vib-verify-bucketweb: - # Given performance issues of the action feature on GH's side, we need to be very restrictive in the job's triggers: - # -> The pipeline was triggered due to a label addition and said label was the 'verify' one OR - # -> The pipeline was NOT triggered due to a label addition but the PR already contains the 'verify' one - if: | - github.event.action == 'labeled' && github.event.label.name == 'verify' || - github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'verify') - runs-on: ubuntu-latest - name: Verify BucketWeb on Tanzu Kubernetes Grid - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.ref }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - - uses: vmware-labs/vmware-image-builder-action@main - with: - pipeline: thanos/bucketweb/vib-verify.json - env: - VIB_ENV_TARGET_PLATFORM: ${{ secrets.VIB_ENV_TARGET_PLATFORM }} diff --git a/.vib/thanos/bucketweb/cypress/cypress.json b/.vib/thanos/bucketweb/cypress/cypress.json deleted file mode 100644 index ca7dfecb44..0000000000 --- a/.vib/thanos/bucketweb/cypress/cypress.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "baseUrl": "http://localhost", - "defaultCommandTimeout": 40000 -} diff --git a/.vib/thanos/bucketweb/cypress/cypress/integration/thanos_bucketweb_spec.js b/.vib/thanos/bucketweb/cypress/cypress/integration/thanos_bucketweb_spec.js deleted file mode 100644 index f764400b62..0000000000 --- a/.vib/thanos/bucketweb/cypress/cypress/integration/thanos_bucketweb_spec.js +++ /dev/null @@ -1,19 +0,0 @@ -/// - -it('allows to see runtime & build information', () => { - cy.visit('/'); - cy.contains('.dropdown-toggle', 'Status').click(); - cy.contains('[class="dropdown-item"]', 'Runtime & Build Information').click(); - cy.contains('Runtime Information'); - cy.get('h2').contains('Build Information'); - cy.contains('.capitalize-title', 'version').siblings().should('not.be.empty'); //check if there is value for app and Go Version - cy.contains('.capitalize-title', 'goVersion') - .siblings() - .should('not.be.empty'); -}); - -it('allows to see the Blocks page', () => { - cy.visit('/'); - cy.get('.nav-link').contains('Blocks').click(); - cy.contains('No blocks found.'); -}); diff --git a/.vib/thanos/bucketweb/cypress/cypress/support/commands.js b/.vib/thanos/bucketweb/cypress/cypress/support/commands.js deleted file mode 100644 index 85a974c522..0000000000 --- a/.vib/thanos/bucketweb/cypress/cypress/support/commands.js +++ /dev/null @@ -1,13 +0,0 @@ -const COMMAND_DELAY = 2000; - -for (const command of ['click']) { - Cypress.Commands.overwrite(command, (originalFn, ...args) => { - const origVal = originalFn(...args); - - return new Promise((resolve) => { - setTimeout(() => { - resolve(origVal); - }, COMMAND_DELAY); - }); - }); -} diff --git a/.vib/thanos/bucketweb/cypress/cypress/support/index.js b/.vib/thanos/bucketweb/cypress/cypress/support/index.js deleted file mode 100644 index d68db96df2..0000000000 --- a/.vib/thanos/bucketweb/cypress/cypress/support/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/index.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/.vib/thanos/bucketweb/vib-verify.json b/.vib/thanos/bucketweb/vib-verify.json deleted file mode 100644 index 9e16112a7d..0000000000 --- a/.vib/thanos/bucketweb/vib-verify.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "phases": { - "package": { - "context": { - "resources": { - "url": "{SHA_ARCHIVE}", - "path": "/bitnami/thanos" - } - }, - "actions": [ - { - "action_id": "helm-package" - }, - { - "action_id": "helm-lint" - } - ] - }, - "verify": { - "context": { - "resources": { - "url": "{SHA_ARCHIVE}", - "path": "/bitnami/thanos" - }, - "runtime_parameters": "b2Jqc3RvcmVDb25maWc6IHwtCiAgdHlwZTogRklMRVNZU1RFTQogIGNvbmZpZzoKICAgIGRpcmVjdG9yeTogIi8iCgpidWNrZXR3ZWI6CiAgZW5hYmxlZDogdHJ1ZQogIHNlcnZpY2U6CiAgICB0eXBlOiBMb2FkQmFsYW5jZXIKICAgIHBvcnRzOgogICAgICBodHRwOiA4MA==", - "target_platform": { - "target_platform_id": "{VIB_ENV_TARGET_PLATFORM}", - "size": { - "name": "M4" - } - } - }, - "actions": [ - { - "action_id": "health-check", - "params": { - "endpoint": "lb-thanos-bucketweb-http", - "app_protocol": "HTTP" - } - }, - { - "action_id": "cypress", - "params": { - "resources": { - "path": "/.vib/thanos/bucketweb/cypress" - }, - "endpoint": "lb-thanos-bucketweb-http", - "app_protocol": "HTTP" - } - } - ] - } - } -} diff --git a/.vib/thanos/cypress/cypress.json b/.vib/thanos/cypress/cypress.json new file mode 100644 index 0000000000..04bea02088 --- /dev/null +++ b/.vib/thanos/cypress/cypress.json @@ -0,0 +1,8 @@ +{ + "baseUrl": "http://localhost/", + "defaultCommandTimeout": 60000, + "env": { + "storePort": "10903", + "receivePort": "10904" + } +} diff --git a/.vib/thanos/cypress/cypress/integration/thanos_spec.js b/.vib/thanos/cypress/cypress/integration/thanos_spec.js new file mode 100644 index 0000000000..e3727285a5 --- /dev/null +++ b/.vib/thanos/cypress/cypress/integration/thanos_spec.js @@ -0,0 +1,22 @@ +/// + +it('allows the execution of a query', () => { + const QUERY_KEYWORD = 'vector'; + const QUERY_VALUE = '3000'; + + cy.visit('/graph'); + cy.contains('.alert', 'No data queried').should('be.visible'); + cy.get('.cm-line').type(`${QUERY_KEYWORD}(${QUERY_VALUE})`, '{enter}'); + cy.get('.execute-btn').click(); + cy.contains('.tab-content', QUERY_VALUE); +}); + +it('allows listing all installed stores', () => { + cy.visit('/stores'); + cy.contains('tr', Cypress.env('storePort')).within(() => { + cy.get('[data-testid="health"]').contains('UP'); + }); + cy.contains('tr', Cypress.env('receivePort')).within(() => { + cy.get('[data-testid="health"]').contains('UP'); + }); +}); diff --git a/.vib/thanos/queryfrontend/cypress/cypress/support/commands.js b/.vib/thanos/cypress/cypress/support/commands.js similarity index 100% rename from .vib/thanos/queryfrontend/cypress/cypress/support/commands.js rename to .vib/thanos/cypress/cypress/support/commands.js diff --git a/.vib/thanos/queryfrontend/cypress/cypress/support/index.js b/.vib/thanos/cypress/cypress/support/index.js similarity index 100% rename from .vib/thanos/queryfrontend/cypress/cypress/support/index.js rename to .vib/thanos/cypress/cypress/support/index.js diff --git a/.vib/thanos/queryfrontend/cypress/cypress.json b/.vib/thanos/queryfrontend/cypress/cypress.json deleted file mode 100644 index 8184308823..0000000000 --- a/.vib/thanos/queryfrontend/cypress/cypress.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "baseUrl": "http://localhost/", - "defaultCommandTimeout": 40000 -} diff --git a/.vib/thanos/queryfrontend/cypress/cypress/integration/thanos_queryfrontend_spec.js b/.vib/thanos/queryfrontend/cypress/cypress/integration/thanos_queryfrontend_spec.js deleted file mode 100644 index 4ae8e34e63..0000000000 --- a/.vib/thanos/queryfrontend/cypress/cypress/integration/thanos_queryfrontend_spec.js +++ /dev/null @@ -1,42 +0,0 @@ -/// - -it('allows to see runtime & build information', () => { - cy.visit('/'); - cy.contains('.dropdown-toggle', 'Status').click(); - cy.contains('[class="dropdown-item"]', 'Runtime & Build Information').click(); - cy.contains('Runtime Information'); - cy.contains('h2', 'Build Information'); - - cy.contains('.capitalize-title', 'version').siblings().should('not.be.empty'); //check if there is value for app and Go Version - cy.contains('.capitalize-title', 'goVersion') - .siblings() - .should('not.be.empty'); -}); - -it('allows the execution of a query', () => { - const QUERY_ALERT = 'No data queried yet'; - const QUERY_KEYWORD = 'vector'; - const QUERY_VALUE = '3000'; - - cy.visit('/graph'); - cy.contains('.alert', QUERY_ALERT); - cy.get('.cm-line') - .type(QUERY_KEYWORD, '{enter}') - .type(`(${QUERY_VALUE})`) - .click(); - cy.get('.execute-btn').click(); - cy.contains('.tab-content', QUERY_VALUE); -}); - -it('allows listing all installed stores', () => { - cy.visit('/'); - cy.contains('[class="nav-link"]', 'Stores').click(); - cy.get('[data-testid="endpoint"]').should('not.be.empty'); - cy.get('[data-testid="health"]').contains('UP'); -}); - -it('allows adding a graph', () => { - cy.visit('/'); - cy.contains('button', 'Add Panel').click(); - cy.get('.execute-btn').should('have.length', 2); -}); diff --git a/.vib/thanos/vib-publish.json b/.vib/thanos/vib-publish.json index ebd641ac2f..ed0843c516 100644 --- a/.vib/thanos/vib-publish.json +++ b/.vib/thanos/vib-publish.json @@ -22,7 +22,7 @@ "url": "{SHA_ARCHIVE}", "path": "/bitnami/thanos" }, - "runtime_parameters": "b2Jqc3RvcmVDb25maWc6IHwtCiAgdHlwZTogRklMRVNZU1RFTQogIGNvbmZpZzoKICAgIGRpcmVjdG9yeTogIi8iCgpxdWVyeUZyb250ZW5kOgogIGVuYWJsZWQ6IHRydWUKICBzZXJ2aWNlOgogICAgdHlwZTogTG9hZEJhbGFuY2VyCiAgICBwb3J0czoKICAgICAgaHR0cDogODAKCnN0b3JlZ2F0ZXdheToKICBlbmFibGVkOiB0cnVlCg==", + "runtime_parameters": "b2Jqc3RvcmVDb25maWc6IHwtCiAgdHlwZTogczMKICBjb25maWc6CiAgICBidWNrZXQ6IHRoYW5vcy10ZXN0CiAgICBlbmRwb2ludDoge3sgaW5jbHVkZSAidGhhbm9zLm1pbmlvLmZ1bGxuYW1lIiAuIH19Lnt7IC5SZWxlYXNlLk5hbWVzcGFjZSB9fS5zdmMuY2x1c3Rlci5sb2NhbDo5MDAwCiAgICBhY2Nlc3Nfa2V5OiBtaW5pby12aWIKICAgIHNlY3JldF9rZXk6IG1pbmlvMTIzCiAgICBpbnNlY3VyZTogdHJ1ZQptaW5pbzoKICBlbmFibGVkOiB0cnVlCiAgYXV0aDoKICAgIHJvb3RVc2VyOiAibWluaW8tdmliIgogICAgcm9vdFBhc3N3b3JkOiAibWluaW8xMjMiCiAgZGVmYXVsdEJ1Y2tldHM6ICJ0aGFub3MtdGVzdCIKICBzZXJ2aWNlOgogICAgcG9ydHM6CiAgICAgIGFwaTogOTAwMApxdWVyeToKICBlbmFibGVkOiB0cnVlCnF1ZXJ5RnJvbnRlbmQ6CiAgZW5hYmxlZDogdHJ1ZQogIHNlcnZpY2U6CiAgICB0eXBlOiBMb2FkQmFsYW5jZXIKICAgIHBvcnRzOgogICAgICBodHRwOiA4MApidWNrZXR3ZWI6CiAgZW5hYmxlZDogdHJ1ZQpzdG9yZWdhdGV3YXk6CiAgZW5hYmxlZDogdHJ1ZQogIHNlcnZpY2U6CiAgICBwb3J0czoKICAgICAgZ3JwYzogMTA5MDMKcmVjZWl2ZToKICBlbmFibGVkOiB0cnVlCiAgc2VydmljZToKICAgIHBvcnRzOgogICAgICBncnBjOiAxMDkwNA==", "target_platform": { "target_platform_id": "{VIB_ENV_TARGET_PLATFORM}", "size": { @@ -42,10 +42,14 @@ "action_id": "cypress", "params": { "resources": { - "path": "/.vib/thanos/queryfrontend/cypress" + "path": "/.vib/thanos/cypress" }, "endpoint": "lb-thanos-query-frontend-http", - "app_protocol": "HTTP" + "app_protocol": "HTTP", + "env": { + "storePort": "10903", + "receivePort": "10904" + } } } ] diff --git a/.vib/thanos/vib-verify.json b/.vib/thanos/vib-verify.json index c8c44228cc..d444e697c6 100644 --- a/.vib/thanos/vib-verify.json +++ b/.vib/thanos/vib-verify.json @@ -22,7 +22,7 @@ "url": "{SHA_ARCHIVE}", "path": "/b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YzogMTA5MDMKcmVjZWl2ZToKICBlbmFibGVkOiB0cnVlCiAgc2VydmljZToKICAgIHBvcnRzOgogICAgICBncnBjOiAxMDkwNA==", "target_platform": { "target_platform_id": "{VIB_ENV_TARGET_PLATFORM}", "size": { @@ -42,10 +42,14 @@ "action_id": "cypress", "params": { "resources": { - "path": "/.vib/thanos/queryfrontend/cypress" + "path": "/.vib/thanos/cypress" }, "endpoint": "lb-thanos-query-frontend-http", - "app_protocol": "HTTP" + "app_protocol": "HTTP", + "env": { + "storePort": "10903", + "receivePort": "10904" + } } } ] diff --git a/bitnami/thanos/README.md b/bitnami/thanos/README.md index 692ed34227..56ee4dc192 100644 --- a/bitnami/thanos/README.md +++ b/bitnami/thanos/README.md @@ -1316,7 +1316,7 @@ objstoreConfig: |- type: s3 config: bucket: thanos - endpoint: {{ include "thanos.minio.fullname" . }}.monitoring.svc.cluster.local:9000 + endpoint: {{ include "thanos.minio.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:9000 access_key: minio secret_key: minio123 insecure: true @@ -1347,7 +1347,7 @@ metrics: minio: enabled: true auth: - rootUser: "admin" + rootUser: "minio" rootPassword: "minio123" defaultBuckets: "thanos" ``` @@ -1630,4 +1630,4 @@ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file +limitations under the License.