Skip to content

Commit

Permalink
Merge pull request #256 from carlosmmatos/add-iar-container
Browse files Browse the repository at this point in the history
feat(container-sensor-pull): add IAR type
  • Loading branch information
redhatrises authored Jan 30, 2024
2 parents 15dc15b + 4ed3b27 commit 4572938
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion bash/containers/falcon-container-sensor-pull/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Help Options:
| `-c`, `--copy <REGISTRY/NAMESPACE>` | `$COPY` | `None` (Optional) | Registry you want to copy the sensor image to. Example: `myregistry.com/mynamespace` |
| `-v`, `--version <SENSOR_VERSION>` | `$SENSOR_VERSION` | `None` (Optional) | Specify sensor version to retrieve from the registry |
| `-p`, `--platform <SENSOR_PLATFORM>` | `$SENSOR_PLATFORM` | `None` (Optional) | Specify sensor platform to retrieve from the registry |
| `-t`, `--type <SENSOR_TYPE>` | `$SENSOR_TYPE` | `falcon-container` (Optional) | Specify which sensor to download [`falcon-container`, `falcon-sensor`, `falcon-kac`, `falcon-snapshot`, `kpagent`] ([see more details below](#sensor-types)) |
| `-t`, `--type <SENSOR_TYPE>` | `$SENSOR_TYPE` | `falcon-container` (Optional) | Specify which sensor to download [`falcon-container`, `falcon-sensor`, `falcon-kac`, `falcon-snapshot`, `falcon-imageanalyzer`, `kpagent`] ([see more details below](#sensor-types)) |
| `--runtime` | `$CONTAINER_TOOL` | `docker` (Optional) | Use a different container runtime [docker, podman, skopeo]. **Default is Docker**. |
| `--dump-credentials` | `$CREDS` | `False` (Optional) | Print registry credentials to stdout to copy/paste into container tools |
| `--get-image-path` | N/A | `None` | Get the full image path including the registry, repository, and latest tag for the specified `SENSOR_TYPE`. |
Expand All @@ -101,6 +101,7 @@ The following sensor types are available to download:
| `falcon-container` **(default)** | The Falcon Container sensor for Linux |
| `falcon-kac` | The Falcon Kubernetes Admission Controller |
| `falcon-snapshot` | The Falcon Snapshot scanner |
| `falcon-imageanalyzer` | The Falcon Image Assessment at Runtime |
| `kpagent` | The Falcon Kubernetes Protection Agent |

### Examples
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Optional Flags:
-c, --copy <REGISTRY/NAMESPACE> registry to copy image e.g. myregistry.com/mynamespace
-v, --version <SENSOR_VERSION> specify sensor version to retrieve from the registry
-p, --platform <SENSOR_PLATFORM> specify sensor platform to retrieve e.g x86_64, aarch64
-t, --type <SENSOR_TYPE> specify which sensor to download [falcon-container|falcon-sensor|falcon-kac|falcon-snapshot|kpagent]
-t, --type <SENSOR_TYPE> specify which sensor to download [falcon-container|falcon-sensor|falcon-kac|falcon-snapshot|falcon-imageanalyzer|kpagent]
Default is falcon-container.
--runtime use a different container runtime [docker, podman, skopeo]. Default is docker.
Expand Down Expand Up @@ -340,10 +340,10 @@ fi

# Check if SENSOR_TYPE is set to a valid value
case "${SENSOR_TYPE}" in
falcon-container | falcon-sensor | falcon-kac | falcon-snapshot | kpagent) ;;
falcon-container | falcon-sensor | falcon-kac | falcon-snapshot | falcon-imageanalyzer | kpagent) ;;
*) die """
Unrecognized sensor type: ${SENSOR_TYPE}
Valid values are [falcon-container|falcon-sensor|falcon-kac|falcon-snapshot|kpagent]""" ;;
Valid values are [falcon-container|falcon-sensor|falcon-kac|falcon-snapshot|falcon-imageanalyzer|kpagent]""" ;;
esac

#Check all mandatory variables set
Expand Down Expand Up @@ -445,6 +445,10 @@ elif [ "${SENSOR_TYPE}" = "falcon-snapshot" ]; then
IMAGE_NAME="cs-snapshotscanner"
repository_name="release/cs-snapshotscanner"
registry_type="snapshots"
elif [ "${SENSOR_TYPE}" = "falcon-imageanalyzer" ]; then
# overrides for Image Analyzer
IMAGE_NAME="falcon-imageanalyzer"
repository_name="release/falcon-imageanalyzer"
elif [ "${SENSOR_TYPE}" = "kpagent" ]; then
# overrides for KPA
ART_USERNAME="kp-$cs_falcon_cid"
Expand Down

0 comments on commit 4572938

Please sign in to comment.