-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bitnami/kube-arangodb] feat: 🎉 Add chart (#32153)
* [bitnami/kube-arangodb] feat: 🎉 Add chart Signed-off-by: Javier J. Salmerón García <[email protected]> * Update CHANGELOG.md Signed-off-by: Bitnami Containers <[email protected]> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <[email protected]> * fix: 🚨 Add missing license header Signed-off-by: Javier J. Salmerón García <[email protected]> * docs: 📝 Update notes Signed-off-by: Javier J. Salmerón García <[email protected]> * fix: 🐛 Set proper kube-arangodb path Signed-off-by: Javier J. Salmerón García <[email protected]> * chore: 🔧 Temporarily disable cypress tests Signed-off-by: Javier J. Salmerón García <[email protected]> * test: ✅ Improve test Signed-off-by: Javier J. Salmerón García <[email protected]> * test: ✅ Ensure that the state_color is green Signed-off-by: Javier J. Salmerón García <[email protected]> * test: ✅ Ensure that the state_color is green Signed-off-by: Javier J. Salmerón García <[email protected]> * chore: 💡 Improve comment Signed-off-by: Javier J. Salmerón García <[email protected]> * Update tests Signed-off-by: Javier J. Salmerón García <[email protected]> * chore: ♻️ Apply suggestions from code review Signed-off-by: Javier J. Salmerón García <[email protected]> * chore: ⏪ Revert change Signed-off-by: Javier J. Salmerón García <[email protected]> * Apply suggestions from code review Co-authored-by: Juan Ariza Toledano <[email protected]> Signed-off-by: Javier J. Salmerón García <[email protected]> * Update CHANGELOG.md Signed-off-by: Bitnami Containers <[email protected]> * chore: ♻️ Apply suggestions from code review Co-authored-by: Juan Ariza Toledano <[email protected]> Signed-off-by: Javier J. Salmerón García <[email protected]> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <[email protected]> --------- Signed-off-by: Javier J. Salmerón García <[email protected]> Signed-off-by: Bitnami Containers <[email protected]> Co-authored-by: Bitnami Containers <[email protected]> Co-authored-by: Juan Ariza Toledano <[email protected]>
- Loading branch information
1 parent
995d66a
commit cb334b2
Showing
103 changed files
with
5,186 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
env: { | ||
username: 'vib-user', | ||
password: 'ComplicatedPassword123!4', | ||
}, | ||
defaultCommandTimeout: 30000, | ||
e2e: { | ||
setupNodeEvents(on, config) {}, | ||
baseUrl: 'https://localhost', | ||
}, | ||
} |
48 changes: 48 additions & 0 deletions
48
.vib/kube-arangodb/cypress/cypress/e2e/kube-arangodb.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright Broadcom, Inc. All Rights Reserved. | ||
* SPDX-License-Identifier: APACHE-2.0 | ||
*/ | ||
|
||
/// <reference types="cypress" /> | ||
|
||
it('Can access the API and get the deployed Arango Database status', () => { | ||
let token; | ||
// /login returns an API token so we can access | ||
// other API endpoints | ||
cy.request({ | ||
method: 'POST', | ||
url: '/login', | ||
body: { | ||
username: Cypress.env('username'), | ||
password: Cypress.env('password'), | ||
}, | ||
}).then((response) => { | ||
expect(response.status).to.eq(200); | ||
token = response.body.token; | ||
}).then(() => { | ||
// In order to avoid a race condition, we wait 60 seconds to ensure that the | ||
// Arango database is fully deployed and available | ||
cy.wait(60000); | ||
cy.request({ | ||
method: 'GET', | ||
url: '/api/deployment', | ||
headers: { | ||
'Authorization': `Bearer ${token}`, | ||
}, | ||
}).then((apiResponse) => { | ||
expect(apiResponse.status).to.eq(200); | ||
if (apiResponse.body.deployments[0]) { | ||
cy.fixture('deployments').then((d) => { | ||
// This is a sample output of /api/deployment | ||
// {"deployments":[{"name":"vib-arangodb","namespace":"test","mode":"Single","environment":"Development", | ||
// "state_color":"green","pod_count":1,"ready_pod_count":1,"volume_count":1,"ready_volume_count":1, | ||
// "storage_classes":[""],"database_url":"","database_version":"3.11.13","database_license":"community"}]} | ||
// | ||
// We will check that the name is correct and the status is green | ||
expect(apiResponse.body.deployments[0].name).to.eq(d.deployment.name); | ||
expect(apiResponse.body.deployments[0].state_color).to.eq(d.deployment.status); | ||
}); | ||
} | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"deployment": { | ||
"name": "vib-arangodb", | ||
"status": "green" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright Broadcom, Inc. All Rights Reserved. | ||
* SPDX-License-Identifier: APACHE-2.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); | ||
}); | ||
}); | ||
} | ||
|
||
Cypress.on('uncaught:exception', (err, runnable, promise) => { | ||
// when the exception originated from an unhandled promise | ||
// rejection, the promise is provided as a third argument | ||
// you can turn off failing the test in this case | ||
if (promise) { | ||
return false | ||
} | ||
// we still want to ensure there are no other unexpected | ||
// errors, so we let them fail the test | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Copyright Broadcom, Inc. All Rights Reserved. | ||
# SPDX-License-Identifier: APACHE-2.0 | ||
|
||
http: | ||
https://kube-arangodb:{{ .Vars.service.ports.apiHttp }}/health: | ||
status: 200 | ||
allow-insecure: true | ||
https://127.0.0.1:{{ .Vars.containerPorts.apiHttp }}/health: | ||
status: 200 | ||
allow-insecure: true | ||
https://kube-arangodb-webhook:{{ .Vars.webhooks.service.ports.webhook }}/health: | ||
status: 200 | ||
allow-insecure: true | ||
https://127.0.0.1:{{ .Vars.webhooks.containerPorts.webhook }}/health: | ||
status: 200 | ||
allow-insecure: true | ||
https://kube-arangodb:{{ .Vars.service.ports.server }}/metrics: | ||
status: 200 | ||
allow-insecure: true | ||
body: | ||
- /arangodb_operator_kubernetes_client_requests/ | ||
https://127.0.0.1:{{ .Vars.containerPorts.server }}/metrics: | ||
status: 200 | ||
allow-insecure: true | ||
body: | ||
- /arangodb_operator_kubernetes_client_requests/ | ||
addr: | ||
# Container ports | ||
tcp://kube-arangodb:{{ .Vars.service.ports.apiGrpc }}: | ||
reachable: true | ||
timeout: 180000 | ||
tcp://127.0.0.1:{{ .Vars.containerPorts.apiGrpc }}: | ||
reachable: true | ||
timeout: 180000 | ||
|
||
command: | ||
{{- $uid := .Vars.containerSecurityContext.runAsUser }} | ||
{{- $gid := .Vars.podSecurityContext.fsGroup }} | ||
check-user-info: | ||
# The UID and GID should always be either the one specified as vars (always a bigger number that the default) | ||
# or the one randomly defined by openshift (larger values). Otherwise, the chart is still using the default value. | ||
exec: if [ $(id -u) -lt {{ $uid }} ] || [ $(id -G | awk '{print $2}') -lt {{ $gid }} ]; then exit 1; fi | ||
exit-status: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
containerPorts: | ||
server: 9023 | ||
apiHttp: 9024 | ||
apiGrpc: 9025 | ||
service: | ||
type: LoadBalancer | ||
ports: | ||
server: 443 | ||
apiHttp: 9628 | ||
apiGrpc: 9728 | ||
auth: | ||
username: vib-user | ||
password: "ComplicatedPassword123!4" | ||
serviceAccount: | ||
create: true | ||
automountServiceAccountToken: true | ||
containerSecurityContext: | ||
enabled: true | ||
runAsUser: 1002 | ||
runAsGroup: 1002 | ||
podSecurityContext: | ||
fsGroup: 1002 | ||
metrics: | ||
enabled: true | ||
extraVolumes: | ||
- name: empty-dir | ||
emptyDir: {} | ||
extraVolumeMounts: | ||
- name: empty-dir | ||
mountPath: /tmp | ||
webhooks: | ||
containerPorts: | ||
webhook: 9999 | ||
service: | ||
ports: | ||
webhook: 4443 | ||
extraDeploy: | ||
- | | ||
apiVersion: "database.arangodb.com/v1" | ||
kind: "ArangoDeployment" | ||
metadata: | ||
name: "vib-arangodb" | ||
spec: | ||
{{- include "kube-arangodb.imagePullSecrets" . | nindent 2 }} | ||
mode: Single |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"phases": { | ||
"package": { | ||
"context": { | ||
"credentials": [ | ||
{ | ||
"url": "{VIB_ENV_CHARTS_REGISTRY}", | ||
"authn": { | ||
"username": "{VIB_ENV_CHARTS_REGISTRY_USERNAME}", | ||
"password": "{VIB_ENV_CHARTS_REGISTRY_PASSWORD}" | ||
} | ||
} | ||
], | ||
"resources": { | ||
"url": "{SHA_ARCHIVE}", | ||
"path": "/bitnami/kube-arangodb" | ||
} | ||
}, | ||
"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}" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"phases": { | ||
"package": { | ||
"context": { | ||
"credentials": [ | ||
{ | ||
"url": "{VIB_ENV_CHARTS_REGISTRY}", | ||
"authn": { | ||
"username": "{VIB_ENV_CHARTS_REGISTRY_USERNAME}", | ||
"password": "{VIB_ENV_CHARTS_REGISTRY_PASSWORD}" | ||
} | ||
} | ||
], | ||
"resources": { | ||
"url": "{SHA_ARCHIVE}", | ||
"path": "/bitnami/kube-arangodb" | ||
} | ||
}, | ||
"actions": [ | ||
{ | ||
"action_id": "helm-package" | ||
}, | ||
{ | ||
"action_id": "helm-lint" | ||
} | ||
] | ||
}, | ||
"verify": { | ||
"context": { | ||
"resources": { | ||
"url": "{SHA_ARCHIVE}", | ||
"path": "/bitnami/kube-arangodb" | ||
}, | ||
"target_platform": { | ||
"target_platform_id": "{VIB_ENV_TARGET_PLATFORM}", | ||
"size": { | ||
"name": "M4" | ||
} | ||
} | ||
}, | ||
"actions": [ | ||
{ | ||
"action_id": "goss", | ||
"params": { | ||
"resources": { | ||
"path": "/.vib" | ||
}, | ||
"tests_file": "kube-arangodb/goss/goss.yaml", | ||
"vars_file": "kube-arangodb/runtime-parameters.yaml", | ||
"remote": { | ||
"pod": { | ||
"workload": "deploy-kube-arangodb" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"action_id": "cypress", | ||
"params": { | ||
"resources": { | ||
"path": "/.vib/kube-arangodb/cypress" | ||
}, | ||
"env": { | ||
"username": "vib-user", | ||
"password": "ComplicatedPassword123!4" | ||
}, | ||
"endpoint": "lb-kube-arangodb-https-server", | ||
"app_protocol": "HTTPS" | ||
} | ||
}, | ||
{ | ||
"action_id": "kubescape", | ||
"params": { | ||
"threshold": {VIB_ENV_KUBESCAPE_SCORE_THRESHOLD} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
# img folder | ||
img/ | ||
# Changelog | ||
CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Changelog | ||
|
||
## 0.1.0 (2025-02-26) | ||
|
||
* [bitnami/kube-arangodb] feat: :tada: Add chart ([#32153](https://github.com/bitnami/charts/pull/32153)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: common | ||
repository: oci://registry-1.docker.io/bitnamicharts | ||
version: 2.30.0 | ||
digest: sha256:46afdf79eae69065904d430f03f7e5b79a148afed20aa45ee83ba88adc036169 | ||
generated: "2025-02-20T12:51:46.893084713+01:00" |
Oops, something went wrong.