Audit-Armada-App refactoring
This update changes the auditd daemon start command to use the "no fork" option. Also the auditd start command will be wrapped in a shell script that will be called in the container. Other changes include renaming the armada app and the helm charts to "auditd". Renaming has been applied to all the applicable configuration. Story: 2008849 Task: 42691 Signed-off-by: Carmen Rata <carmen.rata@windriver.com> Change-Id: I8cf0659f820bc3968c69fa981cfc6342d5571a7c
This commit is contained in:
parent
3235ba3182
commit
3bfaf3ee6a
@ -4,4 +4,6 @@ RUN yum -y update
|
||||
RUN yum -y install\
|
||||
audit
|
||||
|
||||
ENTRYPOINT ["/sbin/auditd", "-f", "-l"]
|
||||
COPY startAuditd.sh .
|
||||
RUN chmod 755 startAuditd.sh
|
||||
ENTRYPOINT ["./startAuditd.sh"]
|
22
stx-audit-helm/centos/docker/stx-audit/startAuditd.sh
Normal file
22
stx-audit-helm/centos/docker/stx-audit/startAuditd.sh
Normal file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# Copyright (c) 2021 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
set -u
|
||||
|
||||
echo "Starting auditd …"
|
||||
|
||||
# start auditd with no fork to run in the background in the container
|
||||
/sbin/auditd -n -l
|
||||
EXIT_STATUS=$?
|
||||
|
||||
if [ "$EXIT_STATUS" -ne "0" ]; then
|
||||
echo "Error code: $EXIT_STATUS"
|
||||
echo "Could not start auditd" >&2
|
||||
fi
|
||||
|
||||
exit ${EXIT_STATUS}
|
@ -1,5 +1,5 @@
|
||||
# Application tunables (maps to metadata)
|
||||
%global app_name audit
|
||||
%global app_name auditd
|
||||
%global helm_repo stx-platform
|
||||
|
||||
%global armada_folder /usr/lib/armada
|
||||
@ -11,7 +11,7 @@
|
||||
%global helm_folder /usr/lib/helm
|
||||
%global toolkit_version 0.1.0
|
||||
|
||||
Summary: StarlingX AUDIT Armada Helm Charts
|
||||
Summary: StarlingX AUDITD Armada Helm Charts
|
||||
Name: stx-audit-helm
|
||||
Version: 1.0
|
||||
Release: %{tis_patch_ver}%{?_tis_dist}
|
||||
@ -27,7 +27,7 @@ BuildArch: noarch
|
||||
BuildRequires: helm
|
||||
|
||||
%description
|
||||
StarlingX AUDIT Helm Charts
|
||||
StarlingX AUDITD Helm Charts
|
||||
|
||||
%prep
|
||||
%setup -n %{name}-%{version}
|
||||
|
@ -1,5 +1,5 @@
|
||||
apiVersion: v2
|
||||
appVersion: "1.0"
|
||||
description: A Helm chart for AUDIT service
|
||||
name: audit
|
||||
description: A Helm chart for AUDITD service
|
||||
name: auditd
|
||||
version: 1.0.0
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# This file controls the configuration of the audit daemon
|
||||
# This file controls the configuration of the auditd daemon
|
||||
#
|
||||
local_events = yes
|
||||
write_logs = yes
|
||||
|
@ -1,4 +1,4 @@
|
||||
1. AUDIT containerized deployment
|
||||
1. AUDITD containerized deployment
|
||||
This helm charts configuration creates:
|
||||
- Config map for /etc/audit/auditd.conf
|
||||
- Deploys auditd in a container
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Default values for audit.
|
||||
# Default values for auditd.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
|
@ -2,14 +2,14 @@
|
||||
schema: armada/Chart/v1
|
||||
metadata:
|
||||
schema: metadata/Document/v1
|
||||
name: audit
|
||||
name: auditd
|
||||
data:
|
||||
chart_name: audit
|
||||
release: audit
|
||||
chart_name: auditd
|
||||
release: auditd
|
||||
namespace: kube-system
|
||||
source:
|
||||
location: http://172.17.0.1:8080/helm_charts/stx-platform/audit-1.0.0.tgz
|
||||
subpath: audit
|
||||
location: http://172.17.0.1:8080/helm_charts/stx-platform/auditd-1.0.0.tgz
|
||||
subpath: auditd
|
||||
type: tar
|
||||
reference: master
|
||||
wait:
|
||||
@ -22,24 +22,24 @@ data:
|
||||
delete:
|
||||
- type: job
|
||||
labels:
|
||||
app: audit
|
||||
app: auditd
|
||||
dependencies: []
|
||||
---
|
||||
schema: armada/ChartGroup/v1
|
||||
metadata:
|
||||
schema: metadata/Document/v1
|
||||
name: audit
|
||||
name: auditd
|
||||
data:
|
||||
description: "StarlingX AUDIT"
|
||||
description: "StarlingX AUDITD"
|
||||
sequenced: false
|
||||
chart_group:
|
||||
- audit
|
||||
- auditd
|
||||
---
|
||||
schema: armada/Manifest/v1
|
||||
metadata:
|
||||
schema: metadata/Document/v1
|
||||
name: audit-manifest
|
||||
name: auditd-manifest
|
||||
data:
|
||||
release_prefix: ns
|
||||
chart_groups:
|
||||
- audit
|
||||
- auditd
|
Loading…
x
Reference in New Issue
Block a user