Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 9: address failing tests in CI by fixing more references of vault to be openbao #11

Merged
merged 15 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion charts/openbao/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

apiVersion: v2
name: openbao
version: 0.3.0
version: 0.4.0
appVersion: v2.0.0-alpha20240329
kubeVersion: ">= 1.27.0-0"
description: Official OpenBao Chart
Expand All @@ -17,4 +17,5 @@ annotations:

maintainers:
- name: OpenBao
email: https://lists.lfedge.org/g/openbao
jessebot marked this conversation as resolved.
Show resolved Hide resolved
url: https://openbao.org
16 changes: 8 additions & 8 deletions charts/openbao/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# openbao

![Version: 0.3.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![AppVersion: v2.0.0-alpha20240329](https://img.shields.io/badge/AppVersion-v2.0.0--alpha20240329-informational?style=flat-square)
![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![AppVersion: v2.0.0-alpha20240329](https://img.shields.io/badge/AppVersion-v2.0.0--alpha20240329-informational?style=flat-square)

Official OpenBao Chart

**Homepage:** <https://github.com/openbao/openbao-helm>

## Maintainers

| Name | Email | Url |
|---------|------------------------------------|-----------------------|
| OpenBao | https://lists.lfedge.org/g/openbao | <https://openbao.org> |
| Name | Email | Url |
| ---- | ------ | --- |
| OpenBao | <https://lists.lfedge.org/g/openbao> | <https://openbao.org> |

## Source Code

Expand Down Expand Up @@ -171,12 +171,12 @@ Kubernetes: `>= 1.27.0-0`
| server.dev.devRootToken | string | `"root"` | |
| server.dev.enabled | bool | `false` | |
| server.enabled | string | `"-"` | |
| server.extraArgs | string | `""` | |
| server.extraArgs | string | `""` | extraArgs is a string containing additional Vault server arguments. |
| server.extraContainers | string | `nil` | |
| server.extraEnvironmentVars | object | `{}` | |
| server.extraInitContainers | string | `nil` | |
| server.extraInitContainers | list | `[]` | extraInitContainers is a list of init containers. Specified as a YAML list. This is useful if you need to run a script to provision TLS certificates or write out configuration files in a dynamic way. |
| server.extraLabels | object | `{}` | |
| server.extraPorts | string | `nil` | |
| server.extraPorts | list | `[]` | extraPorts is a list of extra ports. Specified as a YAML list. This is useful if you need to add additional ports to the statefulset in dynamic way. |
| server.extraSecretEnvironmentVars | list | `[]` | |
| server.extraVolumes | list | `[]` | |
| server.ha.apiAddr | string | `nil` | |
Expand Down Expand Up @@ -261,7 +261,7 @@ Kubernetes: `>= 1.27.0-0`
| server.serviceAccount.extraLabels | object | `{}` | |
| server.serviceAccount.name | string | `""` | |
| server.serviceAccount.serviceDiscovery.enabled | bool | `true` | |
| server.shareProcessNamespace | bool | `false` | |
| server.shareProcessNamespace | bool | `false` | shareProcessNamespace enables process namespace sharing between Vault and the extraContainers This is useful if Vault must be signaled, e.g. to send a SIGHUP for a log rotation |
| server.standalone.config | string | `"ui = true\n\nlistener \"tcp\" {\n tls_disable = 1\n address = \"[::]:8200\"\n cluster_address = \"[::]:8201\"\n # Enable unauthenticated metrics access (necessary for Prometheus Operator)\n #telemetry {\n # unauthenticated_metrics_access = \"true\"\n #}\n}\nstorage \"file\" {\n path = \"/vault/data\"\n}\n\n# Example configuration for using auto-unseal, using Google Cloud KMS. The\n# GKMS keys must already exist, and the cluster must have a service account\n# that is authorized to access GCP KMS.\n#seal \"gcpckms\" {\n# project = \"vault-helm-dev\"\n# region = \"global\"\n# key_ring = \"vault-helm-unseal-kr\"\n# crypto_key = \"vault-helm-unseal-key\"\n#}\n\n# Example configuration for enabling Prometheus metrics in your config.\n#telemetry {\n# prometheus_retention_time = \"30s\"\n# disable_hostname = true\n#}\n"` | |
| server.standalone.enabled | string | `"-"` | |
| server.statefulSet.annotations | object | `{}` | |
Expand Down
6 changes: 3 additions & 3 deletions charts/openbao/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,14 @@ for users looking to use this chart with Consul Helm.
{{- define "vault.args" -}}
{{ if or (eq .mode "standalone") (eq .mode "ha") }}
- |
cp /vault/config/extraconfig-from-values.hcl /tmp/storageconfig.hcl;
cp /openbao/config/extraconfig-from-values.hcl /tmp/storageconfig.hcl;
[ -n "${HOST_IP}" ] && sed -Ei "s|HOST_IP|${HOST_IP?}|g" /tmp/storageconfig.hcl;
[ -n "${POD_IP}" ] && sed -Ei "s|POD_IP|${POD_IP?}|g" /tmp/storageconfig.hcl;
[ -n "${HOSTNAME}" ] && sed -Ei "s|HOSTNAME|${HOSTNAME?}|g" /tmp/storageconfig.hcl;
[ -n "${API_ADDR}" ] && sed -Ei "s|API_ADDR|${API_ADDR?}|g" /tmp/storageconfig.hcl;
[ -n "${TRANSIT_ADDR}" ] && sed -Ei "s|TRANSIT_ADDR|${TRANSIT_ADDR?}|g" /tmp/storageconfig.hcl;
[ -n "${RAFT_ADDR}" ] && sed -Ei "s|RAFT_ADDR|${RAFT_ADDR?}|g" /tmp/storageconfig.hcl;
/usr/local/bin/docker-entrypoint.sh vault server -config=/tmp/storageconfig.hcl {{ .Values.server.extraArgs }}
/usr/local/bin/docker-entrypoint.sh bao server -config=/tmp/storageconfig.hcl {{ .Values.server.extraArgs }}
{{ else if eq .mode "dev" }}
- |
/usr/local/bin/docker-entrypoint.sh vault server -dev {{ .Values.server.extraArgs }}
Expand Down Expand Up @@ -1091,4 +1091,4 @@ config file from values
{{- end }}
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}
6 changes: 3 additions & 3 deletions charts/openbao/templates/tests/server-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ spec:
- /bin/sh
- -c
- |
echo "Checking for sealed info in 'vault status' output"
echo "Checking for sealed info in 'bao status' output"
ATTEMPTS=10
n=0
until [ "$n" -ge $ATTEMPTS ]
do
echo "Attempt" $n...
vault status -format yaml | grep -E '^sealed: (true|false)' && break
bao status -format yaml | grep -E '^sealed: (true|false)' && break
n=$((n+1))
sleep 5
done
if [ $n -ge $ATTEMPTS ]; then
echo "timed out looking for sealed info in 'vault status' output"
echo "timed out looking for sealed info in 'bao status' output"
exit 1
fi

Expand Down
12 changes: 6 additions & 6 deletions charts/openbao/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ server:
authDelegator:
enabled: true

# extraInitContainers is a list of init containers. Specified as a YAML list.
# -- extraInitContainers is a list of init containers. Specified as a YAML list.
# This is useful if you need to run a script to provision TLS certificates or
# write out configuration files in a dynamic way.
extraInitContainers: null
extraInitContainers: []
# # This example installs a plugin pulled from github into the /usr/local/libexec/vault/oauthapp folder,
# # which is defined in the volumes value.
# - name: oauthapp
Expand All @@ -499,16 +499,16 @@ server:
# extraContainers is a list of sidecar containers. Specified as a YAML list.
extraContainers: null

# shareProcessNamespace enables process namespace sharing between Vault and the extraContainers
# -- shareProcessNamespace enables process namespace sharing between Vault and the extraContainers
# This is useful if Vault must be signaled, e.g. to send a SIGHUP for a log rotation
shareProcessNamespace: false

# extraArgs is a string containing additional Vault server arguments.
# -- extraArgs is a string containing additional Vault server arguments.
extraArgs: ""

# extraPorts is a list of extra ports. Specified as a YAML list.
# -- extraPorts is a list of extra ports. Specified as a YAML list.
# This is useful if you need to add additional ports to the statefulset in dynamic way.
extraPorts: null
extraPorts: []
# - containerPort: 8300
# name: http-monitoring

Expand Down
4 changes: 2 additions & 2 deletions test/acceptance/_helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name_prefix() {

# chart_dir returns the directory for the chart
chart_dir() {
echo ${BATS_TEST_DIRNAME}/../..
echo ${BATS_TEST_DIRNAME}/../../charts/openbao
}

# helm_install installs the vault chart. This will source overridable
Expand Down Expand Up @@ -144,7 +144,7 @@ wait_for_complete_job() {
# string length.
kubectl get job $1 -o json | \
jq -r 'select(
.status.succeeded == 1
.status.succeeded == 1
) | .metadata.namespace + "/" + .metadata.name'
}

Expand Down
Loading