Skip to content

Commit d94e87c

Browse files
committed
fix pipeline
1 parent 2d9bfac commit d94e87c

File tree

10 files changed

+33
-33
lines changed

10 files changed

+33
-33
lines changed

.github/workflows/auto-tag.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [ main ]
66
paths:
7-
- 'charts/nullify-k8s-collector/Chart.yaml'
7+
- 'aws-integration-setup/charts/nullify-k8s-collector/Chart.yaml'
88

99
jobs:
1010
tag-release:
@@ -18,7 +18,7 @@ jobs:
1818
- name: Get Chart Version
1919
id: chart-version
2020
run: |
21-
version=$(grep '^version:' charts/nullify-k8s-collector/Chart.yaml | awk '{print $2}' | tr -d '"')
21+
version=$(grep '^version:' aws-integration-setup/charts/nullify-k8s-collector/Chart.yaml | awk '{print $2}' | tr -d '"')
2222
echo "version=$version" >> $GITHUB_OUTPUT
2323
echo "tag=v$version" >> $GITHUB_OUTPUT
2424
@@ -38,8 +38,8 @@ jobs:
3838
git config user.email "github-actions[bot]@users.noreply.github.com"
3939
4040
# Create annotated tag with chart information
41-
app_version=$(grep '^appVersion:' charts/nullify-k8s-collector/Chart.yaml | awk '{print $2}' | tr -d '"')
42-
description=$(grep '^description:' charts/nullify-k8s-collector/Chart.yaml | cut -d':' -f2- | xargs)
41+
app_version=$(grep '^appVersion:' aws-integration-setup/charts/nullify-k8s-collector/Chart.yaml | awk '{print $2}' | tr -d '"')
42+
description=$(grep '^description:' aws-integration-setup/charts/nullify-k8s-collector/Chart.yaml | cut -d':' -f2- | xargs)
4343
4444
git tag -a ${{ steps.chart-version.outputs.tag }} -m "Release ${{ steps.chart-version.outputs.tag }} - Chart Version: ${{ steps.chart-version.outputs.version }}"
4545
git push origin ${{ steps.chart-version.outputs.tag }}
@@ -70,6 +70,6 @@ jobs:
7070
7171
- [Installation Guide](https://github.com/${{ github.repository }}/blob/main/README.md)
7272
- [Security Guidelines](https://github.com/${{ github.repository }}/blob/main/SECURITY.md)
73-
- [Chart Values](https://github.com/${{ github.repository }}/blob/main/charts/nullify-k8s-collector/values.yaml)
73+
- [Chart Values](https://github.com/${{ github.repository }}/blob/main/aws-integration-setup/charts/nullify-k8s-collector/values.yaml)
7474
draft: false
7575
prerelease: false

.github/workflows/helm-release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [ main ]
66
paths:
7-
- 'charts/**'
7+
- 'aws-integration-setup/charts/**'
88
- '.github/workflows/helm-release.yml'
99
workflow_dispatch:
1010

@@ -47,7 +47,7 @@ jobs:
4747
mkdir -p docs
4848
4949
# Package the chart
50-
helm package charts/nullify-k8s-collector -d docs/
50+
helm package aws-integration-setup/charts/nullify-k8s-collector -d docs/
5151
5252
# Generate/update the index
5353
helm repo index docs/ --url https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/
@@ -77,25 +77,25 @@ jobs:
7777

7878
- name: Validate Helm Chart
7979
run: |
80-
helm lint charts/nullify-k8s-collector
81-
helm template charts/nullify-k8s-collector --debug
80+
helm lint aws-integration-setup/charts/nullify-k8s-collector
81+
helm template aws-integration-setup/charts/nullify-k8s-collector --debug
8282
8383
- name: Check for sensitive data
8484
run: |
8585
echo "🔍 Checking for sensitive data in chart..."
8686
8787
# Check for real account IDs, ARNs, bucket names
88-
if grep -r "arn:aws:iam::[0-9]\{12\}:role/" charts/ --exclude-dir=.git; then
88+
if grep -r "arn:aws:iam::[0-9]\{12\}:role/" aws-integration-setup/charts/ --exclude-dir=.git; then
8989
echo "❌ Found real AWS ARN in chart files"
9090
exit 1
9191
fi
9292
93-
if grep -r "nullify-.*-death-star" charts/ --exclude-dir=.git; then
93+
if grep -r "nullify-.*-death-star" aws-integration-setup/charts/ --exclude-dir=.git; then
9494
echo "❌ Found real Nullify bucket names in chart files"
9595
exit 1
9696
fi
9797
98-
if grep -r "[0-9]\{12\}" charts/ --exclude-dir=.git | grep -v "123456789012"; then
98+
if grep -r "[0-9]\{12\}" aws-integration-setup/charts/ --exclude-dir=.git | grep -v "123456789012"; then
9999
echo "❌ Found potential real AWS account ID in chart files"
100100
exit 1
101101
fi

.github/workflows/pr-validation.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
branches: [ main ]
66
paths:
7-
- 'charts/**'
7+
- 'aws-integration-setup/charts/**'
88
- 'docs/**'
99
- '.github/workflows/**'
1010

@@ -23,20 +23,20 @@ jobs:
2323
- name: Lint Helm Chart
2424
run: |
2525
echo "🔍 Linting Helm chart..."
26-
helm lint charts/nullify-k8s-collector
26+
helm lint aws-integration-setup/charts/nullify-k8s-collector
2727
2828
- name: Validate Helm Templates
2929
run: |
3030
echo "🔍 Validating Helm templates..."
31-
helm template test-release charts/nullify-k8s-collector \
31+
helm template test-release aws-integration-setup/charts/nullify-k8s-collector \
3232
--set collector.s3.bucket="test-bucket" \
3333
--set serviceAccount.annotations."eks\.amazonaws\.com/role-arn"="arn:aws:iam::123456789012:role/test-role" \
3434
--debug
3535
3636
- name: Test Chart Installation (dry-run)
3737
run: |
3838
echo "🔍 Testing chart installation..."
39-
helm install test-release charts/nullify-k8s-collector \
39+
helm install test-release aws-integration-setup/charts/nullify-k8s-collector \
4040
--set collector.s3.bucket="test-bucket" \
4141
--set serviceAccount.annotations."eks\.amazonaws\.com/role-arn"="arn:aws:iam::123456789012:role/test-role" \
4242
--dry-run --debug
@@ -52,21 +52,21 @@ jobs:
5252
echo "🔍 Checking for sensitive data..."
5353
5454
# Check for real AWS account IDs (but allow example ones)
55-
if grep -r "arn:aws:iam::[0-9]\{12\}:role/" charts/ --exclude-dir=.git | grep -v "123456789012" | grep -v "NULLIFY-ACCOUNT" | grep -v "YOUR-ACCOUNT"; then
55+
if grep -r "arn:aws:iam::[0-9]\{12\}:role/" aws-integration-setup/charts/ --exclude-dir=.git | grep -v "123456789012" | grep -v "NULLIFY-ACCOUNT" | grep -v "YOUR-ACCOUNT"; then
5656
echo "❌ Found potentially real AWS ARN in chart files"
5757
exit 1
5858
fi
5959
6060
# Check for real Nullify bucket names
61-
if grep -r "nullify-.*-death-star" charts/ --exclude-dir=.git; then
61+
if grep -r "nullify-.*-death-star" aws-integration-setup/charts/ --exclude-dir=.git; then
6262
echo "❌ Found real Nullify bucket names in chart files"
6363
exit 1
6464
fi
6565
6666
# Check for common secrets
67-
if grep -ri "password\|secret\|key" charts/ --exclude-dir=.git | grep -v "YOUR-" | grep -v "NULLIFY-" | grep -v "example" | grep -v "placeholder"; then
67+
if grep -ri "password\|secret\|key" aws-integration-setup/charts/ --exclude-dir=.git | grep -v "YOUR-" | grep -v "NULLIFY-" | grep -v "example" | grep -v "placeholder"; then
6868
echo "⚠️ Found potential secrets - please review:"
69-
grep -ri "password\|secret\|key" charts/ --exclude-dir=.git | grep -v "YOUR-" | grep -v "NULLIFY-" | grep -v "example" | grep -v "placeholder"
69+
grep -ri "password\|secret\|key" aws-integration-setup/charts/ --exclude-dir=.git | grep -v "YOUR-" | grep -v "NULLIFY-" | grep -v "example" | grep -v "placeholder"
7070
fi
7171
7272
echo "✅ Security check completed"

aws-integration-setup/charts/nullify-k8s-collector/templates/NOTES.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ The data collected includes (but is not limited to):
2020
- AWS Region: {{ .Values.collector.aws.region }}
2121
- Schedule: {{ .Values.collector.schedule }}
2222

23-
{{- if .Values.collector.dataCollection.excludeNamespaces }}
23+
{{- if and .Values.collector.dataCollection .Values.collector.dataCollection.excludeNamespaces }}
2424
- Excluded Namespaces: {{ .Values.collector.dataCollection.excludeNamespaces }}
2525
{{- end }}
2626

27-
{{- if .Values.collector.dataCollection.metadataOnly }}
27+
{{- if and .Values.collector.dataCollection .Values.collector.dataCollection.metadataOnly }}
2828
- Collection Mode: Metadata only (no resource content)
2929
{{- else }}
3030
- Collection Mode: Full resource data

aws-integration-setup/charts/nullify-k8s-collector/templates/_helpers.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ app.kubernetes.io/instance: {{ .Release.Name }}
5454
{{/*
5555
Create the name of the service account to use
5656
*/}}
57-
{{- define "k8s-info-collector.serviceAccountName" -}}
57+
{{- define "k8s-collector.serviceAccountName" -}}
5858
{{- if .Values.serviceAccount.create }}
59-
{{- default (include "k8s-info-collector.fullname" .) .Values.serviceAccount.name }}
59+
{{- default (include "k8s-collector.fullname" .) .Values.serviceAccount.name }}
6060
{{- else }}
6161
{{- default "default" .Values.serviceAccount.name }}
6262
{{- end }}

aws-integration-setup/charts/nullify-k8s-collector/templates/clusterrole.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kind: ClusterRole
44
metadata:
55
name: {{ .Values.clusterRole.name }}
66
labels:
7-
{{- include "k8s-info-collector.labels" . | nindent 4 }}
7+
{{- include "k8s-collector.labels" . | nindent 4 }}
88
rules:
99
# Access for collecting cluster information
1010
- apiGroups: [""]

aws-integration-setup/charts/nullify-k8s-collector/templates/clusterrolebinding.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ kind: ClusterRoleBinding
44
metadata:
55
name: {{ .Values.clusterRoleBinding.name }}
66
labels:
7-
{{- include "k8s-info-collector.labels" . | nindent 4 }}
7+
{{- include "k8s-collector.labels" . | nindent 4 }}
88
roleRef:
99
apiGroup: rbac.authorization.k8s.io
1010
kind: ClusterRole
1111
name: {{ .Values.clusterRole.name }}
1212
subjects:
1313
- kind: ServiceAccount
14-
name: {{ include "k8s-info-collector.serviceAccountName" . }}
14+
name: {{ include "k8s-collector.serviceAccountName" . }}
1515
namespace: {{ .Values.serviceAccount.namespace }}
1616
{{- end }}

aws-integration-setup/charts/nullify-k8s-collector/templates/cronjob.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ spec:
3434
value: "{{ .Values.collector.s3.keyPrefix }}"
3535
- name: AWS_REGION
3636
value: "{{ .Values.collector.aws.region }}"
37-
{{- if .Values.collector.dataCollection.excludeNamespaces }}
37+
{{- if and .Values.collector.dataCollection .Values.collector.dataCollection.excludeNamespaces }}
3838
- name: EXCLUDE_NAMESPACES
3939
value: "{{ .Values.collector.dataCollection.excludeNamespaces }}"
4040
{{- end }}
41-
{{- if .Values.collector.dataCollection.includeResources }}
41+
{{- if and .Values.collector.dataCollection .Values.collector.dataCollection.includeResources }}
4242
- name: INCLUDE_RESOURCES
4343
value: "{{ .Values.collector.dataCollection.includeResources }}"
4444
{{- end }}
45-
{{- if .Values.collector.dataCollection.metadataOnly }}
45+
{{- if and .Values.collector.dataCollection .Values.collector.dataCollection.metadataOnly }}
4646
- name: METADATA_ONLY
4747
value: "true"
4848
{{- end }}

aws-integration-setup/charts/nullify-k8s-collector/templates/namespace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kind: Namespace
44
metadata:
55
name: {{ .Values.serviceAccount.namespace }}
66
labels:
7-
{{- include "k8s-info-collector.labels" . | nindent 4 }}
7+
{{- include "k8s-collector.labels" . | nindent 4 }}
88
app.kubernetes.io/component: namespace
99
annotations:
1010
# Add Helm hooks to ensure namespace is created at the beginning of the installation

aws-integration-setup/charts/nullify-k8s-collector/templates/pre-install-job.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
apiVersion: batch/v1
33
kind: Job
44
metadata:
5-
name: {{ include "k8s-info-collector.fullname" . }}-namespace-creator
5+
name: {{ include "k8s-collector.fullname" . }}-namespace-creator
66
annotations:
77
"helm.sh/hook": "pre-install"
88
"helm.sh/hook-weight": "-20"
99
"helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
1010
spec:
1111
template:
1212
metadata:
13-
name: {{ include "k8s-info-collector.fullname" . }}-namespace-creator
13+
name: {{ include "k8s-collector.fullname" . }}-namespace-creator
1414
spec:
1515
serviceAccountName: default
1616
restartPolicy: Never

0 commit comments

Comments
 (0)