Skip to content

Commit

Permalink
consol-charts updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyaccuknox committed Nov 23, 2024
1 parent 300d9a4 commit 70de322
Show file tree
Hide file tree
Showing 47 changed files with 97 additions and 26 deletions.
36 changes: 10 additions & 26 deletions .github/workflows/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:

helm_chart_validation:
runs-on: ubuntu-latest
needs: [tag-validate]
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -52,25 +53,10 @@ jobs:
chmod 700 get_helm.sh
./get_helm.sh
- name: Validate cis-k8s-job
- name: Validate Helm charts
run: |
helm lint cis-k8s-job
helm template cis-k8s-job --dry-run > /dev/null
- name: Validate k8s-risk-assessment-job
run: |
helm lint k8s-risk-assessment-job
helm template k8s-risk-assessment-job --dry-run > /dev/null
- name: Validate k8tls-job
run: |
helm lint k8tls-job
helm template k8tls-job --dry-run > /dev/null
- name: Validate kiem-job
run: |
helm lint kiem-job
helm template kiem-job --dry-run > /dev/null
helm lint accuknox-jobs
helm template accuknox-jobs --dry-run > /dev/null
helm_push_to_ecr:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -102,15 +88,13 @@ jobs:
shell: bash
id: chart-version
run: |
for CHART_DIR in cis-k8s-job k8s-risk-assessment-job k8tls-job kiem-job; do
sed -i "s/^version:.*$/version: ${{ github.ref_name }}/" $CHART_DIR/Chart.yaml
sed -i "s/^appVersion:.*$/appVersion: ${{ github.ref_name }}/" $CHART_DIR/Chart.yaml
done
sed -i "s/^version:.*$/version: ${{ github.ref_name }}/" accuknox-jobs/Chart.yaml
sed -i "s/^appVersion:.*$/appVersion: ${{ github.ref_name }}/" accuknox-jobs/Chart.yaml
- name: Package and Push Helm Charts
run: |
for CHART_DIR in cis-k8s-job k8s-risk-assessment-job k8tls-job kiem-job; do
helm package $CHART_DIR
HELM_PACKAGE=$(ls $CHART_DIR-*.tgz)
helm package accuknox-jobs
HELM_PACKAGE=$(ls accuknox-jobs-*.tgz)
helm push $HELM_PACKAGE oci://${{ secrets.REPO }}
done
File renamed without changes.
43 changes: 43 additions & 0 deletions accuknox-jobs/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apiVersion: v2
name: accuknox-jobs
description: A Helm chart for managing Kubernetes jobs including CIS compliance checks, risk assessment jobs, TLS management jobs, and more.


# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"

dependencies:
- name: cis-k8s-job
version: "0.1.0"
repository: "file:/./charts/cis-k8s-job"
condition: accuknox.cis.enabled
- name: k8s-risk-assessment-job
version: "0.1.0"
repository: "file:/./charts/k8s-risk-assessment-job"
condition: accuknox.riskassessment.enabled
- name: k8tls-job
version: "0.1.0"
repository: "file:/./charts/k8tls-job"
condition: accuknox.k8tls.enabled
- name: kiem-job
version: "0.1.0"
repository: "file:/./charts/kiem-job"
condition: accuknox.kiem.enabled
1 change: 1 addition & 0 deletions accuknox-jobs/charts
20 changes: 20 additions & 0 deletions accuknox-jobs/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Global parameters applicable to all jobs
global:
url: "cspm.demo.accuknox.com"
tenantId: ""
authToken: "NO-TOKEN-SET"
cronTab: "30 9 * * *"
clusterName: ""
clusterId: ""
label: ""

# Job-specific configurations
accuknox:
cis:
enabled: "false"
riskassessment:
enabled: "false"
k8tls:
enabled: "false"
kiem:
enabled: "false"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions knox-jobs/kiem-job/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 70de322

Please sign in to comment.