Skip to content

Commit

Permalink
fix/update testJob
Browse files Browse the repository at this point in the history
Signed-off-by: chipzoller <chipzoller@gmail.com>
  • Loading branch information
chipzoller committed Feb 7, 2024
1 parent 618ea18 commit 3402d4d
Showing 1 changed file with 2 additions and 33 deletions.
35 changes: 2 additions & 33 deletions eks-anywhere-common/Testers/Kubecost/kubecost-testJob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
spec:
template:
spec:
serviceAccountName: tester
automountServiceAccountToken: false
containers:
- name: test-kubecost
image: alpine/k8s:1.26.9
Expand All @@ -18,9 +18,8 @@ spec:
args:
- -c
- >-
svc=$(kubectl -n kubecost get svc -l app.kubernetes.io/name=cost-analyzer -o json | jq -r .items[0].metadata.name);
echo Getting current Kubecost state.;
response=$(curl -sL http://${svc}:9090/model/getConfigs);
response=$(curl -sL http://kubecost-cost-analyzer:9090/model/getConfigs);
code=$(echo ${response} | jq .code);
if [ "$code" -eq 200 ]; then
echo "Got Kubecost working configuration. Successful."
Expand All @@ -31,33 +30,3 @@ spec:
fi
restartPolicy: Never
backoffLimit: 1
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: test-role
namespace: kubecost
rules:
- apiGroups: [""]
resources: ["services"]
verbs: ["list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: test-rolebinding
namespace: kubecost
subjects:
- kind: ServiceAccount
name: tester
namespace: kubecost
roleRef:
kind: Role
name: test-role
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: tester
namespace: kubecost

0 comments on commit 3402d4d

Please sign in to comment.