Skip to content

Commit

Permalink
Fix Helm test, values linting (#2726)
Browse files Browse the repository at this point in the history
* add test annotations, rename

Signed-off-by: chipzoller <[email protected]>

* linting of comments

Signed-off-by: chipzoller <[email protected]>

* reorder

Signed-off-by: chipzoller <[email protected]>

* Use existing RBAC

Signed-off-by: chipzoller <[email protected]>

---------

Signed-off-by: chipzoller <[email protected]>
  • Loading branch information
chipzoller authored Nov 2, 2023
1 parent 3a0f5af commit 8a42da6
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 106 deletions.
33 changes: 2 additions & 31 deletions cost-analyzer/templates/tests/basic-health.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: Pod
metadata:
Expand All @@ -6,7 +7,7 @@ metadata:
annotations:
{{- include "kubecost.test.annotations" . | nindent 4 }}
spec:
serviceAccountName: tester
serviceAccountName: {{ template "cost-analyzer.serviceAccountName" . }}
restartPolicy: Never
containers:
- name: test-kubecost
Expand All @@ -27,33 +28,3 @@ spec:
echo "Failed to fetch Kubecost configuration. Response was $response"
exit 1
fi
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: test-role
namespace: {{ .Release.Namespace }}
rules:
- apiGroups: [""]
resources: ["services"]
verbs: ["list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: test-rolebinding
namespace: {{ .Release.Namespace }}
subjects:
- kind: ServiceAccount
name: tester
namespace: {{ .Release.Namespace }}
roleRef:
kind: Role
name: test-role
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: tester
namespace: {{ .Release.Namespace }}
Loading

0 comments on commit 8a42da6

Please sign in to comment.