From d413fe29ead8e0ee6dd9d03ab60c5331006cad53 Mon Sep 17 00:00:00 2001 From: Carmen Rata Date: Tue, 15 Jun 2021 23:25:02 -0400 Subject: [PATCH] Update audit container image tag in charts Update the docker image tag in values.yaml as part of helm charts configuration. Also updated Dockerfile and added yamllint configuration. Story: 2008849 Task: 42619 Signed-off-by: Carmen Rata Change-Id: I257c8715258498020c518d795e21fd3f862c676a --- config | 12 ------------ stx-audit-helm/centos/docker/stx-audit/Dockerfile | 2 +- stx-audit-helm/centos/stx-audit-helm.spec | 4 ---- stx-audit-helm/stx-audit-helm/files/metadata.yaml | 6 +++--- .../stx-audit-helm/helm-charts/audit/Chart.yaml | 4 ++-- .../helm-charts/audit/templates/configmap.yaml | 1 - .../stx-audit-helm/helm-charts/audit/values.yaml | 2 +- .../stx-audit-helm/manifests/audit_manifest.yaml | 2 +- test-requirements.txt | 1 + tox.ini | 15 +++++++++++++++ 10 files changed, 24 insertions(+), 25 deletions(-) delete mode 100644 config diff --git a/config b/config deleted file mode 100644 index 0c49466..0000000 --- a/config +++ /dev/null @@ -1,12 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true -[remote "origin"] - url = https://opendev.org/starlingx/audit-armada-app.git - fetch = +refs/heads/*:refs/remotes/origin/* -[branch "master"] - remote = origin - merge = refs/heads/master - rebase = true diff --git a/stx-audit-helm/centos/docker/stx-audit/Dockerfile b/stx-audit-helm/centos/docker/stx-audit/Dockerfile index 2300cc9..8c66021 100644 --- a/stx-audit-helm/centos/docker/stx-audit/Dockerfile +++ b/stx-audit-helm/centos/docker/stx-audit/Dockerfile @@ -4,4 +4,4 @@ RUN yum -y update RUN yum -y install\ audit -ENTRYPOINT ["/sbin/auditd", "-l"] +ENTRYPOINT ["/sbin/auditd", "-f", "-l"] diff --git a/stx-audit-helm/centos/stx-audit-helm.spec b/stx-audit-helm/centos/stx-audit-helm.spec index 03f3d90..a05fc06 100644 --- a/stx-audit-helm/centos/stx-audit-helm.spec +++ b/stx-audit-helm/centos/stx-audit-helm.spec @@ -55,10 +55,6 @@ sed -i 's/@APP_NAME@/%{app_name}/g' %{app_staging}/metadata.yaml sed -i 's/@APP_VERSION@/%{version}-%{tis_patch_ver}/g' %{app_staging}/metadata.yaml sed -i 's/@HELM_REPO@/%{helm_repo}/g' %{app_staging}/metadata.yaml -# Copy the plugins: installed in the buildroot -# mkdir -p %{app_staging}/plugins -# cp /plugins/%{app_name}/*.whl %{app_staging}/plugins - # package it up find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 tar -zcf %{_builddir}/%{app_tarball} -C %{app_staging}/ . diff --git a/stx-audit-helm/stx-audit-helm/files/metadata.yaml b/stx-audit-helm/stx-audit-helm/files/metadata.yaml index d2c6295..d3dc992 100644 --- a/stx-audit-helm/stx-audit-helm/files/metadata.yaml +++ b/stx-audit-helm/stx-audit-helm/files/metadata.yaml @@ -1,5 +1,5 @@ maintain_user_overrides: true -app_name: @APP_NAME@ -app_version: @APP_VERSION@ -helm_repo: @HELM_REPO@ +app_name: "@APP_NAME@" +app_version: "@APP_VERSION@" +helm_repo: "@HELM_REPO@" diff --git a/stx-audit-helm/stx-audit-helm/helm-charts/audit/Chart.yaml b/stx-audit-helm/stx-audit-helm/helm-charts/audit/Chart.yaml index 5cb568b..d68301a 100755 --- a/stx-audit-helm/stx-audit-helm/helm-charts/audit/Chart.yaml +++ b/stx-audit-helm/stx-audit-helm/helm-charts/audit/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 appVersion: "1.0" -description: A Helm chart for AUDIT service -name: audit-helm +description: A Helm chart for AUDIT service +name: audit version: 1.0.0 diff --git a/stx-audit-helm/stx-audit-helm/helm-charts/audit/templates/configmap.yaml b/stx-audit-helm/stx-audit-helm/helm-charts/audit/templates/configmap.yaml index 98f002a..47193e6 100755 --- a/stx-audit-helm/stx-audit-helm/helm-charts/audit/templates/configmap.yaml +++ b/stx-audit-helm/stx-audit-helm/helm-charts/audit/templates/configmap.yaml @@ -4,4 +4,3 @@ metadata: name: {{ .Values.configmap.name_auditd }} data: auditd.conf: {{ toYaml .Values.auditdconf | indent 2 }} - diff --git a/stx-audit-helm/stx-audit-helm/helm-charts/audit/values.yaml b/stx-audit-helm/stx-audit-helm/helm-charts/audit/values.yaml index 0d4f214..cd80bb8 100755 --- a/stx-audit-helm/stx-audit-helm/helm-charts/audit/values.yaml +++ b/stx-audit-helm/stx-audit-helm/helm-charts/audit/values.yaml @@ -4,7 +4,7 @@ image: repository: docker.io/starlingx/stx-audit - tag: dev-centos-stable-2021.05.22.21.26.0 + tag: stx.6.0-v1.0.0 pullPolicy: IfNotPresent debug: '' diff --git a/stx-audit-helm/stx-audit-helm/manifests/audit_manifest.yaml b/stx-audit-helm/stx-audit-helm/manifests/audit_manifest.yaml index 73c3445..89eacdf 100644 --- a/stx-audit-helm/stx-audit-helm/manifests/audit_manifest.yaml +++ b/stx-audit-helm/stx-audit-helm/manifests/audit_manifest.yaml @@ -8,7 +8,7 @@ data: release: audit namespace: kube-system source: - location: http://172.17.0.1:8080/helm_charts/stx-platform/audit-helm-1.0.0.tgz + location: http://172.17.0.1:8080/helm_charts/stx-platform/audit-1.0.0.tgz subpath: audit type: tar reference: master diff --git a/test-requirements.txt b/test-requirements.txt index 8ae3e22..91a583f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,4 @@ # hacking pulls in flake8 hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 bashate >= 0.2 +yamllint<1.26.1;python_version>="3.0" # GPLv2 diff --git a/tox.ini b/tox.ini index cede375..6eeb005 100644 --- a/tox.ini +++ b/tox.ini @@ -31,5 +31,20 @@ commands = -e 'E*'" [testenv:linters] +basepython=python3 commands = {[testenv:bashate]commands} + {[testenv:yamllint]commands} + +[testenv:yamllint] +basepython=python3 +commands = + + bash -c "find {toxinidir} \ + -name .tox -prune \ + -o -type f -name '*.yaml' \ + -print0 | xargs -0 yamllint -d relaxed -f parsable" + +[testenv:flake8] +basepython = python3 +description = Dummy environment to allow flake8 to be run in subdir tox