[bitnami/neo4j] Add chart (#27616)

* [bitnami/neo4j] Add chart

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Add support for readOnlyRootFilesystem, use development image

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Remove serviceMonitor

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Add VIB tests and image improvements

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Add neo4j host

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Update chart

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Fix values metadata

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Fix test inputs

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Add TLS support

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Change readiness

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Update README metadata

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Update test service ports

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Add goss https test

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Fix goss vars file

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Update dev image

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Increase timeout

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Change bolt port

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Use bitnami/neo4j:5.20.0-debian-12-r2

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Modify TLS secrets

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Add ingress-tls-secret.yaml

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

---------

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
Miguel Ruiz
2024-07-04 13:49:18 +02:00
committed by GitHub
parent b37b9ef02e
commit e74b9ca8c8
32 changed files with 2683 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
module.exports = {
pageLoadTimeout: 240000,
defaultCommandTimeout: 60000,
env: {
username: 'neo4j',
password: 'ComplicatedPassword123!4',
},
hosts: {
'bitnami-neo4j.my': '{{ TARGET_IP }}',
},
e2e: {
setupNodeEvents(on, config) {},
},
}

View File

@@ -0,0 +1,28 @@
/*
* Copyright Broadcom, Inc. All Rights Reserved.
* SPDX-License-Identifier: APACHE-2.0
*/
/// <reference types="cypress" />
import { random } from '../support/utils';
it('allows running the movie-graph test', () => {
cy.login();
cy.get('div#monaco-main-editor').type(':play movie-graph{enter}');
cy.wait(1000);
cy.get('button[data-testid="nextSlide"]').click();
cy.wait(1000);
cy.get('pre[class*="runnable"]').click();
cy.get('div#monaco-main-editor').type('{ctrl}{enter}');
cy.get('g[class*="node"]');
});
it('allows to create a user', () => {
cy.login();
cy.fixture('users').then((users) => {
cy.get('div#monaco-main-editor').type(`CREATE USER ${users.newUser.username}${random} IF NOT EXISTS SET PLAINTEXT PASSWORD '${users.newUser.password}'{enter}`);
cy.contains('1 system update');
cy.get('div#monaco-main-editor').type(`SHOW USERS{enter}`);
cy.contains('td', `${users.newUser.username}${random}`);
});
});

View File

@@ -0,0 +1,6 @@
{
"newUser": {
"username": "user",
"password": "someComplicatedPass12345!"
}
}

View File

@@ -0,0 +1,36 @@
/*
* Copyright Broadcom, Inc. All Rights Reserved.
* SPDX-License-Identifier: APACHE-2.0
*/
const COMMAND_DELAY = 2000;
const BASE_URL = 'http://bitnami-neo4j.my';
for (const command of ['click']) {
Cypress.Commands.overwrite(command, (originalFn, ...args) => {
const origVal = originalFn(...args);
return new Promise((resolve) => {
setTimeout(() => {
resolve(origVal);
}, COMMAND_DELAY);
});
});
}
Cypress.Commands.overwrite('visit', (originalFn, url, options) => {
return originalFn(`${BASE_URL}${url}`, options);
});
Cypress.Commands.add(
'login',
(username = Cypress.env('username'), password = Cypress.env('password')) => {
cy.visit('/');
cy.get('form').should('exist').and('be.visible'); // Needed to ensure stability of the test
cy.get('input[data-testid="username"]').type(username);
cy.get('input[type="password"]').type(password);
cy.contains('button', 'Connect').click();
// This may take a while
cy.contains('You are connected as user', {timeout: 240000});
}
);

View File

@@ -0,0 +1,25 @@
/*
* Copyright Broadcom, Inc. All Rights Reserved.
* SPDX-License-Identifier: APACHE-2.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')

View File

@@ -0,0 +1,8 @@
/*
* Copyright Broadcom, Inc. All Rights Reserved.
* SPDX-License-Identifier: APACHE-2.0
*/
/// <reference types="cypress" />
export let random = (Math.random() + 1).toString(36).substring(7);

26
.vib/neo4j/goss/goss.yaml Normal file
View File

@@ -0,0 +1,26 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
http:
http://neo4j:{{ .Vars.service.ports.http }}:
status: 200
body:
- /neo4j_version/
https://neo4j:{{ .Vars.service.ports.https }}:
status: 200
allow-insecure: true
body:
- /neo4j_version/
addr:
tcp://neo4j:{{ .Vars.service.ports.bolt }}:
reachable: true
timeout: 500
file:
/opt/bitnami/neo4j/conf/neo4j.conf:
mode: "0644"
filetype: file
exists: true
/opt/bitnami/neo4j/conf/apoc.conf:
mode: "0644"
filetype: file
exists: true

View File

@@ -0,0 +1,24 @@
advertisedHost: bitnami-neo4j.my
auth:
password: ComplicatedPassword123!4
tls:
https:
enabled: true
autoGenerated: true
containerPorts:
http: 7475
https: 7476
bolt: 7688
service:
ports:
http: 80
https: 8443
bolt: 443
type: LoadBalancer
podSecurityContext:
enabled: true
fsGroup: 1002
containerSecurityContext:
enabled: true
runAsUser: 1002
runAsGroup: 1002

View File

@@ -0,0 +1,38 @@
{
"phases": {
"package": {
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "/bitnami/neo4j"
}
},
"actions": [
{
"action_id": "helm-package"
},
{
"action_id": "helm-lint"
}
]
},
"publish": {
"actions": [
{
"action_id": "helm-publish",
"params": {
"repository": {
"kind": "S3",
"url": "{VIB_ENV_S3_URL}",
"authn": {
"access_key_id": "{VIB_ENV_S3_ACCESS_KEY_ID}",
"secret_access_key": "{VIB_ENV_S3_SECRET_ACCESS_KEY}",
"role": "{VIB_ENV_S3_ROLE_ARN}"
}
}
}
}
]
}
}
}

View File

@@ -0,0 +1,65 @@
{
"phases": {
"package": {
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "/bitnami/neo4j"
}
},
"actions": [
{
"action_id": "helm-package"
},
{
"action_id": "helm-lint"
}
]
},
"verify": {
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "/bitnami/neo4j"
},
"target_platform": {
"target_platform_id": "{VIB_ENV_TARGET_PLATFORM}",
"size": {
"name": "S4"
}
}
},
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "neo4j/goss/goss.yaml",
"vars_file": "neo4j/runtime-parameters.yaml",
"remote": {
"pod": {
"workload": "sts-neo4j"
}
}
}
},
{
"action_id": "cypress",
"params": {
"resources": {
"path": "/.vib/neo4j/cypress"
},
"endpoint": "lb-neo4j-http",
"app_protocol": "HTTP",
"env": {
"username": "neo4j",
"password": "ComplicatedPassword123!4"
}
}
}
]
}
}
}