diff --git a/.vib/fluent-bit/goss/fluent-bit.yaml b/.vib/fluent-bit/goss/fluent-bit.yaml new file mode 100644 index 000000000000..2862b5836639 --- /dev/null +++ b/.vib/fluent-bit/goss/fluent-bit.yaml @@ -0,0 +1,21 @@ +command: + # The fluent-bit binary is compiled with the following options + check-compilation-flags: + exec: fluent-bit --help + exit-status: 0 + stdout: + - "FLB_HAVE_JEMALLOC" + - "FLB_HAVE_TLS" + - "FLB_HAVE_HTTP_SERVER" + - /^\s+kafka\s+Kafka/ + # The fluent-bit binary is compiled with the following options + check-dry-run: + exec: fluent-bit --dry-run + exit-status: 0 + stderr: + - "configuration test is successful" + check-daemon-mode: + exec: fluent-bit --daemon + exit-status: 0 + stderr: + - "switching to background mode" diff --git a/.vib/fluent-bit/goss/goss.yaml b/.vib/fluent-bit/goss/goss.yaml new file mode 100644 index 000000000000..f7e667433c17 --- /dev/null +++ b/.vib/fluent-bit/goss/goss.yaml @@ -0,0 +1,13 @@ +gossfile: + # Goss tests exclusive to the current container + ../../fluent-bit/goss/fluent-bit.yaml: {} + # Load scripts from .vib/common/goss/templates + ../../common/goss/templates/check-app-version.yaml: {} + ../../common/goss/templates/check-binaries.yaml: {} + ../../common/goss/templates/check-broken-symlinks.yaml: {} + ../../common/goss/templates/check-ca-certs.yaml: {} + ../../common/goss/templates/check-directories.yaml: {} + ../../common/goss/templates/check-files.yaml: {} + ../../common/goss/templates/check-linked-libraries.yaml: {} + ../../common/goss/templates/check-sed-in-place.yaml: {} + ../../common/goss/templates/check-spdx.yaml: {} diff --git a/.vib/fluent-bit/goss/vars.yaml b/.vib/fluent-bit/goss/vars.yaml new file mode 100644 index 000000000000..7f9809db62b4 --- /dev/null +++ b/.vib/fluent-bit/goss/vars.yaml @@ -0,0 +1,15 @@ +binaries: + - fluent-bit +files: + - paths: + - /opt/bitnami/fluent-bit/conf/fluent-bit.conf + - /opt/bitnami/fluent-bit/conf/parsers.conf + - /opt/bitnami/fluent-bit/conf/parsers_java.conf +directories: + - paths: + - /opt/bitnami/fluent-bit/conf + - /opt/bitnami/fluent-bit/log +root_dir: /opt/bitnami +version: + bin_name: fluent-bit + flag: --version diff --git a/.vib/fluent-bit/vib-publish.json b/.vib/fluent-bit/vib-publish.json index 8b6fe8eab4e6..08be2e2cc09f 100644 --- a/.vib/fluent-bit/vib-publish.json +++ b/.vib/fluent-bit/vib-publish.json @@ -3,7 +3,8 @@ "resources": { "url": "{VIB_ENV_CONTAINER_URL}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" }, "phases": { "package": { @@ -33,6 +34,21 @@ }, "verify": { "actions": [ + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "fluent-bit/goss/goss.yaml", + "vars_file": "fluent-bit/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-fluent-bit" + } + } + } + }, { "action_id": "trivy", "params": { diff --git a/.vib/fluent-bit/vib-verify.json b/.vib/fluent-bit/vib-verify.json index a34e8aee9161..de8e39eaf7f0 100644 --- a/.vib/fluent-bit/vib-verify.json +++ b/.vib/fluent-bit/vib-verify.json @@ -3,7 +3,8 @@ "resources": { "url": "{SHA_ARCHIVE}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" }, "phases": { "package": { @@ -29,6 +30,21 @@ }, "verify": { "actions": [ + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "fluent-bit/goss/goss.yaml", + "vars_file": "fluent-bit/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-fluent-bit" + } + } + } + }, { "action_id": "trivy", "params": {