mirror of
https://github.com/bitnami/containers.git
synced 2026-02-10 21:27:26 +08:00
[bitnami/{cilium|cilium-operator}] Add VIB basic tests (#67017)
This commit is contained in:
committed by
GitHub
parent
de25f20626
commit
b3b4e874cc
12
.vib/cilium-operator/cilium/goss/cilium-operator.yaml
Normal file
12
.vib/cilium-operator/cilium/goss/cilium-operator.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
command:
|
||||
check-app-version:
|
||||
exec: cilium-operator-generic version | grep "$(echo $APP_VERSION | sed -E 's|([0-9]+\.[0-9]+)\.0$|\1|g')"
|
||||
exit-status: 0
|
||||
check-cilium-operator-help:
|
||||
exec: cilium-operator-generic help
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "Usage"
|
||||
13
.vib/cilium-operator/cilium/goss/goss.yaml
Normal file
13
.vib/cilium-operator/cilium/goss/goss.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../cilium/goss/cilium-operator.yaml: {}
|
||||
# Load scripts from .vib/common/goss/templates
|
||||
../../common/goss/templates/check-binaries.yaml: {}
|
||||
../../common/goss/templates/check-broken-symlinks.yaml: {}
|
||||
../../common/goss/templates/check-ca-certs.yaml: {}
|
||||
../../common/goss/templates/check-linked-libraries.yaml: {}
|
||||
../../common/goss/templates/check-sed-in-place.yaml: {}
|
||||
../../common/goss/templates/check-spdx.yaml: {}
|
||||
8
.vib/cilium-operator/cilium/goss/vars.yaml
Normal file
8
.vib/cilium-operator/cilium/goss/vars.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
binaries:
|
||||
- cilium-operator-aws
|
||||
- cilium-operator-azure
|
||||
- cilium-operator-generic
|
||||
root_dir: /opt/bitnami
|
||||
directories:
|
||||
- paths:
|
||||
- /opt/bitnami/cilium-operator
|
||||
73
.vib/cilium-operator/cilium/vib-verify.json
Normal file
73
.vib/cilium-operator/cilium/vib-verify.json
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"context": {
|
||||
"resources": {
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "container-image-package",
|
||||
"params": {
|
||||
"application": {
|
||||
"details": {
|
||||
"name": "{VIB_ENV_CONTAINER}",
|
||||
"tag": "{VIB_ENV_TAG}"
|
||||
}
|
||||
},
|
||||
"architectures": [
|
||||
"linux/amd64",
|
||||
"linux/arm64"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "container-image-lint",
|
||||
"params": {
|
||||
"threshold": "error"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"verify": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
"threshold": "LOW",
|
||||
"vuln_type": [
|
||||
"OS"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "grype",
|
||||
"params": {
|
||||
"threshold": "CRITICAL",
|
||||
"package_type": [
|
||||
"OS"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "cilium-operator/goss/goss.yaml",
|
||||
"vars_file": "cilium-operator/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-cilium-operator"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
12
.vib/cilium/goss/cilium.yaml
Normal file
12
.vib/cilium/goss/cilium.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
command:
|
||||
check-app-version:
|
||||
exec: cilium-dbg version | grep "$(echo $APP_VERSION | sed -E 's|([0-9]+\.[0-9]+)\.0$|\1|g')"
|
||||
exit-status: 0
|
||||
check-cilium-help:
|
||||
exec: cilium-dbg help
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "Usage"
|
||||
13
.vib/cilium/goss/goss.yaml
Normal file
13
.vib/cilium/goss/goss.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||
# SPDX-License-Identifier: APACHE-2.0
|
||||
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../cilium/goss/cilium.yaml: {}
|
||||
# Load scripts from .vib/common/goss/templates
|
||||
../../common/goss/templates/check-binaries.yaml: {}
|
||||
../../common/goss/templates/check-broken-symlinks.yaml: {}
|
||||
../../common/goss/templates/check-ca-certs.yaml: {}
|
||||
../../common/goss/templates/check-linked-libraries.yaml: {}
|
||||
../../common/goss/templates/check-sed-in-place.yaml: {}
|
||||
../../common/goss/templates/check-spdx.yaml: {}
|
||||
14
.vib/cilium/goss/vars.yaml
Normal file
14
.vib/cilium/goss/vars.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
binaries:
|
||||
- cilium
|
||||
- cilium-agent
|
||||
- cilium-bugtool
|
||||
- cilium-dbg
|
||||
- cilium-health
|
||||
- cilium-health-responder
|
||||
- cilium-mount
|
||||
- cilium-sysctlfix
|
||||
- loopback
|
||||
root_dir: /opt/bitnami
|
||||
directories:
|
||||
- paths:
|
||||
- /opt/bitnami/cilium
|
||||
73
.vib/cilium/vib-verify.json
Normal file
73
.vib/cilium/vib-verify.json
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"context": {
|
||||
"resources": {
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "{VIB_ENV_PATH}"
|
||||
},
|
||||
"runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd"
|
||||
},
|
||||
"phases": {
|
||||
"package": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "container-image-package",
|
||||
"params": {
|
||||
"application": {
|
||||
"details": {
|
||||
"name": "{VIB_ENV_CONTAINER}",
|
||||
"tag": "{VIB_ENV_TAG}"
|
||||
}
|
||||
},
|
||||
"architectures": [
|
||||
"linux/amd64",
|
||||
"linux/arm64"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "container-image-lint",
|
||||
"params": {
|
||||
"threshold": "error"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"verify": {
|
||||
"actions": [
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
"threshold": "LOW",
|
||||
"vuln_type": [
|
||||
"OS"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "grype",
|
||||
"params": {
|
||||
"threshold": "CRITICAL",
|
||||
"package_type": [
|
||||
"OS"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib"
|
||||
},
|
||||
"tests_file": "cilium/goss/goss.yaml",
|
||||
"vars_file": "cilium/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-cilium"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user